Running a quantum circuit is usually a staged engineering task, not a single button click. This guide shows how to choose between a local simulator, a hosted simulator, and real quantum hardware; estimate time and usage before submitting jobs; and record enough detail to reproduce the result when a provider, backend, or queue changes.
Overview
For most developers, the right quantum hardware workflow begins locally and moves outward only when the circuit is ready. A local simulator is useful for fast iteration, assertions, and debugging. A hosted simulator adds cloud authentication, job management, and provider-specific execution behavior. A real device introduces hardware noise, queueing, calibration effects, device constraints, and potentially usage charges or account limits.
These options answer different questions:
- Local simulator: Does the circuit implement the intended logic?
- Hosted simulator: Does the circuit run correctly through the target cloud workflow?
- Real hardware: How does the compiled circuit behave under physical-device conditions?
The distinction matters because a clean simulator result does not prove that a circuit will produce the same distribution on hardware. Conversely, a noisy hardware result does not necessarily mean the algorithm is incorrect. Treat execution as a pipeline: validate, compile, submit, inspect, and document.
| Execution option | Setup effort | Queue behavior | Noise | Best use |
|---|---|---|---|---|
| Local simulator | Low after installation | Usually no provider queue | Optional or modelled | Unit tests, debugging, small circuit experiments |
| Hosted simulator | Moderate; account and credentials may be required | Depends on service and workload | Usually configurable or provider-defined | Cloud integration, larger runs, workflow testing |
| Real quantum device | Moderate to high | Commonly scheduled through a queue | Present and hardware-dependent | Noise studies, device-aware experiments, validation under physical conditions |
Provider terminology changes over time, so check the current documentation for the SDK you use. An accessible glossary of quantum computing terms can help when a platform uses different names for jobs, tasks, circuits, shots, backends, or devices.
How to estimate
Before submitting a job, estimate three things: execution volume, practical runtime, and expected cost or quota consumption. Exact billing rules vary by provider and account, so use the provider's current calculator or pricing documentation for monetary figures. The formulas below are deliberately provider-neutral.
1. Estimate the number of circuit executions
For a single circuit, the basic execution count is the number of requested shots:
Total executions = number of circuits × shots per circuit × number of parameter settings
For example, a parameterized circuit evaluated at 20 parameter settings with 500 shots per setting requires 10,000 circuit executions before accounting for retries or calibration runs. If your application evaluates several circuit variants, include every variant in the circuit count.
2. Estimate elapsed time
Separate computation time from service time. A local run may be dominated by simulation complexity and memory. A cloud run can include authentication, compilation, submission, queue waiting, execution, and result retrieval.
A useful planning model is:
Elapsed time = client preparation + compilation + queue wait + device execution + result retrieval
You may know only some of these values in advance. Record a range rather than a falsely precise number. Queue time is often the least predictable input, while device execution time can be small relative to waiting and network overhead.
3. Estimate cost or quota use
Use the provider's current rules to map your workload to a bill or quota. A generic model is:
Estimated usage = billable units per circuit × number of circuits × shots or execution multiplier
Do not assume that all providers bill the same way. Some workflows may distinguish simulator usage from hardware usage, charge by a task or execution unit, impose shot limits, or apply account-specific quotas. Treat the formula as a worksheet structure, not a statement about any particular platform.
4. Estimate result quality
For a simulator, define whether you need an exact statevector, a probability distribution, or sampled counts. On hardware, plan for repeated shots and compare the observed distribution with an ideal or noise-modelled reference. Useful comparison measures include the most likely bitstrings, expectation values, success probability, and distance between distributions. Pick a metric before running the experiment so that you do not evaluate results opportunistically.
Inputs and assumptions
Create a small execution record for every experiment. The following inputs are enough for a practical first estimate:
- Circuit size: qubit count, depth, gate types, measurement layout, and whether mid-circuit operations are used.
- Workload shape: number of distinct circuits, parameter values, observables, and shots per circuit.
- Execution target: local simulator, hosted simulator, or named hardware family and backend.
- Compilation settings: SDK version, optimization level, coupling or connectivity assumptions, and any custom transpilation passes.
- Noise assumptions: ideal simulation, a selected noise model, or physical-device execution.
- Access constraints: authentication method, available credits or quota, shot limits, maximum circuit size, and expected queue policy as shown in the current provider documentation.
- Reproducibility controls: random seeds where supported, source revision, dependency lockfile, circuit definition, and submission timestamp.
Keep ideal validation separate from hardware validation. First verify small cases with assertions and known outputs. Then transpile for the selected target and inspect the resulting depth, two-qubit gate count, measurements, and layout. Finally, run a small hardware pilot before scaling the full workload.
For debugging, prefer the cheapest and most observable environment. The quantum circuit debugging guide covers the reasoning behind this separation. Developers comparing frameworks can also review Qiskit and Cirq or the broader Qiskit, Cirq, and PennyLane comparison before committing to an SDK.
Worked examples
Example 1: validating a small circuit locally
Suppose you are testing a circuit with four qubits and two measurement points. You create five circuit variants and request 1,000 shots for each. The planned workload is 5,000 sampled executions. Because this is a local simulator, the main inputs are circuit complexity, simulator method, available memory, and whether you need sampled counts or an exact representation.
Start with a small shot count while checking gate order, measurement mapping, and expected bitstrings. Once the assertions pass, increase shots to study sampling variation. There is no reason to send this stage to hardware: it is a software correctness test.
Example 2: moving the same circuit to a hosted simulator
Now run the five variants through a cloud SDK. The circuit count remains 5, and the requested shots remain 1,000 per circuit, but the workflow gains authentication, serialization, compilation, submission, polling, and result retrieval. Record the provider, backend or simulator name, SDK version, compilation options, and job identifiers.
Compare the hosted result with the local reference. If they differ, investigate representation conventions, endianness, measurement order, random seeds, compiler transformations, and simulator method before concluding that the algorithm changed.
Example 3: a hardware pilot
Before submitting the complete experiment, select a small representative subset. Include a baseline circuit, a known simple state, and the circuit pattern that matters most to your application. Run enough shots to observe a distribution, then compare ideal, noise-modelled, and hardware results.
Use the pilot to measure practical variables: queue delay, compiled depth, two-qubit gate count, error-sensitive outputs, and result stability across repeated submissions. If the pilot is not interpretable, scaling it will usually produce more data rather than better evidence. The Amazon Braket workflow tutorial provides a useful example of the simulator-to-device progression, while provider-specific instructions should be checked before execution.
When to recalculate
Recalculate your estimate whenever an input that affects execution changes. In practice, revisit it when you change the circuit depth, add parameter settings, increase shots, switch simulation methods, select a different backend, or alter compilation settings. Also recalculate when a provider changes pricing inputs, quotas, shot limits, access requirements, backend terminology, or queue behavior.
Use this checklist before each new experiment:
- Count circuits, parameter settings, and shots.
- Choose the least expensive environment that can answer the current question.
- Validate the circuit and measurements locally.
- Compile for the target and inspect the transformed circuit.
- Check current access, quota, pricing, and backend documentation.
- Run a small pilot before a large hardware submission.
- Save code, versions, settings, job identifiers, outputs, and assumptions.
- Compare results against a defined reference and record the interpretation.
Revisit your workflow on a scheduled review, and immediately after major platform changes. This keeps a quantum hardware access estimate useful rather than tied to an outdated interface or assumption. For a broader learning sequence, connect this process with the quantum computing roadmap for software engineers: learn the circuit model locally, practice compilation and debugging, then use cloud hardware when it answers a question that simulation cannot.