enter image description here

If the initial state of $|x_0\rangle = \alpha |0\rangle + \beta |1\rangle$ and $|x_1\rangle =|0\rangle$, and the final state at the barrier is $|10\rangle$ (in the form $|x_1x_0\rangle$), what would the state of this system be in the form $|00\rangle + |01\rangle + |10\rangle + |11\rangle$?

Since $x_0$ is the control qubit, it seems the CNOT gate only does something when $x_0$ is in the $|1\rangle$ state. Does this mean that $x_0$ would effectively be "copied" onto $x_1$? What would the state of this system be?

  • $\begingroup$ In which state do you initialize qubit $|x_1 \rangle$? The plain answer to your question is, if $|x_0 \rangle = |0 \rangle$ is your control qubit, the CNOT gate will not change the state of qubit $|x_1 \rangle$. Hence, if you start with state $|x_1 x_0 \rangle = |10 \rangle$, you will end up with the same state at the barrier. $\endgroup$
    – Durd3nT
    Apr 26 at 6:18
  • $\begingroup$ Just for the nomenclature, it is normally an implicit rule to order qubits by ascending index number. This means that, in a circuit, we name the qubits from top to bottom. In you case, we say the state at the barrier is $|01\rangle$ in ordering $|x_0x_1\rangle$ $\endgroup$ Apr 26 at 6:52
  • $\begingroup$ So in order to get $|10>$ with my provided ordering, $x_0$ would need to have $\beta = 1$ and $\alpha = 0$, correct? What would the full two qubit state look like at the barrier (e.g. $|00> + |01> + |10> + |11>$)? $\endgroup$ Apr 26 at 22:37

\begin{align} CNOT |01\rangle &= CNOT \big( |0\rangle \otimes |1\rangle \big) \\ &= \big( |0\rangle \langle 0| \otimes I + |1\rangle \langle 1| \otimes X \big) \big( |0 \rangle \otimes 1\rangle \big) \\ &= \big( |0\rangle \langle 0| \otimes I \big)|0\rangle\otimes|1\rangle + |1\rangle \langle 1| \otimes X \big) |0 \rangle \otimes |1\rangle \\ &= \big(|0\rangle \langle0|\big)|0\rangle \otimes I|1\rangle + \big( |1\rangle \langle 1| \big)|0 \rangle \otimes X|1\rangle\\ &= |0\rangle\otimes|1\rangle + \vec{0} = |01\rangle \end{align}

So when the controlled qubit is in the state $|0\rangle$, the CNOT gate have no effect on the state.

Qiskit uses little endian so $|01\rangle$ here is essentially the same as your $|10\rangle$ (reading it backward). So the CNOT gate doesn't do anything to the state $|10\rangle$ since the controlled qubit is in the state $|0 \rangle$.

You end with the state $|10\rangle$ in the circuit above at the barrier because your control qubit is in the state $|0\rangle$ and your target qubit is in the state $|1\rangle$ before the CNOT gate. Thus the state stays the same as $|10\rangle$. Also note that the barrier has no physical meaning.

  • $\begingroup$ So how do I end up in state $|10>$ at the barrier? And what would the full state of the system be, e.g. $|00>+|01>+|10>+|11>$? $\endgroup$ Apr 26 at 4:10
  • $\begingroup$ I updated my answer... If your state at the barrier is $|10\rangle$ then that means the state before the CNOT gate is $|10\rangle$ since CNOT gate has no effect on this state... because the controlled qubit is in the state $|0\rangle$. This means $|x_0 \rangle = |0\rangle$ and $x_1 = |1\rangle$ and so $|x_1 \rangle \otimes |x_0 \rangle = |1 \rangle \otimes |0\rangle = |10\rangle$ $\endgroup$
    – KAJ226
    Apr 26 at 4:51
  • $\begingroup$ I just realized I read the image wrong. $x_0$ is the control qubit, not $x_1$. So an initial value of $|0>$ on $x_1$ makes sense. $\endgroup$ Apr 26 at 22:34
  • $\begingroup$ I apologize for the confusion, I've updated the question to hopefully be more clear. $\endgroup$ Apr 27 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.