Quantum Circuit Resource Estimation: Count Qubits, Depth, Gates, and Execution Cost
quantum-circuitsresource-estimationcircuit-depthquantum-costsquantum-developer-tools

Quantum Circuit Resource Estimation: Count Qubits, Depth, Gates, and Execution Cost

QQubit Daily Editorial Team
2026-11-17
8 min read

Learn how to estimate qubits, depth, gates, shots, runtime, memory, and execution cost before running a quantum circuit.

Quantum circuit resource estimation helps you decide whether an experiment fits a simulator, a target backend, or a practical execution budget before you submit it. This guide provides a repeatable worksheet for estimating qubits, circuit depth, gate counts, connectivity overhead, shots, memory, and runtime, with assumptions you can update as your circuit and provider change.

Overview

A circuit can look small in source code but become substantially larger after compilation. A high-level operation may decompose into several hardware-native gates, and a circuit designed for all-to-all connectivity may need additional routing operations on a device with limited connections. Resource estimation should therefore be performed at more than one level.

Start with the algorithmic circuit, which describes the operations you intended to run. Then inspect the transpiled or compiled circuit, which reflects a selected basis gate set, qubit layout, coupling map, optimization setting, and scheduling strategy. The second estimate is usually more useful for hardware planning.

The main quantities to record are:

  • Logical qubits: the qubits explicitly required by the algorithm, including work, ancilla, and output qubits.
  • Physical qubits: the device qubits allocated after mapping. This can exceed the logical count because of layout constraints or error-correction overhead.
  • Gate count: the total number of operations, preferably separated into one-qubit and two-or-more-qubit gates.
  • Circuit depth: the number of sequential layers under the chosen scheduling or gate model.
  • Shots: the number of repeated circuit executions used to estimate measurement probabilities or expectation values.
  • Execution time and cost: an estimate based on gate duration, reset and measurement overhead, queue behavior, provider billing terminology, and any usage limits.

These figures are not a guarantee of performance. They are planning inputs that let you compare circuit revisions, reject unsuitable backends early, and identify which optimization is worth testing next.

How to estimate

1. Define the experiment, not just the circuit

Write down the task, input size, precision target, number of parameter settings, observables, and repetitions. A variational algorithm may use one circuit structure but execute it many times with different parameters. A sampling algorithm may require fewer circuit variants but many shots per variant.

A useful first-order execution count is:

Total circuit executions = circuit variants × parameter settings × shots

Add separate terms for calibration circuits, measurement-basis rotations, noise-scaling experiments, or validation runs. If an error-mitigation workflow evaluates several modified circuits, include each of them rather than treating mitigation as free.

2. Count logical qubits

Count every qubit that exists at the same time during the computation. Include data qubits, ancillas, workspace registers, phase-estimation registers, slack variables, and any qubits introduced by the chosen construction. Do not count a qubit twice merely because it is reset and reused; do count it if the algorithm requires additional qubits simultaneously.

Record peak logical width rather than only the width at circuit creation. A reusable register can reduce peak usage, while an algorithm that stores intermediate information may increase it.

3. Measure the uncompiled circuit

Inspect the original circuit for total operations, two-qubit operations, depth, and measurements. Separate gate families where possible. Two-qubit gates often deserve their own column because they can drive routing overhead and have different duration or error characteristics from single-qubit gates.

For a parameterized circuit, inspect one representative structure and record how many times that structure will be executed. For QAOA, for example, the number of rounds can increase both the depth and the number of entangling operations. For VQE, ansatz repetitions and Hamiltonian measurement groups can dominate the execution count.

4. Compile for a specific target

Resource estimates become meaningful only when the target assumptions are explicit. Select a backend or simulator configuration, then compile with a stated optimization level, basis gate set, qubit connectivity model, and initial layout policy. Save the compiled circuit rather than relying on a summary displayed during an interactive session.

Repeat the inspection after compilation. Compare:

  • logical width versus allocated physical width;
  • original gates versus native gates;
  • original depth versus compiled depth;
  • original two-qubit count versus compiled two-qubit count; and
  • ideal all-to-all assumptions versus the selected device connectivity.

Most quantum SDKs provide circuit inspection, drawing, depth, operation-count, and backend-configuration features. The exact function names vary by SDK version, so treat generated reports and transpiler output as the source of record rather than copying a command without checking its installed documentation.

5. Estimate time and cost in layers

Use a transparent model instead of a single unexplained runtime number. A simple device-time estimate is:

Device time ≈ total executions × (scheduled circuit duration + reset time + measurement time) + setup overhead

If gate durations are available, approximate scheduled circuit duration by summing layers rather than individual gates. Gates in the same layer may run concurrently, while operations on the same qubit must remain sequential. If durations are unavailable, report a range or leave this part as an assumption.

For cost, first identify whether the provider measures usage by shots, circuits, execution time, job size, or another unit. Then apply the applicable rate only after confirming the current terms. Keep monetary estimates separate from device time because queue time, subscription allowances, minimum charges, and provider-specific accounting may not map directly to physical execution time.

Inputs and assumptions

Use a worksheet with one row per circuit variant and these columns:

  • algorithm and input size;
  • logical qubits and peak physical qubits;
  • one-qubit, two-qubit, and total compiled gates;
  • compiled depth and estimated circuit duration;
  • parameter settings, observables, and shots;
  • number of mitigation, calibration, or validation circuits;
  • total executions;
  • backend or simulator configuration;
  • compiler version, optimization settings, and layout assumptions; and
  • runtime and pricing assumptions, including the date checked.

Keep logical and physical resources separate. Logical qubit count answers “what does the algorithm require?” Physical qubit count answers “what does this target need after mapping?” If fault-tolerant execution is part of the plan, a logical-to-physical conversion requires an error-correction model and should be reported as a scenario, not as an exact universal multiplier.

Memory limits matter for simulators. A full state-vector simulation generally grows exponentially with the number of qubits, so record the simulation method, precision, available memory, and whether the circuit uses features such as noise models or tensor-network approximations. Do not assume that a circuit that fits on a hardware backend will fit in a local state-vector simulator.

Shot estimates should match the decision you need to make. More shots can reduce sampling uncertainty, but the required number depends on the observable, variance, confidence target, and whether many quantities are being estimated. Use a pilot run to measure variance when possible, then revise the shot budget rather than selecting a round number by habit.

Worked examples

Example 1: A small sampling circuit

Suppose an algorithm uses 6 logical qubits and produces one circuit variant. Its uncompiled circuit has 6 single-qubit gates, 5 two-qubit gates, and depth 8. You plan to collect 2,000 shots. The first worksheet entry is therefore 6 logical qubits, 11 listed gates, depth 8, and 2,000 executions.

After compilation to a restricted connectivity target, assume the report shows 7 physical qubits, 18 single-qubit gates, 12 two-qubit gates, and depth 15. The hardware estimate should use the compiled figures: 7 physical qubits, 30 total native gates, depth 15, and 2,000 shots. The increase identifies routing and decomposition as the main optimization targets. A different initial layout or circuit reformulation may be more valuable than reducing single-qubit gates.

Example 2: A variational workflow

Now consider an ansatz with one circuit structure, 40 parameter settings, and 800 shots per setting. If the Hamiltonian is evaluated through 12 measurement groups, the simple execution estimate is:

1 circuit structure × 40 parameter settings × 12 groups × 800 shots = 384,000 executions

If each optimization step evaluates two parameter points and the workflow runs for 25 steps, the estimate becomes 19.2 million circuit executions before adding validation or mitigation. The circuit may be shallow, but the experiment can still be operationally large. This is why gate count alone is not a sufficient resource estimate for VQE-style workflows.

Record these as separate levers: reduce ansatz depth, reduce measurement groups, reduce parameter evaluations, improve stopping criteria, or establish a shot-allocation rule. Each change affects accuracy and should be tested against the project’s required result quality.

When to recalculate

Recalculate whenever an input that affects execution changes. At minimum, repeat the estimate when you:

  • change the backend, coupling map, basis gates, layout, or compiler settings;
  • increase qubit count, ansatz repetitions, QAOA rounds, or problem size;
  • add observables, measurement groups, calibration circuits, or error mitigation;
  • change the shot budget or statistical precision target;
  • move from an ideal simulator to a noisy simulator or hardware run;
  • change SDK, transpiler, runtime, or provider configuration versions; or
  • review execution pricing, quotas, billing units, or usage policies.

Before submission, run a final checklist: inspect the compiled circuit, confirm the peak physical width, verify the two-qubit count and depth, multiply all circuit variants by their shots, check simulator memory if applicable, and attach the assumptions and inspection date to the experiment record. After the first pilot run, compare estimated and observed execution behavior, then update the worksheet with measured duration, queue-independent device time where available, sampling variance, and any compilation changes.

A resource estimate is most useful as a living developer artifact. Keep the original algorithmic estimate, the latest target-specific compiled estimate, and the observed pilot result together. That record makes circuit revisions easier to compare and gives the next experiment a defensible starting point.

Related Topics

#quantum-circuits#resource-estimation#circuit-depth#quantum-costs#quantum-developer-tools
Q

Qubit Daily Editorial Team

Quantum Technology 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.