# How to describe the transformation induced by the CNOT on arbitrary input states?

Introductions to Quantum Computing treat the Control qubit of a CNOT as unchanged, and this is true for some Control values, eg |0⟩, |1⟩, and (at least when used with a Hadamard-transformed |1⟩ Target) a Hadamard-transformed |1⟩.

But some other Control values, including a Hadamard-transformed |0⟩, apparently lead to entangled final states, by definition changing the Control.

Where can I find a more complete explanation of CNOT final qubit states (unchanged/changed/entangled) and the related initial states ?

• – glS
May 30 at 8:28

For an arbitrary input product pure state $$|\psi_1\rangle\otimes|\psi_2\rangle$$, using the notation $$|\psi_i\rangle\equiv\alpha_i|0\rangle+\beta_i|1\rangle$$, we have \begin{align} |\psi_1\rangle\otimes|\psi_2\rangle &= \alpha_1\alpha_2 |00\rangle + \alpha_1\beta_2 |01\rangle + \beta_1\alpha_2 |10\rangle + \beta_1\beta_2 |11\rangle, \\ &= (\alpha_1|0\rangle+\beta_1|1\rangle)\otimes(\alpha_2|0\rangle+\beta_2|1\rangle).\\ \text{CNOT}(|\psi_1\rangle\otimes|\psi_2\rangle) &= \alpha_1\alpha_2 |00\rangle + \alpha_1\beta_2 |01\rangle + \beta_1\alpha_2 |11\rangle + \beta_1\beta_2 |10\rangle \\ &= \alpha_1|0\rangle\otimes(\alpha_2 |0\rangle + \beta_2 |1\rangle) + \beta_1|1\rangle\otimes(\alpha_2 |1\rangle + \beta_2 |0\rangle). \end{align} You can thus see that you can understand the CNOT as not affecting the control qubit only when either $$\alpha_1=0$$ or $$\beta_1=0$$, that is, only for $$|\psi_1\rangle\in\{|0\rangle,|1\rangle\}$$, or $$\alpha_2=\beta_2$$.

• Does that also imply that the outputs are always entangled when the Control changes?
– AP61
May 31 at 8:24
• when it changes how? They are entangled, as can be seen from the above expression, when $\alpha_2\neq\beta_2$ and $\alpha_1\beta_1\neq0$
– glS
May 31 at 17:03
• When the Control state moves from its initial value to the result of the CNOT - if that is a no-change then there is no entanglement between Control and Target (as shown above), while in all cases of entanglement the (pre-any-measurement) Control state has by definition changed (in fact it no longer exists as a separate entity?), but are there cases of non-entangled final states where the Control is not in its initial state?
– AP61
May 31 at 22:00
• @AP61 I don't think so. To get a separable state you need either $\alpha_2=\beta_2$ or $\alpha_1\beta_1=0$, and in both cases the control is unchanged
– glS
Jun 1 at 8:45

The CNOT matrix is the same regardless of the input (i.e. regardless of which vector is involved in the matrix-vector multiplication).

Your question indicates some discomfort with how CNOT works when the control qubit is in the state: $$H|0\rangle = \frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)$$, but it works just the same as CNOT does with any other control qubit.

$$\textrm{CNOT}\left(\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)|0\rangle\right) = \textrm{CNOT}\left(\frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)\right) = \frac{1}{\sqrt{2}}(|00\rangle + |11\rangle)\tag{1},$$ $$\textrm{CNOT}\left(\frac{1}{\sqrt{2}}(|0\rangle + |1\rangle)|1\rangle\right) = \textrm{CNOT}\left(\frac{1}{\sqrt{2}}(|01\rangle + |11\rangle)\right) = \frac{1}{\sqrt{2}}(|00\rangle + |10\rangle)\tag{2}.$$

In all cases CNOT does the same thing:

• $$|00\rangle$$ becomes $$|00\rangle$$,
• $$|01\rangle$$ becomes $$|01\rangle$$,
• $$|10\rangle$$ becomes $$|11\rangle$$,
• $$|11\rangle$$ becomes $$|10\rangle$$.

At the beginning, this can all seem a bit confusing to a beginning that's still getting used to Dirac notation, and quantum information language in general, but I assure you that if you read through the Nielsen and Chuang book patiently and work through the exercises, in time this will all become second nature to you.