Quantum Circuit Resource Estimation: Depth, Width, Gates, and Shots Explained
resource estimationcircuit depthquantum gatessimulatorscloud execution

Quantum Circuit Resource Estimation: Depth, Width, Gates, and Shots Explained

SSmart Qubit Editorial Team
2026-11-16
7 min read

A practical worksheet for estimating quantum circuit width, depth, gates, shots, simulator memory, transpiled overhead, runtime, and execution cost.

Quantum circuit resource estimation turns a vague question—“will this run?”—into a repeatable check. This guide explains how to measure circuit width, depth, gate counts, shots, simulator memory, transpiled operations, runtime, and likely execution cost before submitting a job, with worksheets and examples you can reuse across SDKs and backends.

Overview

A quantum circuit has several resource requirements, and no single number tells the whole story. A circuit may use few qubits but contain enough two-qubit operations to exceed a device’s practical coherence window. A simulator may handle the circuit’s depth comfortably but run out of memory because the state vector grows exponentially with the number of qubits. A hardware job may fit the backend’s limits but still require too many shots for a useful estimate.

Start by separating the original circuit from the circuit that will actually execute. Your source circuit describes the algorithm. Compilation or transpilation can then change its gate set, add routing operations, alter depth, and increase the number of two-qubit gates. Resource estimation should therefore be performed twice:

  • Logical estimate: the width, depth, gates, and measurements in the circuit you wrote.
  • Execution estimate: the resources after mapping to a simulator or target device.

The most useful quantities are:

  • Width: the number of qubits required, including ancillas and any unused-but-declared registers.
  • Depth: the number of sequential operation layers, rather than the total number of gates.
  • Gate count: total operations, with separate counts for one-qubit and two-qubit gates.
  • Shots: repeated circuit executions used to estimate measurement probabilities.
  • Memory: the approximate storage required by the selected simulation method.
  • Runtime and cost: the expected workload after compilation, queueing assumptions, and provider-specific pricing or limits are checked.

How to estimate

1. Count qubits and identify the layout

Record the number of algorithmic qubits, ancilla qubits, classical bits, and any required workspace. A circuit that encodes a data set may need more qubits than the model itself because of feature encoding, padding, labels, or temporary registers. Also record whether the target hardware has enough connected qubits for the circuit’s interaction pattern.

For a first-pass worksheet, use:

Width = algorithmic qubits + ancillas + workspace qubits

Do not assume that declaring a large register is harmless. Simulators and providers may treat the circuit width as a meaningful resource even when some qubits are idle.

2. Measure logical depth and gate counts

Depth describes the longest chain of dependent operations. Gates acting on separate qubits can often occupy the same layer, so depth is not equal to total gate count. Record total depth, one-qubit gate count, two-qubit gate count, and measurement operations separately.

Two-qubit gates deserve special attention because they are often more expensive on real hardware than single-qubit gates. They can also require routing operations when the circuit’s desired pair of qubits is not directly connected on the device. A useful worksheet row is:

  • Logical depth: ___
  • Logical one-qubit gates: ___
  • Logical two-qubit gates: ___
  • Measurements: ___
  • Barriers, resets, controls, and conditional operations: ___

When using an SDK such as Qiskit, inspect the circuit before and after transpilation. The exact reporting methods can change between releases, so use the installed version’s documentation and verify that the reported depth and operation counts refer to the object you intend to execute. The same principle applies to Cirq, PennyLane, and provider-specific compilation workflows.

3. Estimate simulator memory

For a full state-vector simulation, the state contains approximately 2n complex amplitudes for n qubits. If each complex value uses b bytes, a basic memory estimate is:

State-vector memory ≈ 2n × b bytes

With commonly used double-precision complex values, b is often 16 bytes, before accounting for framework overhead, temporary buffers, operating-system memory, and parallel execution. This is an estimate, not a guaranteed memory limit. A simulator using state-vector, stabiliser, tensor-network, matrix-product-state, or shot-based methods can have very different requirements.

For example, a 20-qubit state vector has 220 amplitudes. At 16 bytes per amplitude, the raw state data is about 16 MiB, before overhead. A 30-qubit state vector is roughly 16 GiB at the same precision, again before overhead. The important lesson is that adding a small number of qubits can multiply memory requirements rather than increase them linearly.

4. Account for shots and sampling

A shot is one repeated execution used to sample a circuit’s measurement outcome. If a circuit is run with S shots, the sampling workload is approximately:

Total circuit executions = number of circuit variants × S

“Circuit variants” may include parameter settings, observables, error-mitigation scale factors, calibration experiments, or separate training batches. A single circuit with 10,000 shots is a different workload from 100 parameterised circuits with 10,000 shots each.

More shots generally reduce sampling noise, but they do not correct coherent errors, poor connectivity, or an unsuitable ansatz. Choose shots according to the precision needed for the decision. For exploratory work, begin with a modest pilot, inspect the variance, and increase shots only when the result is stable enough to justify the extra workload.

5. Estimate execution time and cost cautiously

Separate the time spent compiling, waiting in a queue, executing, transferring results, and post-processing. A simple execution-only estimate is:

Execution time ≈ total circuit executions × average duration per execution

That duration depends on the backend, pulse-level scheduling, measurement and reset operations, batching, and provider rules. Queue time can dominate wall-clock time and is usually less predictable. For cloud cost, use the provider’s current pricing page or account dashboard rather than an old article. Record the date, backend, shot count, circuit count, and pricing unit alongside every estimate.

Inputs and assumptions

Create a resource-estimation worksheet before changing a circuit or backend. The following fields are sufficient for most development reviews:

InputWhat to record
Circuit versionCommit, notebook version, or experiment identifier
TargetSimulator or hardware backend and its compilation settings
WidthTotal qubits, ancillas, and classical bits
Logical operationsDepth, total gates, one-qubit gates, two-qubit gates, measurements
Transpiled operationsDepth and gate counts after target mapping
ShotsShots per circuit and number of circuit variants
Simulation methodState vector, sampling, stabiliser, tensor network, or other method
AssumptionsPrecision, memory ceiling, queue treatment, noise model, and pricing date

Keep the original and transpiled figures side by side. A large increase in depth or two-qubit gates indicates that connectivity, basis gates, optimisation settings, or the circuit structure may need attention. If a simulator fails despite a modest logical circuit, check hidden overhead, parallel worker allocation, precision, and the simulation method before concluding that the algorithm itself is too large.

Worked examples

Example 1: A small state-vector simulation

Suppose a circuit uses 18 qubits, has a logical depth of 42, includes 160 one-qubit gates and 36 two-qubit gates, and is sampled with 2,000 shots. The raw state-vector estimate at 16 bytes per amplitude is:

218 × 16 bytes = 4 MiB

This does not mean a machine with 4 MiB of free memory is sufficient. Runtime overhead, temporary arrays, the simulator process, and any parallel workers require additional capacity. The practical conclusion is that the state itself is relatively small, but you should still run a pilot and measure peak memory rather than relying solely on the formula.

Example 2: Transpilation changes the decision

Now consider a 12-qubit variational circuit with a logical depth of 25 and 20 two-qubit gates. After mapping to a constrained device, the transpiled circuit has a depth of 61 and 47 two-qubit gates because routing operations were inserted. The original circuit may look suitable when reviewed in isolation, but the transpiled version is the relevant one for hardware execution.

Record both versions, then compare whether the additional depth is acceptable under the target’s measured behaviour. If not, test a different qubit layout, reduce long-range interactions, optimise repeated blocks, or choose a circuit ansatz that matches the device connectivity. Hardware benchmarking and circuit optimisation should be treated as complementary steps, not separate afterthoughts.

Example 3: Shot multiplication in a hybrid workflow

A hybrid experiment evaluates 80 parameter settings, each with 4 observables and 1,500 shots. If every observable requires a separate circuit execution, the upper-bound workload is:

80 × 4 × 1,500 = 480,000 circuit executions

The actual workload may be lower if measurements are grouped or higher if the workflow adds gradient circuits, error-mitigation variants, or calibration runs. List every multiplier explicitly. This prevents an apparently small “1,500-shot experiment” from hiding a much larger job.

When to recalculate

Recalculate resource requirements whenever you change the circuit, target, or experiment design. In particular, repeat the worksheet before submitting a new job, increasing qubit count, adding an ansatz layer, changing measurement precision, switching simulation methods, or moving from a simulator to hardware.

Also revisit the estimate when a run fails, times out, produces unexpectedly large output, or shows a major difference between logical and transpiled depth. Provider limits, backend availability, compiler defaults, simulator implementations, and pricing models can change, so verify current documentation and account-specific limits rather than copying an old estimate. A quarterly review is a sensible maintenance habit for team playbooks.

For each run, save the circuit version, backend, compilation settings, logical metrics, transpiled metrics, shot calculation, memory assumption, and observed runtime. Compare prediction with outcome. Over time, these records create a practical benchmark for your own workloads and make estimates more reliable than generic rules of thumb.

Before pressing submit, ask five questions: Does the target have enough qubits? What are the transpiled depth and two-qubit count? Can the selected simulator fit within its real memory ceiling? How many circuit executions do the shots and workflow multiply into? Which provider limits, prices, and backend conditions need checking today? If you can answer all five, your resource estimate is ready to support an informed execution decision.

Related Topics

#resource estimation#circuit depth#quantum gates#simulators#cloud execution
S

Smart Qubit Editorial Team

Quantum Computing Editors

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.