Quantum logic gate
A quantum logic gate is a basic operation that transforms the state of one or more qubits. Mathematically each gate is a unitary matrix, which makes every gate reversible: the input can always be recovered from the output. Sequences of gates build a Quantum circuit, the standard model for expressing quantum computation.
Unitarity and reversibility
Quantum evolution is described by unitary transformations, so a gate acting on n qubits is a 2^n by 2^n unitary matrix. Unitarity has two immediate consequences. First, gates preserve total probability, keeping the Quantum state normalized. Second, every gate has an inverse, so quantum computation is reversible, unlike classical logic where operations such as AND discard information. Measurement is the exception: it is not a unitary gate but an irreversible readout that collapses Superposition into a classical outcome.
Common gates
| Gate | Qubits | Effect |
|---|---|---|
| X (NOT) | 1 | Flips 0 and 1, the quantum bit-flip |
| Z | 1 | Flips the sign (phase) of the 1 component |
| H (Hadamard) | 1 | Creates superposition, mapping 0 to an equal mix of 0 and 1 |
| Phase (S, T) | 1 | Adds a controlled phase, essential for interference |
| CNOT | 2 | Flips a target qubit conditioned on a control, creating Entanglement |
| Toffoli (CCNOT) | 3 | Flips a target if two controls are 1; enables reversible classical logic |
Single-qubit gates such as X, H, and phase rotate a qubit's state, visualized as rotations on the Bloch sphere. The two-qubit CNOT is the workhorse for building entanglement between qubits, and the three-qubit Toffoli lets reversible circuits emulate any classical Boolean function.
Universal gate sets
A finite set of gates is universal if any unitary on any number of qubits can be approximated to arbitrary accuracy by circuits built only from that set. A standard result is that all single-qubit gates together with CNOT are universal, and that even a small discrete set, such as Hadamard, phase T, and CNOT, suffices for approximate universality (Barenco et al. 1995). This mirrors classical computing, where NAND alone is universal, and traces to early work defining the universal quantum computer (Deutsch 1985). Universality means hardware only needs to implement a small gate set well, and everything else is compiled into it (Nielsen and Chuang 2010).
Clifford and non-Clifford gates
Gates split into two important classes. The Clifford gates, including Hadamard, phase S, and CNOT, are efficient to simulate classically and, by the Gottesman-Knill theorem, cannot by themselves provide any quantum speedup. Universality and quantum advantage require at least one non-Clifford gate, most commonly the T gate. This distinction is central to fault tolerance: in codes such as the Surface code, Clifford gates are comparatively cheap, while non-Clifford gates are expensive and are usually produced by preparing and consuming special resource states. The cost of these non-Clifford operations dominates the resource estimates for running large algorithms.
In practice
Real devices implement a native gate set fixed by their physics: microwave pulses for Superconducting qubits, laser-driven interactions for Trapped-ion qubits, and Rydberg gates for Neutral-atom qubits. Compilers translate an abstract algorithm into these native gates. Every gate is imperfect, and gate errors accumulate over a computation, which is why Quantum error correction is needed for long circuits. The gates used to express Shor's algorithm are ordinary members of a universal set; the difficulty is running enough of them accurately, not any exotic operation.
Sources
- Elementary gates for quantum computation (arXiv (Phys. Rev. A, Barenco et al.), 1995)
- Quantum theory, the Church-Turing principle and the universal quantum computer (Proc. R. Soc. Lond. (Deutsch), 1985)
- Quantum Computation and Quantum Information (10th Anniversary Edition) (Cambridge University Press (Nielsen and Chuang), 2010)
Cite this entry
"Quantum logic gate." postquantum.wiki. Updated July 11, 2026. https://postquantum.wiki/quantum-logic-gate@misc{pqwiki-quantum-logic-gate,
title = {Quantum logic gate},
howpublished = {\url{https://postquantum.wiki/quantum-logic-gate}},
year = {2026},
note = {postquantum.wiki, updated 2026-07-11}
}