Quantum error mitigation can make noisy quantum hardware results more useful without changing the algorithm itself, but each technique trades accuracy, variance, calibration effort, or circuit executions. This guide shows how to establish a reproducible baseline in Python, compare zero-noise extrapolation, readout correction, and symmetry verification, and estimate the extra shots and validation work required before choosing a method.
Overview
Current quantum processors produce results affected by gate errors, measurement errors, crosstalk, decoherence, and circuit compilation. Error mitigation does not repair a faulty state in the same way that quantum error correction aims to do. Instead, it uses additional measurements, calibration data, or known properties of the problem to reduce the influence of noise in an estimated observable.
The practical question is not simply “Which method is best?” It is “Which method gives a sufficiently reliable estimate for this circuit within the available shot, runtime, and calibration budget?” A short circuit with a measurement-heavy output may benefit from readout correction. A variational algorithm that measures an expectation value may be a candidate for zero-noise extrapolation. A chemistry or optimization circuit with a known conserved quantity may support symmetry verification.
Start with an unmitigated baseline. Record the circuit after transpilation, the backend or simulator configuration, the observable, the shot count, the random seeds when available, and the calibration context. Without that baseline, a mitigated result can look better simply because it was measured under a different setup.
| Technique | What it uses | Main overhead | Best fit | Important limitation |
|---|---|---|---|---|
| Zero-noise extrapolation (ZNE) | Several noise-scaled executions | More circuit variants and shots | Expectation values from shallow or moderate-depth circuits | Extrapolation can amplify statistical variance and may be unstable |
| Readout error correction | Measurement calibration or a readout-noise model | Calibration circuits and classical post-processing | Bitstring probabilities and observables dominated by measurement error | Calibration can drift; inversion can increase variance |
| Symmetry verification | A known conserved quantity or valid subspace | Extra measurements or post-selection | Algorithms with reliable parity, particle-number, or other symmetry constraints | Discarding shots reduces the effective sample size |
These methods can be combined, but combination is not automatically better. For example, readout correction followed by ZNE may require more executions and can compound estimator variance. Compare each candidate against the same baseline and report uncertainty, not only the central estimate.
How to estimate
Use a small experiment matrix rather than applying mitigation to one run and judging it by inspection. The following workflow works with a Python quantum SDK, including Qiskit or PennyLane, even though exact function names and provider interfaces vary by release.
- Define the target. Choose one observable or metric, such as an energy expectation, a Pauli-string expectation, a probability, or an optimization objective. Write down the ideal reference if a statevector simulator or analytically solvable circuit can provide one.
- Run the noisy baseline. Execute the original transpiled circuit with a fixed shot budget. Save counts, expectation values, execution metadata, and uncertainty estimates. If the circuit has multiple terms, preserve results for each term instead of storing only the final sum.
- Estimate the baseline error. When an ideal reference is available, use an absolute error such as
|E_noisy - E_ideal|. For an observable with a meaningful scale, also record a relative error, while noting that relative error becomes misleading when the ideal value is close to zero. - Apply one method at a time. Keep the logical circuit, transpilation settings, observable definition, and total shot accounting consistent. Change only the mitigation procedure.
- Repeat selected experiments. Use repeated batches or independent submissions when practical. A single improved estimate may be a sampling accident, especially after extrapolation or post-selection.
- Compare accuracy and cost together. Report mitigated error, confidence or standard error, number of circuit executions, total shots, calibration shots, discarded-shot fraction, and classical processing time.
Estimating ZNE overhead
ZNE runs the circuit at several effective noise levels and fits the measured observable back toward a lower-noise value. Noise scaling may be implemented through a provider or mitigation library, or by a controlled circuit transformation such as gate folding. The exact implementation must preserve the logical operation while increasing the selected noise contribution.
A simple planning estimate is:
total_shots_ZNE = number_of_noise_scales × shots_per_scale × number_of_observables
If three noise scales are used for one observable and each scale receives 4,000 shots, the experiment requires approximately 12,000 circuit shots before any repeated batches. That is a planning number, not a guarantee of accuracy. A linear extrapolation uses fewer fit parameters than a higher-order fit, while a higher-order fit may require more scales and can become sensitive to statistical fluctuations.
# Framework-neutral ZNE planning pattern
scales = [1.0, 1.5, 2.0]
shots_per_scale = 4000
values = []
for scale in scales:
scaled_circuit = make_noise_scaled_circuit(circuit, scale)
value = execute_and_measure(scaled_circuit, observable, shots=shots_per_scale)
values.append(value)
mitigated = extrapolate_to_zero_noise(scales, values, order=1)
Use the extrapolated value only with diagnostics: inspect the fit, retain the measurements at every scale, and flag results that fall outside a physically allowed range. Extrapolation can reduce bias while increasing variance, so a result closer to the ideal reference is not sufficient evidence by itself.
Estimating readout-correction overhead
Readout correction characterizes how prepared computational-basis states are recorded. For a small number of qubits, a calibration experiment can prepare basis states, collect observed counts, and construct a response matrix. Post-processing then estimates the distribution before measurement noise.
For n qubits, full basis-state calibration conceptually involves 2^n preparations. That exponential growth is one reason larger systems often use tensor-product, local, or reduced calibration models when their assumptions are acceptable. The planning formula is:
calibration_shots = calibration_circuits × shots_per_calibration_circuit
Include calibration shots in the experiment budget, even if the provider or SDK presents them separately. Check whether the correction produces negative quasi-probabilities or unusually large changes in the distribution. Those outcomes can indicate an ill-conditioned calibration matrix or insufficient shots; they are not automatically proof that the correction failed.
Estimating symmetry-verification overhead
Symmetry verification measures a property that valid states should satisfy, such as a parity condition or conserved particle number. You can then reject invalid shots or use symmetry information to construct a corrected estimator. If a fraction r of shots is rejected, the effective retained sample count is approximately:
effective_shots = raw_shots × (1 - r)
To retain 4,000 usable shots when the expected rejection rate is 20 percent, plan for roughly 4,000 / 0.8 = 5,000 raw shots, before accounting for uncertainty in the rejection rate. Post-selection can improve a result when invalid shots are strongly associated with errors, but it can also increase statistical uncertainty and remove useful information.
Inputs and assumptions
A meaningful comparison depends on inputs that are easy to overlook in a quantum programming tutorial. Record the following for every run:
- Circuit definition: logical qubits, gates, depth, two-qubit-gate count, measured qubits, and parameter values.
- Compiled circuit: target basis gates, mapped physical qubits, final depth, and routing operations. A mitigation comparison is weaker if each method receives a different compiled circuit.
- Observable: the measured quantity, coefficient weighting, and whether it is reconstructed from several Pauli terms or bitstring probabilities.
- Shot allocation: shots for the baseline, each ZNE scale, each calibration circuit, and each repeated batch.
- Noise context: simulator noise model or hardware execution context, including the approximate calibration window when the platform exposes it.
- Reference value: an ideal simulator result, a classically computed value for a small instance, or a trusted benchmark. If no reference exists, compare consistency, physical constraints, and sensitivity to mitigation settings instead of claiming improved accuracy.
- Uncertainty method: binomial or multinomial estimates for counts, bootstrap resampling, repeated-run variance, or another clearly documented approach.
For hardware experiments, keep the first comparison deliberately small. A circuit resource estimate that includes qubit count, depth, and shot budget can help identify whether mitigation overhead is practical before submitting jobs. See Quantum Circuit Resource Estimation in Python and Quantum Cloud Job Cost and Runtime Planning for related planning considerations.
Worked examples
Example 1: Choosing ZNE for an expectation value
Suppose a variational circuit measures one energy expectation assembled from six Pauli terms. You choose three noise scales, 2,000 shots per scale and term, and one run per setting. The estimated circuit-shot requirement is 3 × 2,000 × 6 = 36,000 shots, excluding calibration or repeated batches. If the unmitigated energy is biased high and the three scale results show a smooth trend, first-order extrapolation may be a reasonable experiment. If the scale results oscillate or the extrapolated value exceeds the physically plausible energy range, treat the fit as unstable and increase sampling, reduce the fit order, or reject ZNE for that circuit.
Example 2: Comparing readout correction and symmetry verification
Assume a four-qubit circuit returns computational-basis probabilities and has a known even-parity constraint. A full calibration uses 16 prepared basis states. At 500 shots per calibration circuit, calibration requires about 8,000 shots. The application run uses 10,000 shots, and 15 percent fail the parity check. Symmetry verification retains approximately 8,500 shots. Readout correction may use the same application counts but adds classical inversion or fitting; symmetry verification uses fewer retained samples but may remove the most visibly inconsistent outcomes.
Rather than selecting the method from one final histogram, compare: baseline error against the ideal distribution, corrected error, retained shots, calibration age, and uncertainty. If both methods help, test their combination only as a separate experiment and account for its additional assumptions.
Experiment-tracking template
run_id: "2026-01-01-circuit-a"
framework_version: "record exact installed versions"
backend_or_model: "record provider and target"
logical_qubits: 4
transpiled_depth: "record value"
observable: "record Pauli terms or probability metric"
shots_baseline: 10000
method: "baseline | ZNE | readout | symmetry"
scales_or_calibration: "record settings"
shots_total: "include calibration and repeats"
retained_shots: "for post-selection"
estimate: "record central value"
uncertainty: "record method and value"
reference: "ideal value or benchmark, if available"
notes: "calibration window, warnings, and rejected fits"
For circuit-level diagnostics, visualization and result-interpretation workflows are useful companions: Quantum Circuit Visualization in Python and How to Interpret Quantum Circuit Results.
When to recalculate
Recalculate mitigation settings whenever an input that affects noise, sampling, or execution cost changes. In practice, revisit the experiment after a backend calibration change, a qubit remapping, a transpiler or SDK upgrade, a new circuit depth, a changed observable, or a different shot budget. Readout calibration should not be treated as permanent: its usefulness depends on how well it represents the measurement conditions of the application run.
Repeat the comparison when a variational workflow changes its parameter distribution. A mitigation method that behaves acceptably near one set of circuit parameters may become unstable elsewhere. For ZNE, recheck the noise-scale fit and extrapolation order. For readout correction, inspect the response model and conditioning. For symmetry verification, remeasure the rejection rate rather than assuming it remains constant.
Before moving a result into a hybrid quantum-AI pipeline, define an acceptance rule in advance: maximum estimated error, minimum retained-shot count, acceptable variance, and a limit on total executions. Keep the unmitigated result beside the mitigated one in experiment logs. If the method does not improve the chosen metric consistently across repeated tests, the correct engineering decision may be to use the baseline, simplify the circuit, increase shots, improve qubit mapping, or wait for a better-calibrated execution window.
Use mitigation as a measured engineering trade-off, not a post-processing guarantee. A compact, repeatable benchmark with transparent overhead will tell you more than a single polished output.