Choosing a quantum simulator is less about finding one universal “best” option and more about matching the simulator to your circuit, noise model, hardware question, and budget. This quantum simulator comparison explains how statevector, shot-based, tensor-network, and cloud options behave, then gives repeatable estimates for memory, runtime, shots, and cost before you start a run.
Overview
A quantum simulator is a classical program that approximates the behavior of a quantum circuit. It can help you learn quantum programming, validate circuit logic, test noise assumptions, prepare jobs for hardware, or benchmark an algorithm without consuming access to a quantum device.
The main simulator families have different strengths:
- Statevector simulators calculate the full complex amplitude vector for a pure quantum state. They are useful for inspecting amplitudes and verifying small, ideal circuits, but memory requirements grow exponentially with the number of qubits.
- Shot-based simulators execute a circuit repeatedly and return sampled measurement results. They resemble the way many hardware experiments are evaluated and are the natural choice for testing finite-shot effects.
- Noisy simulators add a configurable error model, such as gate, readout, relaxation, or depolarizing errors. Their value depends on whether the model reflects the question you are asking; a detailed-looking noise model is not automatically a realistic one.
- Tensor-network simulators represent a circuit as interconnected tensors. They can handle some larger, structured circuits efficiently, especially when entanglement remains limited, but performance can deteriorate as entanglement and contraction complexity increase.
- Cloud simulators provide remote classical simulation through a provider platform. They may offer managed environments, GPUs, workflow integration, or a convenient path from simulation to hardware, but usage limits, queue behavior, interfaces, and pricing require checking before each project.
Common developer interfaces include Qiskit Aer, Cirq-compatible simulators, PennyLane backends, and cloud SDKs such as Amazon Braket. The interface matters, but the underlying simulation method matters more. A familiar API cannot remove the memory or computational cost of the selected method.
How to estimate
Start with four quantities: qubit count, circuit depth, number of circuit variants, and shots per variant. Then identify whether you need amplitudes, measurement samples, noise, gradients, or hardware-like constraints.
1. Estimate statevector memory
A pure state of n qubits contains 2n complex amplitudes. If each complex amplitude uses 16 bytes, a first-order memory estimate is:
memory ≈ 16 × 2n bytes
This estimate excludes workspace, indexing, buffers, and framework overhead. For example, 20 qubits require roughly 16 MiB for the amplitude array alone, while 30 qubits require roughly 16 GiB. The exponential relationship is the important planning signal: adding one qubit approximately doubles the statevector storage.
A density-matrix simulation is more demanding because it represents 2n by 2n entries. With 16-byte complex entries, a rough estimate is:
memory ≈ 16 × 4n bytes
Use this only as a planning approximation. Actual feasibility depends on precision, GPU memory, parallelization, and simulator implementation.
2. Estimate shot work
For sampled results, calculate the total number of circuit executions:
total shots = circuit variants × shots per variant
“Circuit variants” includes parameter settings, observables, measurement bases, noise configurations, and optimization iterations. A variational algorithm with 100 parameter updates and 40 measured observables may represent 4,000 distinct circuit-observable evaluations before multiplying by the shots assigned to each one.
3. Estimate cloud usage
Do not estimate cloud work from qubit count alone. Record the provider’s current billing unit and multiply it by the quantities that platform uses, such as tasks, executions, shots, simulator time, storage, or accelerator time. Keep provider pricing separate from your scientific estimate so a pricing change does not invalidate the experimental design.
For a fair comparison, run the same circuit, precision, shot count, and measurement task across candidates. Record wall-clock time, peak memory, compilation time, failed jobs, and result agreement. A simulator that is faster for one circuit family may be a poor choice for another.
Inputs and assumptions
Before choosing a simulator, write down the following inputs:
- State representation: Decide whether you need a statevector, density matrix, samples, expectation values, or tensor contractions.
- Qubit count: Include ancillary, workspace, and error-correction demonstration qubits, not only the logical problem register.
- Depth and gate structure: Long circuits, dense entanglement, mid-circuit measurement, resets, and controlled operations can change performance substantially.
- Noise requirement: Use an ideal simulator for logic checks, a configurable noise model for sensitivity analysis, and hardware validation when device-specific behavior matters.
- Precision: Single precision may reduce memory, while double precision can be useful for numerical validation. Treat this as an experimental choice, not a universal default.
- Hardware available: Note CPU cores, system RAM, GPU type and memory, and whether the simulator supports the required accelerator.
- Reproducibility: Fix random seeds where supported, record software versions, save circuit definitions, and preserve noise-model parameters.
- Budget and access: Include queue time, data transfer, task limits, credits, and provider-specific restrictions in a cloud estimate.
For hybrid quantum-classical workflows, also estimate optimizer iterations and gradient evaluations. Automatic differentiation can require multiple circuit executions per parameter, depending on the differentiation method and backend. A small circuit can therefore create a large workload when embedded in an optimization loop.
Worked examples
Example 1: Learning and debugging a small circuit
Suppose you are building a quantum circuit tutorial with 12 qubits and want to inspect amplitudes after each major step. A statevector simulator is a sensible first choice because the circuit is small enough for local experimentation and the amplitude representation directly supports debugging. Use ideal execution first, then repeat with shots if the final application reports measurement frequencies.
At this stage, a cloud simulator adds little unless your goal is specifically to test provider workflows. Local execution usually makes iteration easier because you can change gates, print intermediate results, and rerun without managing remote jobs.
Example 2: Testing a noisy variational workflow
Assume a variational circuit has 16 parameter settings, 8 measured observables, and 2,000 shots per circuit-observable evaluation. The basic shot estimate is:
16 × 8 × 2,000 = 256,000 shots
If the optimizer takes 50 iterations, the same measurement plan could require approximately 12.8 million shots, before accounting for extra evaluations used by the gradient method. This is a case where shot-based noisy simulation is more informative than a single ideal statevector calculation. Consider measurement grouping to reduce repeated work; the Pauli grouping tutorial provides a practical starting point.
Example 3: A larger structured circuit
Suppose a circuit has more qubits than your workstation can comfortably store as a statevector, but its entanglement pattern is limited and regular. A tensor-network simulator may be worth testing. Do not assume it will scale simply because the qubit count is higher: benchmark a representative circuit, measure peak memory and runtime, and compare its output against a smaller statevector instance.
When the purpose is hardware preparation, follow the local simulation with provider validation. Use the same transpiled circuit where possible, document changes introduced by compilation, and compare distributions or expectation values rather than relying on visual similarity alone. For state reconstruction, see the quantum state tomography tutorial.
When to recalculate
Revisit your simulator decision before every substantial project run and whenever any of these inputs changes:
- the SDK, simulator, compiler, GPU stack, or provider platform version;
- the qubit count, circuit depth, ansatz, observable set, or number of optimizer iterations;
- the noise model, precision setting, shot count, or differentiation method;
- available local memory, GPU hardware, cloud quotas, or provider pricing;
- the target changes from algorithm debugging to hardware prediction;
- your benchmark circuit no longer resembles the production workload.
Keep a small benchmark suite under version control. Include an ideal statevector test, a shot-based test, a noisy test if relevant, and a representative tensor-network or cloud test. Record software versions, hardware, seeds, runtime, memory, shots, and numerical differences. Recalculate the statevector and shot estimates first; these simple formulas often reveal an impractical plan before a long job begins.
A practical selection rule is straightforward: use a local statevector simulator for small ideal circuits and inspection, shot-based simulation for measurement behavior, noisy simulation for controlled sensitivity studies, tensor networks for circuits whose structure supports them, and cloud platforms when managed scale, provider integration, or hardware comparison justifies the added operational cost. Then validate the choice with a representative benchmark rather than a generic qubit-count claim.