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 times times CX hat sub cap c comma cap t, acts on a target qubit vertical line phi sub cap t mathematical right angle bracket depending on the state of a control qubit vertical line psi sub cap c mathematical right angle bracket. Note that the single ‘hat’ over the times times CX hat operator tells you that this is one operator in contrast to the sequential operators, e.g. cap h hat times cap x hat as in Equation 14, which are two operators.

In the following, the two-qubit state is assumed to be the product absolute value of psi times phi mathematical right angle bracket equals times psi mathematical right angle bracket sub cap c vertical line phi mathematical right angle bracket sub cap t.

The quantum CNOT gate follows the same rules as the classical CNOT gate: if the state of the control qubit is vertical line zero mathematical right angle bracket, then it leaves the target qubit unchanged. If the state of the control qubit is vertical line one mathematical right angle bracket, then it applies the NOT gate to the target qubit. Thus the CNOT gate would act on the state vertical line 00 mathematical right angle bracket as follows:

times times CX hat sub cap c comma cap t times absolute value of 00 mathematical right angle bracket equals times 00 mathematical right angle bracket left parenthesis state of the target is unchanged right parenthesis

and on the state vertical line one times zero mathematical right angle bracket as follows:

times times CX hat sub cap c comma cap t times absolute value of 10 mathematical right angle bracket equals times 11 mathematical right angle bracket left parenthesis state of the target is flipped right parenthesis

The transformations on the kets vertical line 01 mathematical right angle bracket and vertical line 11 mathematical right angle bracket 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

absolute value of psi mathematical right angle bracket sub cap c equals one divided by Square root of two times left parenthesis vertical line zero mathematical right angle bracket sub cap c postfix plus times one mathematical right angle bracket sub cap c right parenthesis
Equation label:(16)

and the target qubit is in the state vertical line zero mathematical right angle bracket sub cap t. First, here is the initial two-qubit state:

multiline equation row 1 vertical line normal cap psi mathematical right angle bracket equals one divided by Square root of two times left parenthesis vertical line zero mathematical right angle bracket sub cap c plus absolute value of one mathematical right angle bracket sub cap c right parenthesis times zero mathematical right angle bracket sub cap t row 2 equals one divided by Square root of two times left parenthesis vertical line zero mathematical right angle bracket sub cap c times absolute value of zero mathematical right angle bracket sub cap t plus times one mathematical right angle bracket sub cap c vertical line zero mathematical right angle bracket sub cap t right parenthesis row 3 equals one divided by Square root of two times left parenthesis vertical line zero times zero mathematical right angle bracket postfix plus vertical line one times zero mathematical right angle bracket right parenthesis full stop

Then applying the CNOT operator gives:

multiline equation row 1 times times CX hat sub cap c comma cap t vertical line normal cap psi mathematical right angle bracket equals times times CX hat sub cap c comma cap t times one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix plus vertical line 10 mathematical right angle bracket right parenthesis row 2 equals one divided by Square root of two times left parenthesis times times CX hat sub cap c comma cap t vertical line 00 mathematical right angle bracket plus times times CX hat sub cap c comma cap t vertical line 10 mathematical right angle bracket right parenthesis row 3 equals one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix plus vertical line 11 mathematical right angle bracket right parenthesis full stop

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. absolute value of psi mathematical right angle bracket sub cap c equals left parenthesis vertical line zero mathematical right angle bracket postfix minus times one mathematical right angle bracket right parenthesis prefix solidus of Square root of two, then the negative sign simply propagates so that:

times times CX hat sub cap c comma cap t times one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket minus absolute value of 10 mathematical right angle bracket right parenthesis equals one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix minus times 11 mathematical right angle bracket right parenthesis full stop

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.

Figure 10 The symbol for the quantum CNOT gate, with the control (C) and target (T) qubits labelled

Table 6 Truth table for the quantum CNOT gate

Input Output
vertical line 00 mathematical right angle bracket vertical line 00 mathematical right angle bracket
vertical line 01 mathematical right angle bracket vertical line 01 mathematical right angle bracket
vertical line 10 mathematical right angle bracket vertical line 11 mathematical right angle bracket
vertical line 11 mathematical right angle bracket vertical line 10 mathematical right angle bracket
one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix plus minus vertical line 10 mathematical right angle bracket right parenthesis one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix plus minus vertical line 11 mathematical right angle bracket right parenthesis

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 absolute value of psi mathematical right angle bracket sub cap c equals left parenthesis vertical line zero mathematical right angle bracket sub cap c postfix plus times one mathematical right angle bracket sub cap c right parenthesis prefix solidus of Square root of two, and the target qubit is prepared in the state absolute value of phi mathematical right angle bracket sub cap t equals times one mathematical right angle bracket. State whether the output state is entangled or not.

Answer

First, writing the input two-qubit state

multiline equation row 1 vertical line normal cap psi mathematical right angle bracket equals one divided by Square root of two times left parenthesis vertical line zero mathematical right angle bracket sub cap c plus absolute value of one mathematical right angle bracket sub cap c right parenthesis times one mathematical right angle bracket sub cap t row 2 equals one divided by Square root of two times left parenthesis vertical line zero mathematical right angle bracket sub cap c times absolute value of one mathematical right angle bracket sub cap t plus times one mathematical right angle bracket sub cap c vertical line one mathematical right angle bracket sub cap t right parenthesis row 3 equals one divided by Square root of two times left parenthesis vertical line 01 mathematical right angle bracket postfix plus vertical line 11 mathematical right angle bracket right parenthesis full stop

Next, applying the operator:

multiline equation row 1 times times CX hat sub cap c comma cap t vertical line normal cap psi mathematical right angle bracket equals times times CX hat sub cap c comma cap t times absolute value of one divided by Square root of two times left parenthesis vertical line 01 mathematical right angle bracket postfix plus times 11 mathematical right angle bracket right parenthesis row 2 equals one divided by Square root of two times left parenthesis times times CX hat sub cap c comma cap t vertical line 01 mathematical right angle bracket plus times times CX hat sub cap c comma cap t vertical line 11 mathematical right angle bracket right parenthesis row 3 equals one divided by Square root of two times left parenthesis vertical line 01 mathematical right angle bracket postfix plus vertical line 10 mathematical right angle bracket right parenthesis

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, absolute value of normal cap phi mathematical right angle bracket sub plus equals one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix plus times 11 mathematical right angle bracket right parenthesis is used as an input state.

multiline equation row 1 times times CX hat sub cap c comma cap t vertical line normal cap phi mathematical right angle bracket equals times times CX hat sub cap c comma cap t times absolute value of one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket postfix plus times 11 mathematical right angle bracket right parenthesis row 2 equals one divided by Square root of two times left parenthesis times times CX hat sub cap c comma cap t vertical line 00 mathematical right angle bracket plus times times CX hat sub cap c comma cap t vertical line 11 mathematical right angle bracket right parenthesis row 3 equals one divided by Square root of two times left parenthesis vertical line 00 mathematical right angle bracket plus absolute value of 10 mathematical right angle bracket right parenthesis equals one divided by Square root of two times left parenthesis vertical line zero mathematical right angle bracket sub cap c postfix plus times one mathematical right angle bracket sub cap c right parenthesis vertical line zero mathematical right angle bracket sub cap t

The final state is now a product state (i.e. it is disentangled), where the control qubit is in the superposition state left parenthesis vertical line zero mathematical right angle bracket sub cap c postfix plus vertical line one mathematical right angle bracket sub cap c right parenthesis prefix solidus of Square root of two. Thus the CNOT gate can disentangle a pair of qubits as well as entangle them.