1
$\begingroup$

I understand how the $\text{CNOT}$ gate works intuitively:

enter image description here

However, say we have a circuit where the $Z$ gate is applied to $|1⟩$, which turns $|1⟩ \to -|1⟩$. Then, there is a $\text{CNOT}$ gate with the control being $-|1⟩$ and the target $|0⟩$. What would the output look like? Would the $\text{CNOT}$ gate work in its usual way and give $-|1⟩|0⟩ \to -|1⟩|1⟩$ as the output?

$\endgroup$

2 Answers 2

2
$\begingroup$

Yes.

Think of the $-|1\rangle$ state as a superposition of basis states $|0\rangle$ and $|1\rangle$ (albeit a weird one). In this case, you can apply the general rule for the CNOT gate acting on superpositions: apply the gate to each basis state separately, and the result is the linear combination of results of applying the gate to the basis states.

$\endgroup$
2
$\begingroup$

Yes, it would. It is sometimes better to think in the vector-matrix representation than in the dirac notations.

$$|1\rangle = \begin{bmatrix} 0\\ 1 \end{bmatrix}\,.$$

Now,

$$Z|1\rangle = -|1\rangle =\begin{bmatrix} 0\\ -1 \end{bmatrix}\,.$$

Now,

$$-|1\rangle \otimes |0\rangle =\begin{bmatrix} 0\\ -1 \end{bmatrix} \otimes \begin{bmatrix} 1\\ 0 \end{bmatrix} = \begin{bmatrix} 0\\ 0 \\ -1 \\ 0 \end{bmatrix} \,.$$

Applying $\text{CNOT}$,

$$\text{CNOT}\left(-|1\rangle \otimes |0\rangle \right) = \begin{bmatrix} 1 & 0 & 0& 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0 \end{bmatrix} \begin{bmatrix} 0\\ 0 \\ -1 \\ 0 \end{bmatrix} = \begin{bmatrix} 0\\ 0 \\ 0 \\ -1 \end{bmatrix} = -|1\rangle \otimes |1\rangle \equiv |1\rangle \otimes -|1\rangle\,.$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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