Glossary · Gates & circuits
CNOT gate
Also called: Controlled-NOT, CX gate
In plain English
It's an "if" switch for qubits: flip the second one only if the first one is 1. Used on a qubit that is still undecided, it ties the two together.
Definition: The CNOT (controlled-NOT) gate is a two-qubit gate that flips the target qubit if, and only if, the control qubit is 1. It is the standard way to create entanglement.
How the CNOT gate works
CNOT acts on two qubits: a control and a target. If the control is 0, nothing happens. If the control is 1, the target flips.
| Control | Target in | Target out |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
On plain 0s and 1s, that is just a classical XOR. The quantum magic appears when the control is in superposition.
Why it matters
A CNOT after a Hadamard is the textbook recipe for entanglement, and entanglement is a key ingredient of quantum algorithms and error correction.
Two-qubit gates are also the hardest operations to do well. On most hardware they have error rates several times higher than single-qubit gates, so the number of CNOTs in a circuit is a good rough guide to how likely it is to run cleanly.
Simple example
Put the control qubit through a Hadamard gate, then apply CNOT. The pair is now in the Bell state (00 + 11)/√2. Measure both and you get 00 or 11, each half the time, but never 01 or 10.
FAQ
What does CNOT stand for?
Controlled-NOT. The NOT (bit flip) is applied to the target qubit only when the control qubit is 1. In Qiskit it is called the CX gate.
How does the CNOT gate create entanglement?
If the control qubit is in a superposition, the CNOT copies that uncertainty into a correlation: the target ends up matching the control in every branch. The two qubits can no longer be described separately, which is entanglement.
Is CNOT enough to build any quantum circuit?
Together with single-qubit gates, yes. A 1995 result by Barenco and colleagues showed CNOT plus single-qubit rotations can build any quantum operation, so CNOT-style two-qubit gates are the workhorse of most quantum chips.
Related terms
Sources
- 01Basics of quantum information: Multiple systems · IBM Quantum Learning (John Watrous)
- 02CXGate (Qiskit API reference) · IBM Quantum documentation
- 03Elementary gates for quantum computation · Barenco et al., Physical Review A, 1995 (arXiv)
Researched with AI assistance and checked against the primary sources above, under the editorial standards set by our editor, Leon Avery. Spotted an error? See our editorial policy.
Newsletter
Quantum, minus the hype. Once a week.
The week's real quantum news in plain English, with why it matters and links to the sources. Free, no spam, unsubscribe any time.
Related guides
The basics
Quantum superposition and entanglement, explained
Superposition, entanglement and interference are the three ideas behind quantum computing. Here's what each really means, and the myths to ignore.
Read guideHow it works
How do quantum computers work?
Follow one quantum calculation from start to finish: preparing qubits, running gates, measuring, and the hardware that makes it all possible.
Read guide GlossaryEvery quantum term in one lineBrowse A-Z