- Fundamentals
Circuit Depth
The number of sequential time steps (layers of gates) required to execute a quantum circuit, where gates acting on disjoint qubits in the same step count as one layer.
Circuit depth is the number of time steps needed to execute a quantum circuit, counting gates that can run simultaneously as a single step. It is the critical path length through the circuit’s directed acyclic graph, where each node is a gate and edges represent qubit dependencies. A circuit with 1,000 gates might have a depth of only 50 if most gates can be parallelized across different qubits.
Formal definition
Given a quantum circuit on qubits, partition the gates into layers such that:
- Every gate appears in exactly one layer
- Gates within the same layer act on disjoint sets of qubits
- If gate must precede gate (they share a qubit and comes first), then ‘s layer index is smaller than ‘s
The circuit depth is the minimum number of layers achievable.
For example, a circuit applying Hadamard gates to all qubits has depth 1 regardless of , because all the gates act on different qubits and can execute simultaneously. A chain of CNOT gates where each shares a qubit with the next has depth .
Why depth matters
On real hardware, every time step introduces errors. Each qubit accumulates decoherence proportional to the total circuit execution time, which scales with depth (not total gate count). If a circuit has depth and each layer takes time , the total execution time is approximately . This time must be small compared to the qubits’ coherence times and , or the computation’s results become dominated by noise.
A rough rule of thumb: the maximum useful circuit depth is approximately , where is the duration of the slowest gate type (usually the two-qubit gate). For superconducting qubits with and two-qubit gate time , this gives a maximum depth of roughly 500. For trapped ions with and two-qubit gate time , the maximum depth is roughly 5,000.
Depth optimization
Transpilation often focuses on reducing circuit depth. Common strategies include:
- Gate commutation: Reordering gates that commute to enable more parallelism
- Gate cancellation: Removing adjacent inverse gate pairs (e.g., two consecutive CNOTs on the same qubits)
- Qubit routing: Inserting SWAP gates to satisfy connectivity constraints while minimizing added depth
- Circuit synthesis: Re-synthesizing subcircuits to find lower-depth implementations
The depth-width tradeoff is also important: using more ancilla qubits (increasing circuit width) can sometimes reduce depth by enabling parallel computation of intermediate results.
Depth in complexity theory
The quantum circuit complexity class contains problems solvable by quantum circuits of polylogarithmic depth . The question of whether (logarithmic depth) can solve the same problems as polynomial-depth circuits connects to deep questions about parallelism in quantum computation.
Why it matters for learners
When evaluating whether a quantum algorithm can run on current hardware, circuit depth is usually the binding constraint, not total gate count. IBM’s quantum volume metric directly incorporates achievable circuit depth as a measure of processor capability. Understanding depth helps you estimate whether a given algorithm is feasible on today’s NISQ devices.