- Fundamentals
- Also: gate model quantum computing
- Also: circuit-based quantum computing
Quantum Circuit Model
The standard computational model for quantum computers in which computation proceeds by applying a sequence of quantum gates (unitary operations) to an initial state of qubits, followed by measurement, the quantum analogue of the classical circuit model.
The quantum circuit model is the dominant framework for designing and running quantum algorithms. When researchers write an algorithm, when hardware vendors describe their processors, and when complexity theorists reason about BQP, they are almost always working within the circuit model.
Components of a quantum circuit
A quantum circuit has three parts: a qubit register initialized to , a sequence of quantum gates (unitary operations on one or more qubits), and measurements that yield classical bits. Single-qubit gates (Hadamard, , ) and two-qubit gates (CNOT, CZ) are the primary building blocks; multi-qubit gates such as Toffoli are decomposed into these primitives.
Circuits are drawn left to right over time, with each wire representing a qubit:
q0: ──[H]──●──[M]──
│
q1: ───────[X]─[M]──
This prepares a Bell state: puts in superposition, then CNOT entangles the pair.
Circuit depth and width
Width is the number of qubits; it sets the memory requirement. Depth is the length of the longest sequential chain of gates from input to output. Depth determines run time and hence decoherence accumulation. A circuit with 100 gates but depth 5 (most gates run in parallel) is easier to execute than one with 50 gates and depth 50.
Universality
The gate set is universal: any unitary on qubits can be approximated to precision with a circuit built from these gates. The Solovay-Kitaev theorem guarantees that any single-qubit gate requires only gates from a fixed universal set, with . Hardware need only implement a small native gate set; the compiler handles the rest. In fault-tolerant settings, gates are expensive (requiring magic state distillation); Clifford gates are cheap.
Comparison to other models
| Model | Key idea | Computational power |
|---|---|---|
| Circuit / gate model | Sequence of unitary gates | Reference model (BQP) |
| Adiabatic quantum computing | Slowly evolve Hamiltonian | Polynomially equivalent |
| Measurement-based (MBQC) | Adaptive measurements on cluster state | Polynomially equivalent |
| Topological | Braiding anyons | Special circuit model implementation |
All models are polynomially equivalent, defining the same class BQP. The circuit model dominates in practice: hardware from every major platform (superconducting, trapped ion, neutral atom) exposes a gate-model interface, and tools such as Qiskit, Cirq, and PennyLane compile, optimize, and execute circuits directly.
Code example
from qiskit import QuantumCircuit
# Build a 3-qubit circuit
qc = QuantumCircuit(3, 3)
# Layer 1: Hadamard on all qubits
qc.h([0, 1, 2])
# Layer 2: CNOT entangling gates
qc.cx(0, 1)
qc.cx(1, 2)
# Layer 3: single-qubit rotations
qc.rz(0.5, 0)
qc.rz(0.5, 1)
# Measurement
qc.measure([0, 1, 2], [0, 1, 2])
print(qc.draw())
print("Circuit width (qubits):", qc.num_qubits)
print("Circuit depth:", qc.depth())
print("Gate counts:", qc.count_ops())
Output: width 3, depth 3 (the two Rz gates in layer 3 run in parallel), and a gate-type breakdown.