Quantum Computing Asked by radar101 on December 18, 2020
I am bit confused with calculating the overall state of a quantum gate and the individual wire states.
For example, lets say there are two Qubits, where Q1 is in $frac{1}{sqrt{2}}(vert 0rangle + vert 1rangle)$ state and Q2 is in $vert 0rangle$ state. Then we have CNOT gate controlled by Q1 on Q2 followed by a Hadamard gate at the Q1 gate.
Just after the CNOT gate the total state of the system is $frac{1}{sqrt{2}}(vert 00rangle+vert 11rangle)$.
Then applying the Hadamard gate gives us: $frac{1}{2}(vert 00rangle+vert 10rangle+ vert 01rangle – vert 11rangle)$. As you can see, we get four possibilities of states.
What if I perform the calculations on individual wires? i.e.
But then we do not get the same answer as before. Are we allowed to calculate like this or am I doing something wrong here?
Thanks!
You cannot do this. I don't quite understand how you think step 1 reduces from $(|0rangle+|1rangle)/sqrt{2}$ to $|0rangle$. Perhaps you're assuming some statistical sampling of measurement outcomes. But the whole point of a quantum computation is to get interesting interference between different components, so you cannot just drop components. You need them.
Answered by DaftWullie on December 18, 2020
The point is that the CNOT gate with qubit 1 as control and qubit 2 as target and the Hadamard gate on qubit 1 (and identity gate on qubit 2) do not commute. The order you do them in does matter! In your second circuit, you are doing the Hadamard before the CNOT.
This non-commutativity can be explicitly verified by showing that the matrices
$$CNOT = begin{pmatrix} 1& 0& 0 & 0 0& 1& 0 & 0 0& 0& 0 & 1 0& 0& 1 & 0 end{pmatrix}$$
and
$$Hotimes I = begin{pmatrix} 1& 0& 1 & 0 0& 1& 0 &1 1& 0& -1 & 0 0& 1& 0 & -1 end{pmatrix}$$
do not commute.
Answered by rnva on December 18, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP