According to IBM's website,
[...]where we would [classically] have done an assignment (x=y), we instead initialize the target (x=0) and use exclusive or (x^=y).
This sounds like x is a copy (clone) of y, however cloning is impossible in quantum mechanics. What's going on?
Answer
This is a standard trick in quantum computing: to allow reversibility when computing some function f, you keep all the inputs and you encode the result in an initially "blank" qubit set initially to |0⟩. What you're describing is the simplest case: one single input qubit, and f equal to the identity function.
Thus, you want your gate to take the state |0⟩|0⟩ (where the first qubit is the input and the second is blank) to |0⟩|0⟩ (i.e. keep the first one and compute on the second one), and to take |1⟩|0⟩ into |1⟩|1⟩. As the IBM website points out, one can do this with a CNOT gate controlled on the first qubit.
The no-cloning theorem, however, is not broken. Consider what happens when you input some general state |ψ⟩=a|0⟩+b|1⟩: by linearity, the output will be a|0⟩|0⟩+b|1⟩|1⟩.
The way to interpret this is that the standard classical logic gates - assignment, OR, AND, etc. - are indeed implementable exactly as in (reversible) classical computing for the computational basis, but their behaviour on a general state is then fixed by linearity and must then be examined to see what it comes out as. Thus "assignment" works on the computational basis but not for a superposition state. Other gates like AND or OR don't even make much sense as such if their inputs are in (separable) superpositions or even entangled.
No comments:
Post a Comment