5.3.2 How the CNOT gate works
In the same way as a classical CNOT gate, described in Section 4.2, acts on two bits, a control bit and a target bit; the quantum CNOT gate also acts on two qubits, a control qubit and a target qubit.
The CNOT gate, represented by an operator
, acts on a target qubit
depending on the state of a control qubit
. Note that the single ‘hat’ over the
operator tells you that this is one operator in contrast to the sequential operators, e.g.
as in Equation 14, which are two operators.
In the following, the two-qubit state is assumed to be the product
.
The quantum CNOT gate follows the same rules as the classical CNOT gate: if the state of the control qubit is
, then it leaves the target qubit unchanged. If the state of the control qubit is
, then it applies the NOT gate to the target qubit. Thus the CNOT gate would act on the state
as follows:

and on the state
as follows:

The transformations on the kets
and
can be worked out in the same way. The results of these transformations are collected in the truth table in Table 6 and are identical to the classical rules given in Table 2.
The quantum CNOT gate, however, can also act on superposition states, which is completely beyond the capabilities of the classical CNOT gate. So now consider how the CNOT gate transforms superposition states, starting from the situation where the control state is prepared in the superposition state

and the target qubit is in the state
. First, here is the initial two-qubit state:

Then applying the CNOT operator gives:

You can see that the final state is an entangled state because it cannot be factorised. If the control is in the superposition state orthogonal to the state described in Equation 16, i.e.
, then the negative sign simply propagates so that:

The quantum CNOT gate is depicted graphically in Figure 10 and the full CNOT truth table including the quantum-mechanical results is given in Table 6.

Table 6 Truth table for the quantum CNOT gate
| Input | Output |
|
|
|
|
|
|
|
|
|
|
There are other useful states that can be generated using a CNOT gate; another is introduced in the next exercise.
Exercise 15
Find the two-qubit output state produced by the CNOT operation if the control qubit is prepared in the state
, and the target qubit is prepared in the state
. State whether the output state is entangled or not.
Answer
First, writing the input two-qubit state

Next, applying the operator:

The output state cannot be factorised so it is an entangled state.
To complete this section, consider the case when one of the entangled outputs from Table 6,
is used as an input state.

The final state is now a product state (i.e. it is disentangled), where the control qubit is in the superposition state
. Thus the CNOT gate can disentangle a pair of qubits as well as entangle them.
OpenLearn - Introduction to quantum computing
Except for third party materials and otherwise, this content is made available under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 Licence, full copyright detail can be found in the acknowledgements section. Please see full copyright statement for details.





