Skip to main content

Quantum Circuit Depth Calculator

Free Quantum Circuit Depth Calculator for physics. Enter variables to compute results using verified scientific formulas with step-by-step explanations.

Skip to calculator
Physics

Quantum Circuit Depth Calculator

Calculate quantum circuit depth, execution time, coherence budget, error probability, and fault-tolerant resource estimates for quantum computing circuits.

Last updated: December 2025

Calculator

Adjust values & calculate
Estimated Circuit Depth
18 layers
Range: 6 (best) to 30 (worst)
Execution Time
2040.0 ns
Coherence Budget
2.0%
Error Probability
11.35%
Total Gates
30
33.3% two-qubit
Circuit Volume
90
Fault-Tolerant Estimates
Code Distance
11
Physical/Logical
121
Total Physical Qubits
605
Note: These estimates use simplified models. Actual circuit depth depends on gate decomposition, qubit topology, and compiler optimizations. Error rates vary significantly between hardware platforms.
Your Result
Depth: 18 | Time: 2040.0 ns | Coherence: 2.0% | Error: 11.35%
Share Your Result
Understand the Math

Formula

Depth = f(gates, qubits, parallelization); Time = sum(layers * gate_time)

Circuit depth is the number of sequential gate layers, determined by gate dependencies and available parallelism. Execution time sums layer durations. Coherence budget = execution_time / T2. Error probability = 1 - product((1-e_i)^n_i) for each gate type.

Last reviewed: December 2025

Worked Examples

Example 1: 5-Qubit Variational Circuit

A 5-qubit VQE circuit has 20 single-qubit gates (20 ns each) and 10 CNOT gates (200 ns each). Qubits have T2 = 100 us. Estimate depth and feasibility with 50% parallelization.
Solution:
Total gates = 20 + 10 = 30 Max depth (serial) = 30 Min depth (full parallel) = 30/5 = 6 Estimated depth at 50% parallel = 30*(0.5) + 6*(0.5) = 18 Execution time = ~14*20 + ~8*200 = 280 + 1600 = 1880 ns = 1.88 us Coherence budget = 1.88/100 = 1.88% Error probability = 1 - (0.999)^20 * (0.99)^10 = 1 - 0.980*0.904 = 11.4%
Result: Depth: 18 | Execution: 1.88 us | Coherence: 1.88% | Error: 11.4%

Example 2: 50-Qubit Simulation Circuit

A 50-qubit circuit has 500 single-qubit and 200 two-qubit gates. Single gates take 30 ns, two-qubit gates take 300 ns. T2 = 80 us. What code distance is needed for fault tolerance?
Solution:
Total gates = 700 Code distance d = 2*ceil(log2(701)) + 1 = 2*10 + 1 = 21 Physical qubits per logical = 21^2 = 441 Total physical qubits = 441 * 50 = 22,050 Estimated T-gates = 500 * 0.3 = 150 Circuit volume = depth * 50 qubits
Result: Code distance: 21 | Physical qubits: 22,050 | T-gates: ~150
Expert Insights

Background & Theory

The Quantum Circuit Depth Calculator applies the following established principles and formulas. Physics is the fundamental natural science concerned with matter, energy, and the interactions between them. Classical mechanics, founded on Newton's three laws of motion, provides the framework for analyzing the motion of objects. The first law states that an object remains at rest or in uniform motion unless acted upon by a net external force. The second law quantifies this relationship: F = ma, where force equals mass times acceleration in SI units of newtons (N = kgยทm/sยฒ). The third law establishes that every action produces an equal and opposite reaction. Kinematics describes motion without reference to its causes. The four fundamental equations relate displacement s, initial velocity u, final velocity v, acceleration a, and time t: v = u + at, s = ut + ยฝatยฒ, vยฒ = uยฒ + 2as, and s = ยฝ(u + v)t. These assume constant acceleration and are foundational for solving projectile motion, free fall, and linear dynamics problems. Energy conservation underpins much of physics. Kinetic energy is KE = ยฝmvยฒ, where m is mass in kilograms and v is speed in meters per second. Gravitational potential energy is PE = mgh, where g โ‰ˆ 9.81 m/sยฒ near Earth's surface and h is height in meters. The work-energy theorem states that the net work done on an object equals its change in kinetic energy: W = ฮ”KE. Electricity and circuits rely on Ohm's law: V = IR, where voltage V is in volts, current I in amperes, and resistance R in ohms. Electrical power is P = IV = IยฒR = Vยฒ/R, measured in watts. Wave mechanics connects frequency f, wave speed v, and wavelength ฮป through f = v/ฮป, with frequency in hertz (Hz). Pressure is defined as force per unit area, P = F/A, in pascals (Pa = N/mยฒ). The ideal gas law PV = nRT links pressure, volume, moles n, the gas constant R = 8.314 J/(molยทK), and absolute temperature in kelvin. Gravitational force between two masses follows Newton's law of universal gravitation: F = Gmโ‚mโ‚‚/rยฒ, where G = 6.674ร—10โปยนยน Nยทmยฒ/kgยฒ is the gravitational constant.

History

The history behind the Quantum Circuit Depth Calculator traces back through the following developments. The history of physics spans over two millennia, beginning with the natural philosophy of ancient Greece. Aristotle (384โ€“322 BCE) proposed that all matter consisted of four elements and that objects moved toward their natural place, with heavier objects falling faster than lighter ones. While largely incorrect, his systematic approach to explaining nature dominated Western thought for nearly 2,000 years. The Scientific Revolution overturned Aristotelian physics. Galileo Galilei (1564โ€“1642) performed groundbreaking experiments on inclined planes and falling bodies, demonstrating that all objects fall with the same acceleration regardless of mass, and established the principle of inertia. His use of mathematics to describe motion was revolutionary. Isaac Newton synthesized these developments in his landmark Principia Mathematica (1687), laying out the three laws of motion and the law of universal gravitation. Newton's framework unified terrestrial and celestial mechanics, explaining planetary orbits with the same equations governing a falling apple. His calculus provided the mathematical language for expressing rates of change. The 19th century brought two major theoretical achievements. James Clerk Maxwell formulated his equations of electromagnetism between 1861 and 1862, unifying electricity, magnetism, and optics, and predicting the existence of electromagnetic waves traveling at the speed of light. Thermodynamics was developed by Carnot, Clausius, and Kelvin, establishing the laws governing heat, work, and entropy. The 20th century produced two revolutions that fundamentally altered the classical picture. Albert Einstein published the special theory of relativity in 1905, showing that space and time are not absolute but relative to the observer, and that mass and energy are equivalent via E = mcยฒ. His general theory of relativity in 1915 reinterpreted gravity as the curvature of spacetime. Simultaneously, quantum mechanics emerged from the work of Planck, Bohr, Heisenberg, and Schrรถdinger, revealing that at atomic scales energy is quantized and particles exhibit wave-particle duality. These developments culminated in the Standard Model of particle physics, which describes all known fundamental particles and three of the four fundamental forces.

Share this calculator

Explore More

Frequently Asked Questions

Quantum circuit depth is the number of sequential time steps (layers) needed to execute all gates in a quantum circuit, where gates acting on different qubits in the same layer can execute simultaneously. Depth directly determines the minimum execution time of a quantum algorithm. Shallower circuits are preferred because they minimize the exposure to decoherence and gate errors. In the NISQ (Noisy Intermediate-Scale Quantum) era, circuit depth is often the primary bottleneck limiting the complexity of algorithms that can be run. Reducing circuit depth through gate optimization and parallelization is a major focus of quantum compiler design and transpilation.
The total gate count includes every gate operation regardless of when it executes, while depth only counts the number of sequential time steps. If two gates act on different qubits, they can execute in the same time step (same layer), reducing the depth without reducing the gate count. For example, a circuit with 10 single-qubit gates on 5 different qubits has 10 total gates but only depth 2, since 5 gates can execute in parallel per layer. Two-qubit gates further complicate depth calculation because they occupy two qubits simultaneously and may create dependencies that prevent parallelization. Optimizing circuit depth is essentially a scheduling problem that quantum compilers solve using dependency graph analysis.
Circuit execution time depends on the depth, the duration of individual gate operations, and the degree of parallelization achieved. Single-qubit gates on superconducting platforms take about 20 to 50 nanoseconds, while two-qubit gates (like CNOT or CZ) require 100 to 500 nanoseconds. The total execution time is the sum of gate times across all layers, not the sum of all individual gate times, because parallel gates execute simultaneously. Additionally, measurement operations at the end of the circuit take about 300 to 1000 nanoseconds. Classical feedback operations in mid-circuit measurements add further latency. The total time must remain well within the qubit coherence time for results to be meaningful.
Quantum Volume (QV) is a benchmark metric introduced by IBM that measures the largest square circuit (equal depth and width) a quantum computer can reliably execute. It is defined as QV = 2^n where n is the largest number of qubits for which a random circuit of depth n can be executed with heavy output probability greater than 2/3. Quantum Volume captures the interplay between qubit count, gate fidelity, connectivity, and compiler efficiency in a single number. A higher quantum volume means the device can run deeper circuits on more qubits with acceptable accuracy. Current leading quantum processors achieve quantum volumes from 64 to over 1000, corresponding to reliable execution of 6 to 10 qubit circuits at matching depth.
Qubit connectivity describes which pairs of qubits can directly interact via two-qubit gates. Limited connectivity (like the linear chain or grid topologies used in most superconducting processors) forces the compiler to insert SWAP gates to move qubit states adjacent to each other before executing required two-qubit gates. Each SWAP gate typically decomposes into three CNOT gates, significantly increasing both depth and gate count. A fully-connected topology (as available in some trapped ion systems) avoids this overhead entirely. For a circuit requiring long-range interactions on a grid topology, the routing overhead can increase depth by a factor of 2 to 5 times. Hardware-aware transpilation and qubit mapping algorithms are essential for minimizing this connectivity penalty.
Several techniques reduce circuit depth without changing the computation. Gate cancellation identifies adjacent gates that combine to identity or simpler operations. Commutation rules move gates past each other to create more parallel layers. Template matching replaces gate sequences with shorter equivalent sequences. Qubit routing algorithms minimize SWAP gate insertion through optimal initial qubit placement and intelligent routing strategies. Peephole optimization scans fixed-size windows of the circuit for local improvements. Unitary synthesis decomposes arbitrary multi-qubit operations into optimal gate sequences. For variational circuits, architecture search can find inherently shallower circuit structures. Modern quantum compilers like Qiskit, Cirq, and tket apply multiple optimization passes to significantly reduce depth from naive circuit descriptions.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

Depth = f(gates, qubits, parallelization); Time = sum(layers * gate_time)

Circuit depth is the number of sequential gate layers, determined by gate dependencies and available parallelism. Execution time sums layer durations. Coherence budget = execution_time / T2. Error probability = 1 - product((1-e_i)^n_i) for each gate type.

Worked Examples

Example 1: 5-Qubit Variational Circuit

Problem: A 5-qubit VQE circuit has 20 single-qubit gates (20 ns each) and 10 CNOT gates (200 ns each). Qubits have T2 = 100 us. Estimate depth and feasibility with 50% parallelization.

Solution: Total gates = 20 + 10 = 30\nMax depth (serial) = 30\nMin depth (full parallel) = 30/5 = 6\nEstimated depth at 50% parallel = 30*(0.5) + 6*(0.5) = 18\nExecution time = ~14*20 + ~8*200 = 280 + 1600 = 1880 ns = 1.88 us\nCoherence budget = 1.88/100 = 1.88%\nError probability = 1 - (0.999)^20 * (0.99)^10 = 1 - 0.980*0.904 = 11.4%

Result: Depth: 18 | Execution: 1.88 us | Coherence: 1.88% | Error: 11.4%

Example 2: 50-Qubit Simulation Circuit

Problem: A 50-qubit circuit has 500 single-qubit and 200 two-qubit gates. Single gates take 30 ns, two-qubit gates take 300 ns. T2 = 80 us. What code distance is needed for fault tolerance?

Solution: Total gates = 700\nCode distance d = 2*ceil(log2(701)) + 1 = 2*10 + 1 = 21\nPhysical qubits per logical = 21^2 = 441\nTotal physical qubits = 441 * 50 = 22,050\nEstimated T-gates = 500 * 0.3 = 150\nCircuit volume = depth * 50 qubits

Result: Code distance: 21 | Physical qubits: 22,050 | T-gates: ~150

Frequently Asked Questions

What is quantum circuit depth and why does it matter?

Quantum circuit depth is the number of sequential time steps (layers) needed to execute all gates in a quantum circuit, where gates acting on different qubits in the same layer can execute simultaneously. Depth directly determines the minimum execution time of a quantum algorithm. Shallower circuits are preferred because they minimize the exposure to decoherence and gate errors. In the NISQ (Noisy Intermediate-Scale Quantum) era, circuit depth is often the primary bottleneck limiting the complexity of algorithms that can be run. Reducing circuit depth through gate optimization and parallelization is a major focus of quantum compiler design and transpilation.

How is circuit depth different from the total number of gates?

The total gate count includes every gate operation regardless of when it executes, while depth only counts the number of sequential time steps. If two gates act on different qubits, they can execute in the same time step (same layer), reducing the depth without reducing the gate count. For example, a circuit with 10 single-qubit gates on 5 different qubits has 10 total gates but only depth 2, since 5 gates can execute in parallel per layer. Two-qubit gates further complicate depth calculation because they occupy two qubits simultaneously and may create dependencies that prevent parallelization. Optimizing circuit depth is essentially a scheduling problem that quantum compilers solve using dependency graph analysis.

What factors determine the execution time of a quantum circuit?

Circuit execution time depends on the depth, the duration of individual gate operations, and the degree of parallelization achieved. Single-qubit gates on superconducting platforms take about 20 to 50 nanoseconds, while two-qubit gates (like CNOT or CZ) require 100 to 500 nanoseconds. The total execution time is the sum of gate times across all layers, not the sum of all individual gate times, because parallel gates execute simultaneously. Additionally, measurement operations at the end of the circuit take about 300 to 1000 nanoseconds. Classical feedback operations in mid-circuit measurements add further latency. The total time must remain well within the qubit coherence time for results to be meaningful.

What is quantum volume and how does it relate to circuit depth?

Quantum Volume (QV) is a benchmark metric introduced by IBM that measures the largest square circuit (equal depth and width) a quantum computer can reliably execute. It is defined as QV = 2^n where n is the largest number of qubits for which a random circuit of depth n can be executed with heavy output probability greater than 2/3. Quantum Volume captures the interplay between qubit count, gate fidelity, connectivity, and compiler efficiency in a single number. A higher quantum volume means the device can run deeper circuits on more qubits with acceptable accuracy. Current leading quantum processors achieve quantum volumes from 64 to over 1000, corresponding to reliable execution of 6 to 10 qubit circuits at matching depth.

How does qubit connectivity affect circuit depth?

Qubit connectivity describes which pairs of qubits can directly interact via two-qubit gates. Limited connectivity (like the linear chain or grid topologies used in most superconducting processors) forces the compiler to insert SWAP gates to move qubit states adjacent to each other before executing required two-qubit gates. Each SWAP gate typically decomposes into three CNOT gates, significantly increasing both depth and gate count. A fully-connected topology (as available in some trapped ion systems) avoids this overhead entirely. For a circuit requiring long-range interactions on a grid topology, the routing overhead can increase depth by a factor of 2 to 5 times. Hardware-aware transpilation and qubit mapping algorithms are essential for minimizing this connectivity penalty.

What optimization techniques reduce quantum circuit depth?

Several techniques reduce circuit depth without changing the computation. Gate cancellation identifies adjacent gates that combine to identity or simpler operations. Commutation rules move gates past each other to create more parallel layers. Template matching replaces gate sequences with shorter equivalent sequences. Qubit routing algorithms minimize SWAP gate insertion through optimal initial qubit placement and intelligent routing strategies. Peephole optimization scans fixed-size windows of the circuit for local improvements. Unitary synthesis decomposes arbitrary multi-qubit operations into optimal gate sequences. For variational circuits, architecture search can find inherently shallower circuit structures. Modern quantum compilers like Qiskit, Cirq, and tket apply multiple optimization passes to significantly reduce depth from naive circuit descriptions.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy