Quantum circuit

A quantum circuit is a description of a quantum computation as a sequence of quantum logic gates applied to a register of qubits, followed by measurement to read out classical results. It is the most widely used model of quantum computation, the quantum analogue of a classical logic circuit, and the language in which algorithms are written and compiled to hardware.

The circuit model

A circuit begins with qubits prepared in a known state, usually all 0. Gates then act in a specified order, drawn on a diagram as horizontal wires (one per qubit) with gate symbols placed left to right in time. Because gates are unitary, the whole circuit up to measurement is itself one large reversible unitary. At the end, some or all qubits are measured, collapsing the Quantum state and returning classical bits. Since results are probabilistic, a circuit is typically run many times and the output distribution is analyzed. The circuit model was formalized alongside the definition of the universal quantum computer (Deutsch 1985; Nielsen and Chuang 2010).

Anatomy of a circuit

  • Initialization: prepare qubits in a fiducial state.
  • Superposition: apply Hadamard gates to spread amplitude across many basis states at once.
  • Entangling gates: use CNOT and similar two-qubit gates to correlate qubits, building Entanglement.
  • Interference: apply phase and rotation gates so that wrong answers cancel and correct answers reinforce.
  • Measurement: read out the register to obtain a classical result.

The power of a circuit does not come from evaluating all inputs simultaneously, a common misconception, but from arranging interference so that measuring returns a useful answer with high probability.

Depth, width, and noise

Two key metrics describe a circuit. Width is the number of qubits, and depth is the number of sequential gate layers. On NISQ hardware, depth is sharply limited: each additional layer adds error, and beyond some depth the signal is lost to Decoherence. This is why near-term algorithms favor shallow circuits, and why long algorithms require Quantum error correction to run reliably.

Expressing algorithms

The major quantum algorithms are defined as circuit families parameterized by input size. Shor's algorithm is a circuit that prepares superpositions, applies modular exponentiation, and uses a quantum Fourier transform to extract the period of a function, which yields the factors of a large integer (Shor 1997). Grover's algorithm is a circuit that repeatedly applies an oracle and a diffusion step to amplify the amplitude of a marked item, giving a quadratic speedup for unstructured search. Both compile down to gates from a universal set; the obstacle to running them at cryptographic scale is the number of high-fidelity gates required, not the circuit description.

Relation to other models

The circuit model is equivalent in power to other formulations, including measurement-based (one-way) computation used in photonic designs and adiabatic computation, of which Quantum annealing is a restricted heuristic form. Equivalence means a problem solvable efficiently in one universal model is solvable efficiently in the others, so the circuit model serves as the common reference for reasoning about quantum computation and its cryptographic implications.

Sources

  1. Quantum theory, the Church-Turing principle and the universal quantum computer (Proc. R. Soc. Lond. (Deutsch), 1985)
  2. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer (arXiv (SIAM J. Comput., Shor), 1997)
  3. Quantum Computation and Quantum Information (10th Anniversary Edition) (Cambridge University Press (Nielsen and Chuang), 2010)
Cite this entry
"Quantum circuit." postquantum.wiki. Updated July 11, 2026. https://postquantum.wiki/quantum-circuit@misc{pqwiki-quantum-circuit, title = {Quantum circuit}, howpublished = {\url{https://postquantum.wiki/quantum-circuit}}, year = {2026}, note = {postquantum.wiki, updated 2026-07-11} }