Moving a circuit from a simulator to real quantum hardware is not a simple progression from development to production. The right decision depends on what you need to learn: whether the circuit is logically correct, how it behaves under realistic noise, or whether a specific device can produce a useful result within your time and budget. This workflow helps developers choose an execution path, estimate the main costs, and validate hardware results without confusing simulation differences with software defects.
Overview
A quantum simulator and a quantum processor answer different questions. A simulator is usually the fastest place to check circuit construction, inspect amplitudes or probabilities, compare algorithm variants, and build repeatable tests. Real quantum hardware is necessary when device-specific behavior matters, including calibration effects, connectivity constraints, gate errors, readout errors, scheduling, and hardware-access requirements.
The practical workflow is to move through increasingly realistic execution stages rather than submitting an untested circuit directly to a device:
- Validate the logic. Run a small circuit on an ideal statevector simulator when full-state information is useful.
- Validate the measurement interface. Use a shot-based simulator and inspect the distribution of measured outcomes.
- Model expected imperfections. Add a noise model or emulator where the SDK and backend information support one.
- Compile for the target. Transpile the circuit, inspect gate counts and depth, and verify qubit mapping.
- Run a controlled hardware experiment. Use a fixed circuit version, a documented shot count, and suitable controls.
- Compare and interpret. Separate algorithmic behavior, compilation changes, sampling variation, and hardware noise.
This staged approach applies across common quantum SDKs and cloud platforms. The exact commands, backend names, limits, access methods, and pricing models vary, so treat provider documentation and the selected backend metadata as part of the experiment record. For broader tool selection, see Qiskit vs Cirq vs PennyLane: Which Quantum SDK Should Developers Use?.
| Execution stage | Best question to answer | Main limitation |
|---|---|---|
| Ideal statevector simulation | Is the circuit logic producing the intended quantum state? | It may not scale to larger circuits and does not represent hardware noise by default. |
| Ideal shot-based simulation | What measurement distribution should the program produce? | Sampling variation is represented, but device-specific errors may not be. |
| Noisy simulation or emulator | How might known error mechanisms affect the result? | The model is an approximation and may not match a live device. |
| Real quantum hardware | How does this compiled circuit behave on a particular processor? | Queue time, execution cost, drift, limited connectivity, and noise complicate comparisons. |
How to estimate
Estimate a hardware run as an experiment, not just as a circuit submission. Before choosing a backend, define the output you need and the minimum evidence that would support a conclusion.
1. Define the measured quantity
Decide whether you need a complete probability distribution, a single expectation value, a success rate, an optimization objective, or a comparison between two circuits. This choice affects the number of measurements, the number of circuit variants, and the amount of post-processing required.
2. Count executions rather than only circuits
A useful first estimate is:
Total shots = circuit variants × shots per variant × repetitions
Circuit variants can include parameter settings, calibration controls, measurement-error controls, and several transpiled versions. If an algorithm evaluates a parameterized circuit many times, count every submitted instance. In hybrid quantum-classical computing, the optimizer can make this total much larger than the number of circuits in the source file.
For a provider that charges for usage, a planning estimate can be expressed as:
Estimated execution cost = billable unit price × billable usage
Do not insert a generic price into this formula. Record the provider, region or account context where relevant, billing unit, minimum charge if applicable, and the date checked. Queue time may also have an operational cost even when it is not a direct invoice item.
3. Compare like with like
Run the same logical circuit through the same compilation settings before comparing an ideal simulation, a noisy simulation, and hardware. If the hardware path changes the circuit substantially during transpilation, compare both the pre-transpilation circuit and the final executable circuit. Record depth, two-qubit gate count, total gate count, and physical-qubit mapping when the SDK exposes them.
4. Use controls and repeated runs
Include a small control circuit with an expected result, a baseline implementation, or a deliberately simple reference. Repeat the hardware run when possible, especially if the conclusion depends on a small difference. A single histogram can show what happened once; repeated runs provide better evidence about stability.
Inputs and assumptions
Keep the following inputs in a configuration file or experiment record so the estimate can be recalculated without reconstructing the project from memory.
- Circuit definition: SDK version, source revision, register layout, parameters, and measurement operations.
- Simulation mode: statevector, shot-based, stabilizer, tensor-network, or another supported method. Statevector simulation can provide full-state information, while shot-based simulation better reflects the sampling interface used on hardware.
- Shot count: shots per circuit variant and the reason that count is sufficient for the measured quantity.
- Noise assumptions: noise model source, error channels, parameter values, and whether the model is synthetic, backend-derived, or manually specified.
- Compilation: optimization level or equivalent settings, basis gates, routing method, coupling or connectivity constraints, and qubit mapping.
- Backend state: provider, backend identifier, availability, calibration timestamp if supplied, supported instructions, and relevant qubit or gate restrictions.
- Access and cost: account or project context, queue estimate, shot limits, reservation requirements, and the pricing unit checked at the time of planning.
- Validation method: ideal reference, noisy reference, classical baseline, statistical interval, or acceptance threshold.
Transpilation deserves special attention. A circuit that is short in abstract form may require additional routing operations on hardware with limited connectivity. Those added operations can change depth and error exposure. Never interpret a hardware result without retaining the compiled circuit or at least its key metrics.
Measurement error should be treated separately from gate and routing errors. If measurement mitigation is used, save the calibration circuits, calibration results, correction method, and any assumptions about when the calibration remains applicable. Mitigation can alter the reported distribution; it does not turn a noisy measurement into an exact result.
Worked examples
Example 1: Checking a small algorithm
Suppose a developer is implementing a four-qubit circuit and wants to confirm that a measured bit pattern is produced after a sequence of entangling gates. First, run an ideal statevector simulation to inspect the expected amplitudes. Next, run the same circuit with a fixed shot count and verify that the dominant outcomes match the statevector probabilities within an acceptable sampling range. At this point, real hardware is not yet necessary because the question is whether the circuit and measurement code are correct.
The next step is to transpile for a candidate backend and compare the compiled depth and two-qubit gate count with the original. If routing adds substantial operations, run a noisy simulation using a documented model before submitting to hardware. The hardware experiment should include the target circuit, a simple control, and the exact compiled configuration. If the control fails in an unexpected way, investigate the backend or measurement path before blaming the algorithm.
Example 2: Comparing two circuit implementations
Assume two circuits calculate the same logical quantity, but one uses fewer abstract gates while the other maps more naturally to the selected device. Do not choose based only on source-level gate count. Compile both circuits for the same backend, then compare executable depth, two-qubit operations, physical-qubit assignment, and estimated shots. Run both through ideal and noisy simulation, followed by hardware if the difference remains meaningful.
For a fair comparison, hold the measured quantity, shot allocation, parameter values, and analysis code constant. If one implementation is evaluated through an optimizer, use the same stopping rule and log every circuit submission. This creates a reproducible basis for deciding whether a hardware test is worth its queue and execution budget.
Example 3: Investigating a simulator-to-hardware discrepancy
When results disagree, use a fixed diagnostic order: confirm the qubit and classical-bit ordering, compare the transpiled circuit, check measurement placement, verify parameter binding, and compare shot counts. Then inspect noise assumptions, backend calibration information, readout effects, and any mitigation post-processing. A discrepancy is actionable only when the two execution paths are known to represent the same logical experiment.
The Quantum Circuit Testing and Debugging Checklist for Software Teams can support this diagnostic stage, while the Quantum Experiment Documentation Template helps preserve the inputs needed to reproduce it.
When to recalculate
Recalculate the workflow whenever an input that affects execution, interpretation, or cost changes. At minimum, revisit it in these situations:
- The provider changes pricing units, shot limits, access rules, or backend availability.
- You switch SDK versions, compilation settings, target devices, or qubit mappings.
- The circuit gains parameters, iterations, controls, mitigation steps, or additional observables.
- A backend’s calibration information, supported instruction set, connectivity, or queue conditions changes.
- A hardware result differs materially from simulation or from an earlier run.
- You move from a technical demonstration to an enterprise proof of concept with a defined budget or service-level expectation.
- New benchmark results change the acceptable error, runtime, or reproducibility threshold.
Before each hardware submission, run this short checklist: freeze the code revision; save the logical and compiled circuits; record the backend and access context; calculate total shots and expected billable usage; choose a control; define the comparison metric; and document the simulation baseline. After execution, save raw counts, metadata, calibration or mitigation inputs, and analysis output separately from the conclusions.
Review provider limits, simulator features, hardware access methods, pricing assumptions, and error-mitigation guidance whenever those details change, with a scheduled review at least every six months. For backend selection, pair this workflow with the Quantum Backend Selection Guide. The goal is not to run every circuit on real hardware; it is to run the smallest, best-controlled hardware experiment that answers a question simulation cannot.