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 0\rangle + \vert 1\rangle)$ state and Q2 is in $\vert 0\rangle$ 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 00\rangle+\vert 11\rangle)$.
Then applying the Hadamard gate gives us: $\frac{1}{2}(\vert 00\rangle+\vert 10\rangle+ \vert 01\rangle - \vert 11\rangle)$. As you can see, we get four possibilities of states.
What if I perform the calculations on individual wires? i.e.
- We perform Hadamard on the first Q1 bit, $\frac{1}{\sqrt{2}}(\vert 0\rangle + \vert 1\rangle)$ state which gives us $\vert 0\rangle$ state
- Then for the Q2, apply CNOT which gives $\vert 0\rangle$
- Then we calculate the overall state which is $\vert 00\rangle$
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!