Quantum measurements are samples, not exact answers. This guide shows how to plan a shot budget, estimate expectation-value uncertainty, compare results responsibly, and decide when additional runs are worth the cost on a simulator or quantum processor.
Overview
A shot is one execution of a quantum circuit followed by measurement. If a circuit is run 1,000 times, the resulting bit strings form an empirical distribution. Increasing the number of shots usually makes that distribution more stable, but it does not automatically remove hardware noise, calibration drift, readout error, or a flawed circuit.
The practical question is therefore not “How many shots should every experiment use?” It is “How much statistical precision does this decision require?” A quick demonstration may need only enough shots to reveal a strong pattern. A variational algorithm, benchmark, or backend comparison needs a declared precision target and a repeatable method for judging uncertainty.
For a single measured bit, let p be the probability of observing 1 and let p̂ be the observed fraction of ones. Under independent sampling, the standard error of p̂ is approximately:
SE(p̂) = √[p̂(1 − p̂) / N]
Here, N is the shot count. The uncertainty is greatest near p = 0.5 and smaller when the outcome is close to 0 or 1. That does not mean extreme results are automatically trustworthy: rare outcomes require enough shots to be observed at all, and systematic measurement errors are not fixed by repeating the same circuit.
For background on how measurement relates to qubit states, see What Is a Qubit? Superposition, Measurement, and Entanglement Explained.
How to estimate
1. Define the measured quantity
Start with the output you will use. It may be a bit-string probability, the probability of success, or an expectation value such as the average of an observable. A clear target prevents you from allocating shots based only on the number of qubits.
For a binary observable with outcomes +1 and −1, estimate the expectation value by assigning +1 or −1 to each result and averaging:
Ê = (number of +1 outcomes − number of −1 outcomes) / N
For this common case, the estimated standard error can be written as:
SE(Ê) = √[(1 − ʲ) / N]
If you want an approximate two-sided confidence interval, use:
estimate ± z × SE
The multiplier z depends on the confidence level and the approximation being used. In practice, choose the confidence level before inspecting results, and state whether the interval is approximate. For small samples or probabilities near zero and one, a binomial interval designed for bounded data is generally preferable to a simple normal approximation.
2. Work backward from precision
For a binary expectation value, a conservative planning approximation uses the worst-case variance:
N ≈ (z / ε)²
Here, ε is the desired half-width of the interval and z is the selected confidence multiplier. This is a planning estimate, not a guarantee of total experimental accuracy. It addresses sampling uncertainty only.
For example, if the requirement is an approximate half-width of 0.05, the shot budget scales as 1 divided by 0.05 squared. Reducing the target half-width by half requires roughly four times as many shots. This quadratic relationship is one of the most useful facts for quantum shot allocation.
3. Allocate shots across terms
Many algorithms estimate an energy or score as a weighted sum of Pauli terms:
E = Σᵢ wᵢ⟨Pᵢ⟩
Each term may require a separate measurement circuit or commuting measurement group. If term i receives Nᵢ shots and has estimated variance σᵢ², the approximate variance of the weighted sum is:
Var(E) ≈ Σᵢ wᵢ²σᵢ² / Nᵢ
This suggests giving more shots to terms with large weights or high variance. A simple first pass is to divide shots evenly, run a pilot measurement, and then reallocate toward terms that contribute most to the uncertainty. If you have reliable variance estimates, an allocation proportional to |wᵢ|σᵢ is a useful starting point. Recheck the result after allocation rather than treating the formula as a substitute for validation.
This approach is especially relevant to VQE and QAOA workflows. The VQE tutorial and QAOA tutorial for Max-Cut provide useful algorithm context; shot planning should be added to their evaluation step.
Inputs and assumptions
Record the following inputs before execution:
- Observable: the probability, parity, expectation value, or score being estimated.
- Precision target: the acceptable half-width or maximum standard error.
- Confidence level: the confidence convention used for intervals and comparisons.
- Number of circuits or Pauli terms: include measurement groups, not just the logical circuit count.
- Initial shot allocation: the number assigned to each circuit or term.
- Hardware conditions: backend, device configuration, compilation or transpilation settings, and execution time when relevant.
- Comparison rule: the minimum difference that would change your conclusion.
The usual sampling formulas assume independent, identically distributed shots. Hardware runs can violate that assumption through drift, correlated errors, crosstalk, or changing calibration conditions. Also separate statistical uncertainty from systematic error. More shots reduce random sampling noise; they do not, by themselves, correct a biased readout or an incorrectly implemented observable.
If your circuit has been transformed for hardware, measurement results should be interpreted after accounting for the compiled circuit and its measurement layout. Review Quantum Circuit Transpilation and Quantum Circuit Resource Estimation when depth, connectivity, or the number of executions changes your budget.
Worked examples
Comparing two measured probabilities
Suppose circuit A produces a success outcome in 620 of 1,000 shots, while circuit B produces it in 580 of 1,000 shots. The observed difference is 0.04. The approximate standard error of the difference is found by combining the two independent binomial variances:
SE(diff) ≈ √[p̂A(1 − p̂A)/NA + p̂B(1 − p̂B)/NB]
Using the observed proportions gives an uncertainty of roughly 0.022 for the difference. The result is therefore only a little under two standard errors from zero under this simple approximation. It may be suggestive, but it should not be described as a decisive difference without a predeclared decision rule, repeated runs, or a model that accounts for the experimental design.
Detecting a rare event
Rare-event work needs a different question. If the expected probability is 0.001, a small shot count can easily produce zero observed events even when the event is real. A useful planning approximation is the expected number of events, Np. If that value is much less than one, observing no event is unsurprising. To estimate a rare probability with useful relative precision, the required shots can become much larger than a standard expectation-value calculation suggests.
When zero counts matter, report the count and the interval method rather than writing “the probability is zero.” A zero observed frequency means no event appeared in the sampled shots; it does not prove the underlying probability is exactly zero.
Comparing hardware with a simulator
Run the ideal simulator with enough shots to make its sampling uncertainty small compared with the hardware uncertainty, or compare both using exact simulator probabilities when that is appropriate. Keep the observable definition, shot count, circuit version, and post-processing consistent. A discrepancy between hardware and simulation can reflect noise, compilation changes, readout error, or sampling variation. A shot increase is informative only after these possibilities are recorded.
When to recalculate
Recalculate the shot budget whenever the required precision, circuit collection, or execution conditions change. The most common triggers are:
- Adding Pauli terms, measurement groups, parameters, or circuits.
- Changing a VQE or QAOA stopping rule that depends on energy uncertainty.
- Increasing circuit depth or changing transpilation, connectivity, or basis gates.
- Moving from simulation to hardware, or from one backend to another.
- Investigating a rare outcome or a smaller effect size than originally planned.
- Observing drift between repeated batches or unusually wide confidence intervals.
- Changing the comparison from exploratory visualization to a documented engineering decision.
Before the next run, use this short worksheet: define the observable; choose the acceptable error; select the confidence convention; estimate the initial shots; divide the budget across terms; record backend and circuit versions; then inspect the resulting intervals rather than only the point estimates. If the intervals overlap, do not automatically conclude that the results are equal, and if they do not overlap, do not treat that alone as a complete statistical test.
Finally, distinguish three outcomes: the experiment is precise enough for the decision, more shots are needed, or systematic error must be investigated first. That distinction keeps quantum measurement costs under control and makes results easier to reproduce across SDKs, simulators, and hardware providers. For provider selection and execution planning, consult How to Choose and Access Cloud Quantum Hardware.