# Controlled NOT gate

The controlled NOT gate, usually written CNOT or CX, is a two-qubit quantum logic gate that flips the state of one qubit, the target, if and only if the other qubit, the control, is in the state \( |1\rangle \). It is the prototypical multi-qubit gate in the circuit model of quantum computing and one of the standard building blocks of quantum algorithms, entanglement preparation, and quantum error correction.<sup>[1](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)</sup><sup> • </sup><sup>[2](https://ncatlab.org/nlab/files/NielsenChuangQuantumComputation.pdf)</sup>

| Key fact | Detail |
|---|---|
| Action | Flips the target qubit only when the control qubit is \( |1\rangle \); the control is unchanged<sup>[1](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)</sup> |
| Matrix | \( \begin{bmatrix} 1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0 \end{bmatrix} \), a 4 × 4 unitary acting on a two-qubit state vector<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> |
| Entangling | CNOT cannot be written as a tensor product of single-qubit gates, which makes it an entangling gate<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> |
| Universality | The set \( \{H, T, \mathrm{CNOT}\} \) is universal: products of these gates approximate any unitary to arbitrary precision<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> |
| Clifford status | CNOT is a Clifford operation (implementable with H, S, and CNOT gates), and Clifford operations alone are not universal<sup>[4](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)</sup> |
| Relation to CZ | \( U_{\mathrm{CNOT}} = U_H^{(2)} U_{\mathrm{CZ}} U_H^{(2)} \): Hadamard gates on the target around a controlled-Z gate<sup>[5](https://www.nature.com/articles/s43246-022-00311-w)</sup> |
| First superconducting demonstration | Plantenberg, de Groot, Harmans, and Mooij, Nature 447, 836–839 (2007), on a pair of coupled flux qubits<sup>[6](https://www.nature.com/articles/nature05896)</sup> |

## Action on basis states

On the computational basis, writing the control first, the gate maps \( |00\rangle \to |00\rangle \), \( |01\rangle \to |01\rangle \), \( |10\rangle \to |11\rangle \), and \( |11\rangle \to |10\rangle \).<sup>[7](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)</sup> The target bit is XORed with the control bit, so the gate implements the reversible classical map \( (x, y) \to (x, x \oplus y) \).<sup>[8](https://arxiv.org/abs/quant-ph/9503016)</sup> Because the control is left unchanged, the gate is its own inverse: applying it twice returns both qubits to their original states.

In a circuit diagram the gate is drawn as a horizontal line for each qubit, with a solid circle on the control qubit's line connected by a vertical line to a circle resembling the symbol \( \oplus \) on the target qubit's line.<sup>[9](https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information/quantum-circuits/circuits)</sup> In Qiskit the gate is invoked as `qc.cx(control_qubit, target_qubit)`.<sup>[1](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)</sup>

## Entanglement generation

CNOT applied to basis states behaves like an ordinary reversible logic gate, but applied to a superposition it produces entanglement. The standard recipe starts from \( |00\rangle \), applies a [Hadamard gate](https://www.edgepedia.org/hadamard-gate) to the control to make \( \frac{1}{\sqrt{2}}(|0_c\rangle + |1_c\rangle)|0_t\rangle \), then applies CNOT:<sup>[7](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)</sup>

\[ \mathrm{CNOT}\, \frac{1}{\sqrt{2}}\left(|0_c 0_t\rangle + |1_c 0_t\rangle\right) = \frac{1}{\sqrt{2}}\left(|0_c 0_t\rangle + |1_c 1_t\rangle\right) = |\phi^+\rangle. \]

The result is the [Bell state](https://www.edgepedia.org/bell-state) \( |\phi^+\rangle \), in which measuring one qubit determines the outcome for the other. This H-then-CNOT pair is described as one of the most common ways to create entanglement between two qubits.<sup>[7](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)</sup>

This behavior is what distinguishes CNOT from any two-qubit gate formed as a tensor product of single-qubit gates. Such product gates never correlate the qubits; CNOT, which cannot be factored that way, is the simplest example of an entangling gate.<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup>

## Universality and the Clifford hierarchy

A gate set is universal if products of its gates can approximate any unitary operation to arbitrary precision. CNOT appears in the standard universal sets: the Hadamard gate, the [T gate](https://www.edgepedia.org/t-gate), and CNOT form a universal gate set on two and on many qubits, and all one-qubit gates together with CNOT are universal for unitary operations on arbitrarily many qubits.<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup><sup> • </sup><sup>[8](https://arxiv.org/abs/quant-ph/9503016)</sup>

CNOT is also a Clifford operation, meaning it can be built from Hadamard, S, and CNOT gates and, up to global phase, is exactly a unitary that maps Pauli operations to Pauli operations by conjugation. Clifford operations are not universal on their own; approximating arbitrary unitaries with them is not possible, which is why a non-Clifford gate such as T must be added.<sup>[4](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)</sup> This placement has practical consequences in fault-tolerant computing: because no non-trivial quantum error correcting code implements a universal gate set transversally, non-Clifford gates are typically obtained through magic state injection, in which a CNOT is used to teleport the desired gate onto the data qubit.<sup>[10](https://eu-de.quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/fault-tolerant-quantum-computing/controlling-error-propagation)</sup>

## Physical implementations

Hardware rarely implements CNOT directly. On many platforms the native entangling operation is a controlled-phase (CZ) gate, and CNOT is synthesized by sandwiching the CZ with Hadamard-like single-qubit rotations on the target. In electron-spin qubit architectures using micromagnets, for example, an exchange interaction \( J(t) \) switched adiabatically for a duration \( \tau = \pi\hbar/J \) yields a CZ or CNOT gate.<sup>[11](https://www.nature.com/articles/s41467-024-49182-4)</sup> The same CZ-plus-Hadamard construction is used in proposals for meron-based magnetic nanodisk qubits.<sup>[5](https://www.nature.com/articles/s43246-022-00311-w)</sup>

The first demonstration of CNOT gates on superconducting qubits applied microwave pulses to a pair of coupled flux qubits and executed the complete set of four conditional CNOT variants, with either qubit serving as control or target and the action conditioned on either the 0-state or the 1-state; the truth table was measured through state transfer amplitudes and Ramsey-like interference.<sup>[6](https://www.nature.com/articles/nature05896)</sup> In logical-qubit experiments, a transversal logical CNOT is implemented as physical CNOTs between corresponding data qubits, as in the distance-2 surface code demonstration on the Wukong superconducting processor, where the logical CNOT consists of four physical CNOT gates.<sup>[12](https://www.nature.com/articles/s41534-025-01118-6)</sup>

## Generalizations

The controlled-NOT idea generalizes in two directions. A controlled gate in general acts as the identity unless a designated qubit is in state \( |1\rangle \), in which case an arbitrary single-qubit unitary \( U \) is applied to the target; the controlled-Z gate, for instance, applies a Z operation and can be written \( (\mathbf{1} \otimes H)\,\mathrm{CNOT}\,(\mathbf{1} \otimes H) \).<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> Gates can also be controlled on classical information, in which case the gate is applied only in one branch of the quantum program, like an if statement.<sup>[3](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)</sup> Adding more controls gives gates such as the Toffoli (controlled-controlled-NOT), which has been realized in a superconducting qubit-qutrit circuit by first implementing a double-controlled phase gate and conjugating the target with Hadamard gates.<sup>[13](https://www.nature.com/articles/s41598-019-49657-1)</sup>

## References

1. [Bits, gates, and circuits, IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/en/courses/utility-scale-quantum-computing/bits-gates-and-circuits)
2. [Quantum Computation and Quantum Information (Nielsen & Chuang), nLab PDF copy](https://ncatlab.org/nlab/files/NielsenChuangQuantumComputation.pdf)
3. [Multiple-qubit Operations, Azure Quantum, Microsoft Learn](https://learn.microsoft.com/en-us/azure/quantum/concepts-multiple-qubits)
4. [Stabilizer codes, IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/stabilizer-formalism/stabilizer-codes)
5. [Qubits based on merons in magnetic nanodisks, Communications Materials (2022)](https://www.nature.com/articles/s43246-022-00311-w)
6. [Demonstration of controlled-NOT quantum gates on a pair of superconducting quantum bits, Nature 447, 836–839 (2007)](https://www.nature.com/articles/nature05896)
7. [Entanglement & Correlations, Azure Quantum, Microsoft Learn](https://learn.microsoft.com/en-us/azure/quantum/concepts-entanglement)
8. [Elementary gates for quantum computation, Barenco et al., arXiv:quant-ph/9503016](https://arxiv.org/abs/quant-ph/9503016)
9. [Circuits, IBM Quantum Learning](https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information/quantum-circuits/circuits)
10. [Controlling error propagation, IBM Quantum Learning](https://eu-de.quantum.cloud.ibm.com/learning/en/courses/foundations-of-quantum-error-correction/fault-tolerant-quantum-computing/controlling-error-propagation)
11. [The SpinBus architecture for scaling spin qubits with electron shuttling, Nature Communications (2024)](https://www.nature.com/articles/s41467-024-49182-4)
12. [Demonstrating a universal logical gate set in error-detecting surface codes on a superconducting quantum processor, npj Quantum Information (2025)](https://www.nature.com/articles/s41534-025-01118-6)
13. [Realization of efficient quantum gates with a superconducting qubit-qutrit circuit, Scientific Reports (2019)](https://www.nature.com/articles/s41598-019-49657-1)

---
*Topic: Encyclopedia › Physical world and mathematics › Physics › Quantum physics › Quantum information science › Quantum computing and algorithms › Quantum gates and circuits › Multi-qubit and entangling gates*

*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
