← Back to section · Quantum Computing
The Scales of a Circuit: Width, Gate Count, and Depth
Distinguishing the three basic scales of a quantum circuit — width (qubit count), size (total gate count), and depth (the number of parallel layers) — and explaining why depth is directly constrained by coherence time, where parallelism comes from, and how hardware connectivity rewrites the depth of the same algorithm.
Judging a quantum circuit takes at least three numbers: how many qubits it uses, how many gates it contains, and how long it runs. These are called width, size (gate count), and depth. Beginners most easily mistake gate count for running cost, but on real hardware the deciding factor is often depth — because depth times the duration of one layer is the circuit’s actual running time, and the coherence lifetime of a quantum state drains away with time, not with gate count.
Three scales: width, size, depth
Width is the number of qubits a circuit occupies; it sets the difficulty of classical simulation (the state vector has dimension ) and the chip scale required. Size is the total number of gates, usually split into single-qubit and two-qubit counts, since the latter’s error rates are an order of magnitude higher. Depth needs a little care to define: draw the circuit with time flowing left to right; gates acting on mutually disjoint sets of qubits can be scheduled into the same “layer” and executed simultaneously; depth is the number of layers required when the circuit is packed as parallel as possible while respecting the original causal order — equivalently, the longest path in the circuit’s dependency graph. Clearly depth ≤ size, with equality only for a fully serial circuit. A circuit with 1000 gates and depth 20 can be far more feasible on hardware than one with 200 gates and depth 180: the former has high parallelism per layer and a short total duration, while the latter’s quantum state must survive roughly ten times as many layers of noise.
Why depth is constrained by coherence time
Depth times the duration of one layer (set by the slowest gate in it, commonly a two-qubit gate or a measurement) is the circuit’s wall-clock time. The energy relaxation time and dephasing time of the qubits impose a hard ceiling on wall-clock time: as the running time approaches the coherence time, the state’s information is lost before readout. The error view points the same way: if each layer introduces error of about , the total fidelity decays roughly as , so doubling the depth degrades reliability exponentially. This is the root of the NISQ era’s “shallow circuits first” doctrine, and the reason variational algorithms deliberately keep their parametrized circuits shallow. In the fault-tolerant context, depth survives in a new incarnation: -depth (the number of layers containing gates) sets the execution time of a logical circuit, because gates must be fed by magic-state distillation whose tempo is far slower than Clifford gates — the optimization target switches from total gate count to the number of layers of non-Clifford resources.
Where parallelism comes from
How shallow a circuit can be made depends on how much parallel structure it contains, which has three sources. The first is disjointness: gates on different qubits are independent by nature — applying to 100 qubits at once takes a single layer. The second is commutation: gates that commute can be reordered and regrouped into shared layers — all diagonal gates (, , , CZ) commute among themselves, and error-correction circuits exploit exactly this to squeeze a full round of syndrome measurement into a handful of layers. The third is algorithm structure: some algorithms are naturally wide and shallow (preparing many independent Bell pairs at once), while others are inherently serial — every step of Grover iteration and amplitude amplification depends on the result of the previous one, so the iteration count is a lower bound on depth that no compilation trick can circumvent. What a compiler can do is rearrange a given circuit, under equivalence transformations, toward its structural lower bound: gate fusion (merging adjacent single-qubit gates into one ) reduces fragmentation within layers, gate reordering brings commuting gates together, and scheduling algorithms (as-early-as-possible or as-late-as-possible) fill idle qubits’ gates into existing layers. When judging whether a “circuit optimization” is genuinely effective, watching depth and two-qubit gate count fall is more reliable than watching total gate count.
The depth–width tradeoff
When depth runs short, it can be bought with width — the most common exchange in circuit design. The most direct example is fan-out: when one qubit must control many targets, acting on them serially costs depth linear in the number of targets; instead, first use a CNOT tree to copy the qubit’s state (copying computational-basis information, preparing GHZ-type correlations — not cloning an unknown state) onto several ancillas, then let the copies control their targets in parallel, compressing the depth to logarithmic. Carry-lookahead adders in arithmetic circuits are the same idea: extra ancillas and gates trade the linear depth of a ripple-carry chain for logarithmic depth. Measurement and classical feedforward can go further still: with pre-prepared entanglement and mid-circuit measurement, the depth of some circuit segments can be compressed “teleportation-style,” at the price of ancilla qubits and classical-logic latency. The trade runs both ways: when width is tight, depth can buy width back — reuse qubits, serialize subcircuits. Resource-estimation reports quote width, gate count, and depth together precisely because the three span a whole surface of possible exchanges, and quoting any one number in isolation misleads.
How connectivity rewrites depth: two fates of GHZ preparation
The depth of the same task can differ by orders of magnitude across topologies, and GHZ preparation is the cleanest example. If the hardware is all-to-all connected (any two qubits can interact directly), a doubling strategy applies: in layer 1, entangle one qubit’s superposition onto 2 qubits; in layer 2, apply CNOTs simultaneously from each existing qubit to a fresh one to obtain a 4-qubit GHZ; each layer doubles the size, so an -qubit GHZ needs only depth. If the hardware is a one-dimensional chain, entanglement can only propagate step by step along the chain: the first qubit’s information needs steps to reach the far end, the depth is forced to be , and the doubling strategy has no room to operate. Two-dimensional grids fall in between. The example shows that depth is not an intrinsic property of an algorithm but a joint property of algorithm × topology: a depth figure reported in a paper is nearly impossible to compare across works unless its connectivity assumption is stated. It also explains why trapped ions (naturally near-all-to-all) and superconducting devices (nearest-neighbor coupling) keep entirely different depth ledgers for the same circuit, and why the SWAPs a compiler inserts, though they increase gate count, can lower the total depth by shortening the critical path — routing is, in essence, an exchange between gate count and depth.
Summary
Width sets the ceiling of scale, gate count sets the total error, and depth decides the race against coherence time. When reading any quantum circuit, first count these three scales, then ask whether its parallelism comes from disjointness, commutation, or algorithm structure, and finally check the connectivity assumption behind the depth figure — this way of reading turns the judgment “can this circuit run?” from intuition into arithmetic.
References
- Nielsen, M. A. & Chuang, I. L., Quantum Computation and Quantum Information, Cambridge University Press, 2010. https://www.cambridge.org/9780521635035
- Preskill, J., Quantum Computing in the NISQ era and beyond, Quantum 2, 79 (2018). https://arxiv.org/abs/1801.00862
- IBM Quantum Documentation (reference on circuit depth and transpilation). https://docs.quantum.ibm.com
Tags: Circuit DepthParallelismCoherence TimeCompilation