Gates, Circuits, and Computation Models
A quantum circuit represents a controlled information-processing procedure as an ordered composition of preparations, reversible gates, measurements, and classically conditioned operations. A gate is an ideal mathematical map; a laboratory instruction is a noisy physical implementation and is generally described by a quantum channel.
This chapter is the canonical map of the circuit-model language. The pages on single-qubit gates, multi-qubit gates, and universal gate sets own the detailed gate families.
Conventions Before Calculation
Section titled “Conventions Before Calculation”This page uses column state vectors acted on from the left. In an expression
acts first. For two qubits, the ordered computational basis is
with the left ket label belonging to the first tensor factor. A one-qubit gate on the first factor is ; on the second it is .
These conventions are not universal across software packages. Before moving a matrix, bit string, or circuit between sources, check:
- tensor-factor and bit-string order;
- whether matrices act on column or row vectors;
- whether circuit diagrams are read left-to-right;
- the signs in rotation gates;
- whether equality is exact or only up to global phase.
Common One-Qubit Gates
Section titled “Common One-Qubit Gates”In the basis , the Pauli gates are
They satisfy
and, for example, . The Hadamard gate is
with
The phase gates are
so and .
Rotation Gates and General One-Qubit Unitaries
Section titled “Rotation Gates and General One-Qubit Unitaries”For ,
Thus
and
Every one-qubit unitary can be decomposed as
The leading phase is irrelevant for an isolated unconditional gate on a state ray, but it can become a relative phase when the operation is placed under coherent control.
Controlled Operations
Section titled “Controlled Operations”For control qubit and target system , the controlled- gate is
CNOT is the controlled- gate:
In the declared basis,
The controlled- gate is
and the two are related by
The dedicated semantic audit extends this definition to open and multiple controls, multiplexed branches, branch-relative phase, kickback, and controlled-access assumptions.
Exchange Gates
Section titled “Exchange Gates”SWAP exchanges two tensor factors:
with matrix
It can be decomposed as
where the rightmost CNOT acts first. A physical platform may offer an iSWAP or partial exchange natively, making this textbook decomposition a poor cost model for that hardware.
A Bell-State Preparation
Section titled “A Bell-State Preparation”Starting from , apply Hadamard to the first qubit and then CNOT:
The output is not a product of one-qubit states. Circuit diagrams therefore encode both reversible transformations and the creation of correlations.
Exact, Projective, and Channel Equality
Section titled “Exact, Projective, and Channel Equality”Three notions must be kept separate:
- Exact matrix equality: .
- Equality up to global phase: .
- Equality as an isolated unitary channel: for every .
The second implies the third. It does not imply that controlled- and controlled- are equivalent, because the phase appears only in the controlled branch and becomes relative. Likewise, equality on a few basis states is not enough to establish operator equality unless linearity and phases have been checked.
From Gate Lists to Computation Models
Section titled “From Gate Lists to Computation Models”The standard circuit model specifies:
- input registers and their initialization;
- an allowed set of local and entangling operations;
- gate ordering and possible parallel layers;
- intermediate or final measurements;
- classical records and feedforward;
- an output rule and resource accounting.
Width counts simultaneously represented subsystems. Depth counts sequential layers under a declared parallelism model. Gate count, connectivity, communication, magic-state consumption, and measurement latency can be independent resources.
Alternative models—measurement-based, adiabatic, continuous-variable, bosonic encoded, and topological computation—organize the physical primitive differently. Equivalence in computational power does not imply equal physical overhead or noise sensitivity.
Universality and Compilation
Section titled “Universality and Compilation”A continuously parameterized set containing arbitrary one-qubit rotations and an entangling two-qubit gate is universal in the usual finite-dimensional circuit sense. Discrete sets such as Clifford+ are approximately universal: arbitrary target unitaries are approximated to a requested error.
The Clifford gates alone are not universal for arbitrary quantum computation, despite their importance in stabilizer codes and fault tolerance. Distinguish:
- an abstract universal gate set;
- a device’s native gates;
- a code’s fault-tolerant logical gates;
- a compiler’s chosen approximation and error metric.
Universal Gate Sets develops exact versus approximate universality and compilation costs.
Ideal Gates and Physical Operations
Section titled “Ideal Gates and Physical Operations”An ideal gate acts as
A physical implementation is more generally a channel . Its quality cannot be inferred from one matrix alone. Calibration, leakage, crosstalk, drift, state-preparation and measurement errors, and temporal correlations all affect a circuit-level claim.
Postselected and measurement-conditioned branches are trace-nonincreasing maps before normalization. Reset is not a unitary on the reset subsystem. Classical feedforward makes the computation adaptive rather than one fixed unitary product.
Verification Checks
Section titled “Verification Checks”For a proposed gate or identity:
- Verify for an ideal unitary.
- Apply the operation to every computational-basis vector.
- Check one nontrivial superposition to expose relative phases.
- State tensor-factor and matrix-multiplication order.
- Decide whether equality is exact, projective, or channel-level.
- For controlled gates, retain phases that would be global without control.
- For hardware claims, specify the implemented channel and error metric.
Common Mistakes
Section titled “Common Mistakes”- Reading matrix products left-to-right in time.
- Using a two-qubit matrix with an undeclared basis order.
- Calling every relative phase a global phase.
- Treating as a classical bit flip and dropping its phases.
- Forgetting the half-angle in .
- Assuming Clifford gates alone are universal.
- Equating an ideal unitary with a noisy laboratory pulse.
- Treating measurement, reset, or discarded ancillas as a unitary on the visible register.
- Comparing circuit depths without the same connectivity and parallelism assumptions.
Chapter Map
Section titled “Chapter Map”- Reversible Computation owns bijective classical logic, reversible embeddings, garbage and ancilla accounting, uncomputation, and the boundary with unitary quantum gates.
- Circuit Model defines registers, wires, resources, measurements, and classical control.
- Single-Qubit Gates owns common matrices and Bloch-sphere action.
- Multi-Qubit Gates owns entangling and exchange gates.
- Controlled Operations audits projector-controlled blocks, open and multiple controls, multiplexed branches, branch-relative phase, coherent versus classical conditioning, and controlled-access assumptions.
- Measurement in Circuits audits projective measurement nodes, basis rotations, classical record encoding, selected and unread outputs, shot statistics, and postprocessing.
- Mid-Circuit Measurement and Feedforward owns causal measurement-conditioned branching, reset and qubit reuse, deferred-measurement limits, and branch-aware resource accounting.
- Quantum Fourier Transform owns the finite-register Fourier unitary, binary phase factorization, exact and approximate circuits, swap conventions, and the boundary with classical FFT output.
- Phase Kickback owns coherent phase transduction from common eigenstates and character states, clean Boolean and modular conversions, factorization and cleanup checks, and phase-sensitive readout.
- Quantum Oracles owns coherent information-access contracts: domains and promises, full-space actions, supplied inverse, controlled, powered, and family capabilities, licensed equivalences, query accounting, and oracle-specific fair comparison.
- Measurement-Based Quantum Computation owns finite-qubit open-graph patterns, adaptive equatorial measurements, byproduct and Pauli-frame propagation, flow and gflow determinism, logical wire, rotation, and entangling kernels, and MBQC resource accounting.
- Adiabatic Quantum Computation owns finite-dimensional closed-system computational Hamiltonian encodings, accepted ground-subspace decoders, gapped paths and schedules, licensed error certificates, circuit/history-state equivalence, and normalized AQC resource accounting.
- Quantum Annealing owns device-agnostic finite-time driver–problem processes across declared closed, open, thermal, nonadiabatic, paused, reversed, or quenched regimes, including decoded sample distributions, freeze-out hypotheses, embeddings, gauges, and annealing-specific resource accounting.
- Continuous-Variable Quantum Computation owns the abstract mode-computation record: quadrature and energy conventions, Gaussian affine-symplectic circuits and continuous measurement with feedforward, declared non-Gaussian completion, finite-squeezed cluster patterns, approximation metrics, and model-level resource accounting.
- Topological Quantum Computation owns the finite-anyon computation record: declared anyon data and total-charge sector, fusion-space encoding, oriented braid and fusion-measurement program, adaptive frame, induced projective logical operation, leakage, universal completion, verification, and resource accounting.
- Bosonic and Encoded Computation Models owns finite logical programs induced by oscillator controls and instruments: declared encodings, complete physical composition, induced logical channels, leakage and rejection, recovery and frames, truncation, verification, and resource ledgers.
- Quantum Algorithms and Complexity is the next chapter guide: it turns a chosen computation model into a declared problem, access/output/success contract, resource ledger, classical comparator, and evidence claim.
- Universal Gate Sets treats compilation and approximation.
- Quantum Gates is the compact matrix lookup card.
References
Section titled “References”- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th anniversary ed., Cambridge University Press, 2010.
- J. Watrous, The Theory of Quantum Information, Cambridge University Press, 2018.
- J. Preskill, Lecture Notes for Physics 219/Computer Science 219: Quantum Computation, California Institute of Technology.
- P. Kaye, R. Laflamme, and M. Mosca, An Introduction to Quantum Computing, Oxford University Press, 2007.
- J. M. Gambetta, J. M. Chow, and M. Steffen, ‘Building Logical Qubits in a Superconducting Quantum Computing System,’ npj Quantum Information 3, 2 (2017).
Exercises
Section titled “Exercises”- A state is acted on first by and then by . Which product represents the circuit, and what is the output on ?
Solution
The later operation appears on the left, so the product is . Therefore
- Let . Show that and define the same isolated unitary channel but that their controlled versions need not agree up to one global phase.
Solution
For every density operator,
But
The phase multiplies only the control- branch and is relative to the control- branch. It cannot generally be removed as one global phase.
- Derive .
Solution
Write
Conjugating the target by and using gives
- Prepare with and CNOT, then compute either reduced density operator.
Solution
The circuit gives
Taking either partial trace removes the cross terms and gives
The global state is pure and entangled while each qubit separately is maximally mixed.