Level 2, Tinkerer

Controlled NOT

The left list is a split of the control, with amplitude on 00 and on 10. The controlled NOT rewrites the 10 term as 11 and leaves 00 standing.

A controlled NOT, or CNOT, is a gate on two qubits that flips the second qubit when the first would read 1 and leaves it alone when the first would read 0.

On a pair that is already certain of a single reading, the rule is the ordinary NOT with a control bit in front of it. On a split of the control, which is what H produces just before this gate in the note on two wires, the flip rewrites one term of the joint amplitudes and leaves the other term standing, so 10 becomes 11 while 00 stays put.

An example

On plain inputs, 00 stays 00, 01 stays 01, 10 becomes 11, and 11 becomes 10.

On amplitudes, the same rule swaps the numbers on 10 and 11 and leaves 00 and 01 alone. Give the first wire 0.6 for 0 and 0.8 for 1, and start the second wire certain to read 0. The four amplitudes, in the order 00, 01, 10 and 11, are 0.6, 0, 0.8 and 0. After CNOT they are 0.6, 0, 0 and 0.8.

Square them and the pair reads 00 with chance 0.36 and 11 with chance 0.64. It never reads 01 or 10. The wires always agree, and neither has amplitudes of its own, so the pair is entangled.

Press CNOT a second time and 10 and 11 swap back. You return to 0.6, 0, 0.8 and 0, so the gate undoes itself.

What it is not

CNOT is not a copy machine, though on a plain 0 or 1 it looks like one. Two true copies of the 0.6 and 0.8 qubit would put 0.6 × 0.8 = 0.48 on 01. They would read 01 about 23 times in 100, since 0.48 × 0.48 is about 0.23. The CNOT pair never reads 01. No gate can copy an unknown qubit.

The first wire is not always left alone, either. Put |+⟩ on the first wire and |−⟩ on the second. The amplitudes are 0.5, −0.5, 0.5 and −0.5. CNOT swaps the last two, giving 0.5, −0.5, −0.5 and 0.5. That is |−⟩ on both wires. In this arrangement the sign has moved back onto the control.

The flip on the second wire is the X gate with a condition in front. A split on the first wire followed by CNOT makes a Bell state, and the pair it leaves shows entanglement rather than a product state. The note Both readings were written on the same line runs that circuit step by step, and Which Matrix includes a question built from three CNOTs in a row.

Used in

Longer explanation: What is quantum entanglement?

All the words