QuantumAtlas

Gates & Circuits

CNOT Gate

A two-qubit gate that flips a target qubit only if a control qubit is in state |1⟩, the primary way entanglement is created.

Definition

The CNOT (Controlled-NOT) gate is a fundamental two-qubit gate: it flips the state of a 'target' qubit if and only if a 'control' qubit is in state |1⟩, leaving it unchanged if the control is |0⟩. Applied to qubits in superposition, it's the standard method for generating entanglement.

In depth

The CNOT gate, or controlled-NOT, acts on two qubits. If the control qubit is 1, it flips the target qubit, and if the control is 0, it does nothing. On basis states it is a classical reversible operation: the target becomes the exclusive or of the two inputs. What makes it quantum is that it works on superpositions. Applied to a control in an equal superposition and a target in 0, it creates the Bell state, an entangled pair, which is why CNOT together with single-qubit gates is the standard route to entanglement.

CNOT and arbitrary single-qubit gates form a universal set for quantum computation, which is why two-qubit gate quality is the main measure of a device. Different hardware makes CNOT in different ways. IBM's fixed-frequency transmons use the cross-resonance interaction to make an entangling gate, and Google's tunable-coupler devices make a controlled-Z, which is a CNOT up to Hadamard gates on the target. Trapped ions use the Mølmer-Sørensen interaction, and neutral atoms use the Rydberg blockade. A CNOT costs about 30 to 500 nanoseconds on superconducting chips and 50 to 200 microseconds on ions.

Two-qubit gates are far noisier than single-qubit gates, with error rates of 0.1 to 1 percent on leading devices, so circuits are compiled to use as few CNOTs as possible. Counts of CNOT gates and their depth are standard cost measures for algorithms, and many compilers, such as those that route qubits on limited connectivity, aim to cut them. A SWAP costs three CNOTs, and a Toffoli gate costs six CNOTs in its standard decomposition.

Technical Definition

Combined with the Hadamard gate, CNOT forms a universal set of operations sufficient (along with arbitrary single-qubit rotations) to construct any quantum circuit — making it one of the most important two-qubit gates in quantum computing theory and practice.

Visual Explanation: An Analogy

Think of the CNOT gate like a light switch (the target) wired to only respond if a separate sensor (the control) detects 'on' — when the control qubit is in superposition, the resulting entanglement links the two qubits' fates together.

Key facts

ItemDetail
ActionFlips the target if the control is 1
Matrix4 by 4 permutation matrix that swaps the basis states 10 and 11
Native formsCross-resonance (IBM), controlled-Z (Google), Mølmer-Sørensen (ions), Rydberg blockade (atoms)
Typical errorAbout 0.1 to 1 percent per gate on leading devices
CostsSWAP equals 3 CNOTs; Toffoli equals 6 CNOTs in the standard decomposition

Where the idea comes from

The CNOT gate was described in the 1980s in work on reversible computing and became the standard two-qubit gate after Barenco and coauthors showed in 1995 that CNOT plus single-qubit gates is universal. The first experimental CNOT was shown with trapped ions by Monroe and colleagues in 1995.

Real-World Use Cases

  • The standard method for creating Bell states and other entangled states
  • Used throughout virtually every quantum algorithm that requires entanglement
  • A key benchmark gate for measuring two-qubit gate fidelity across hardware platforms

How it differs from related ideas

  • CNOT is equivalent to controlled-Z up to Hadamards on the target.
  • A Toffoli gate is a CNOT with two controls.
  • CNOT creates entanglement only when the control is in superposition.

Frequently asked questions

What does a CNOT gate do?

It flips the target qubit when the control qubit is 1, and leaves it unchanged otherwise.

Why is CNOT important?

It is the standard entangling gate and, with single-qubit gates, makes a universal gate set.

How accurate are CNOT gates?

Leading devices reach error rates of about 0.1 to 1 percent, with the best ion gates below 0.1 percent.

Related Terms

Keep exploring

← Back to the dictionary