Lukas' Notes

quantum-computing

Definition

CNOT Quantum Gate

The CNOT (Controlled-NOT) quantum gate is a two-qubit controlled gate whose target operation is the NOT gate. It acts on a control qubit and a target qubit as

where is XOR, i.e. addition modulo . Equivalently, on the computational basis:

The control qubit is never changed. When the control is , the target is left alone; when the control is , the target is flipped by .

Its matrix in the computational basis is

CNOT is its own unitary inverse: applying it twice returns to the input. It is also a controlled-”” gate, with the first qubit as control and the second as target.

Effect on a General State

For a two-qubit state with arbitrary amplitudes

CNOT swaps the amplitudes of and while leaving the amplitudes of and alone:

The control-side amplitudes are preserved; only the target-side amplitudes are conditionally exchanged.

Entanglement

CNOT can generate entanglement when the control is in a superposition.

Bell state preparation

Start from and apply the Hadamard gate to the first qubit:

Apply CNOT. The basis state has control , so its target flips to :

The result is the Bell state , an entangled state across the two qubits. CNOT is the canonical two-qubit entangling gate: together with single-qubit gates, it is universal for quantum computation.