5 ms·
You have the right idea, but not the right operation. XOR is reversible. To give a better example: COPY is not reversible. Imagine that you have two qubits [A,
by emiraga 8y ago
You have the right idea, but not the right operation. XOR is reversible.
To give a better example: COPY is not reversible. Imagine that you have two qubits [A, B] as an input and you want to output [A, A]. That is not possible with quantum computers.
- mistaken 8y agoIsn't everything reversible if enough information is stored? Instead of COPY [A, B] -> [A, A]; you could have [A, B, 0] -> [A, A, B] which saves the value of B.
- ahakki 8y agoIIRC this is how you implement stuff, you always keep the inputs, so everything stays reversible.
- lisper 8y agoYes, but "keeping the inputs" is non-trivial in quantum-land because of the no-cloning theorem. You can't just make a copy of your inputs and stash them. You have to be more clever than that.
- deleted 8y ago[deleted]
- Aardwolf 8y agoXOR has 2 inputs and 1 output so cannot be reversible. CNOT is the closest reversible gate
- im3w1l 8y agoTo elaborate: CNOT outputs the pair (A xor B, B). By also outputting B, it becomes reversible.