Quantum circuit resource estimation helps you decide whether a circuit is suitable for a simulator, a quantum processor, or further optimization before spending time on execution. This guide provides a repeatable method for estimating qubits, circuit depth, gate counts, measurement shots, simulator memory, runtime, and noise exposure, with practical worksheets you can reuse when the circuit or hardware target changes.
Overview
A quantum circuit has several different resource requirements, and no single number describes its cost. A circuit may use few qubits but have enough depth to become unreliable on a noisy processor. Another may be shallow enough for hardware but require too much memory for a statevector simulator. Resource estimation is the process of measuring these requirements before execution and comparing them with the limits of a chosen backend.
The most useful quantities are:
- Logical qubits: The qubits explicitly used by the algorithm, including data, ancilla, and workspace qubits.
- Physical qubits: Hardware qubits required after accounting for connectivity, compilation, routing, calibration, and—when applicable—error correction.
- Circuit depth: The number of sequential layers required when gates that act on separate qubits can run in parallel.
- Gate counts: The total number of operations, especially one-qubit and two-qubit gates.
- Measurement shots: The number of repeated executions used to estimate probabilities or expectation values.
- Memory and runtime: The classical resources needed for simulation and the execution time expected from a simulator or quantum service.
- Noise exposure: The opportunity for errors caused by depth, gate operations, measurement, idle time, and device-specific effects.
These values should be recorded together. A gate count without depth can hide parallelism, while a qubit count without connectivity can underestimate the compiled circuit. Resource estimation is therefore a comparison exercise, not just a circuit-counting exercise.
How to estimate
1. Define the circuit version
Start with a fixed circuit configuration. Record the problem size, ansatz or algorithm variant, number of repetitions, data-encoding method, precision target, and whether measurements occur once or throughout the circuit. Resource numbers are meaningful only when the circuit version is clearly identified.
2. Count logical qubits
Count every qubit register, not only the register containing the final answer. Include ancillas, phase-estimation work registers, temporary qubits, and qubits introduced by a subroutine. If the circuit is parameterized, record how the count changes with the input size.
3. Measure depth and gate counts
Use the transpiled or compiled circuit when evaluating a hardware target. The original circuit expresses algorithmic intent; the compiled circuit reflects connectivity constraints, native gates, inserted swaps, basis changes, and scheduling. Record total gates, one-qubit gates, two-qubit gates, and any larger multi-qubit operations separately. Two-qubit operations usually deserve special attention because they can be more sensitive to hardware errors and connectivity than single-qubit operations.
Report both total depth and, where available, two-qubit depth. A circuit with many parallel single-qubit gates may have a large gate count but modest depth. Conversely, a long chain of two-qubit operations can create substantial exposure even when the total gate count appears small.
4. Estimate shots and execution volume
For a sampling task, execution volume is approximately:
Total circuit executions = number of circuit variants × shots per variant × repetitions.
For variational algorithms, the number of circuit variants may include one circuit for each parameter-shift derivative, observable term, or optimization step. This is often a larger cost driver than the depth of one individual circuit. Separate calibration, warm-up, and verification runs from production shots so the estimate remains auditable.
5. Estimate simulator memory
A full statevector simulator stores one complex amplitude for every basis state. The number of amplitudes is:
Amplitudes = 2n, where n is the number of simulated qubits.
Approximate memory is therefore:
Memory = 2n × bytes per complex amplitude.
The bytes per amplitude depend on the simulator's precision. Double-precision complex values require more memory than single-precision values, and practical jobs also need workspace for temporary arrays, circuit data, measurement results, and parallel execution. Treat the formula as a lower-bound estimate rather than a guarantee of total system memory. Shot-based or tensor-network simulators use different memory models and should be evaluated using their own documented assumptions.
6. Estimate runtime and noise exposure
For a simulator, runtime depends on qubit count, gate count, depth, simulation method, precision, parallelism, and whether gradients or many parameter settings are being evaluated. For hardware, a simple planning model is:
Runtime ≈ number of executions × time per execution + queue, setup, and result-processing overhead.
Do not treat circuit depth as a direct prediction of wall-clock time. Hardware schedules include gate durations, measurement time, resets, barriers, and idle periods. For noise planning, record depth, two-qubit gate count, measurement count, and estimated circuit duration. These are exposure indicators, not a universal error formula.
Inputs and assumptions
Use the following worksheet for each circuit and backend combination:
| Input | What to record | Why it matters |
|---|---|---|
| Problem size | Number of variables, data points, or bits | Shows how resources scale |
| Logical qubits | Data, ancilla, and workspace registers | Defines the algorithmic footprint |
| Compiled qubits | Qubits after mapping and routing | Captures hardware-specific overhead |
| Depth | Total and two-qubit depth | Indicates sequential exposure and scheduling cost |
| Gate counts | One-qubit, two-qubit, swaps, measurements | Supports optimization and noise analysis |
| Shots | Shots per circuit and total circuit variants | Determines sampling volume |
| Simulator method | Statevector, stabilizer, tensor network, or shot-based | Changes memory and runtime behavior |
| Precision | Single, double, or other supported mode | Changes memory and sometimes accuracy |
| Backend assumptions | Connectivity, native gates, limits, queue model | Prevents estimates based only on abstract circuits |
Keep the original circuit metrics and compiled metrics in separate columns. This makes optimization results easier to interpret: a rewrite may reduce abstract depth but produce no hardware improvement, or it may leave the logical circuit unchanged while reducing routing overhead.
Worked examples
Example 1: Statevector simulation
Assume a circuit uses 20 qubits, has a logical depth of 80, and is evaluated with 1,000 shots. If the simulator stores a full statevector, it must represent 220 complex amplitudes. The memory estimate is 220 multiplied by the simulator's bytes per complex amplitude, plus workspace and operating-system overhead. Before launching the job, compare that estimate with available RAM and leave headroom for parallel processes. If memory is marginal, consider reducing the qubit count, using a different simulation method, or running smaller problem instances.
Example 2: Hardware sampling
Suppose a variational experiment has 12 logical qubits, 50 parameter settings, 2,000 shots per setting, and three circuit variants for each setting. The planned volume is 50 × 2,000 × 3, or 300,000 circuit executions, before calibration and validation runs. If compilation adds swap gates and increases depth from 60 to 110, record both versions. The added depth may affect noise exposure and execution time even though the logical algorithm has not changed.
Example 3: Comparing two circuit versions
Version A has fewer total gates but poor parallelism; Version B has more one-qubit gates arranged in parallel and fewer two-qubit gates. Do not select A from gate count alone. Compare logical qubits, compiled qubits, total depth, two-qubit depth, two-qubit count, shots, estimated runtime, and the quality of the final observable under the same measurement budget. The best version is the one that meets the accuracy objective with an acceptable resource profile on the selected target.
When to recalculate
Recalculate resource requirements whenever you change the problem size, ansatz depth, data-encoding circuit, observable grouping, shot budget, simulator method, numerical precision, compiler settings, or hardware target. A new backend can change connectivity, native gates, scheduling, measurement behavior, and available qubit count. SDK and transpiler releases can also alter the compiled circuit, so do not assume that an old gate report still describes a current run.
For an ongoing project, save a resource report with the circuit version, framework version, compiler options, backend name, timestamp, and assumptions. Compare reports after every meaningful optimization. Before execution, check backend limits and simulator requirements against the latest documentation rather than relying on a remembered specification.
As a practical next step, create a small table with one row per circuit version and columns for logical qubits, compiled qubits, depth, two-qubit gates, shots, memory estimate, runtime estimate, and noise indicators. Use that table to reject infeasible designs early, then validate the most promising candidate with a small pilot run. This turns quantum circuit resource estimation from a one-time guess into a repeatable developer workflow.