# Does the $\text{CNOT}$ gate activate if the control qubit is $-|1⟩?$

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

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?

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.

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\,.$$