Error Mitigation vs Correction
Error correction requires to physical qubits per logical qubit. Error mitigation trades sampling overhead for reduced error without full overhead.
For NISQ devices, error mitigation is the only practical approach.
Zero-Noise Extrapolation (ZNE)
ZNE runs the same circuit at multiple noise levels and extrapolates to zero noise:
- Implement noise scaling: factors
- Measure expectation values
- Fit a model to the data
- Extrapolate to
Noise scaling methods: pulse stretching, identity insertions, probabilistic amplification. Extrapolation methods: linear, Richardson, exponential.
Probabilistic Error Cancellation (PEC)
PEC represents the ideal operation as a quasi-probability distribution:
The sampling overhead scales as , which grows exponentially with circuit depth.
Clifford Data Regression (CDR)
CDR uses efficiently simulable Clifford circuits to learn the error model:
- Generate random Clifford circuits near the target
- Run both noisy and noiseless versions
- Train a model to predict noiseless from noisy
- Apply the model to the target circuit
The model:
Dynamical Decoupling
Dynamical decoupling applies pulse sequences to suppress decoherence:
- Hahn echo: single pulse
- CPMG: equally spaced pulses
- Uhrig DD: non-equally spaced pulses
The decoherence time extends to for DD pulses.
Measurement Error Mitigation
Measurement errors are mitigated by:
- Prepare calibration states
- Build confusion matrix
- Invert to get correction matrix
- Apply to measurement results
Python: ZNE Implementation
import numpy as np
def zne_extrapolation(noise_factors, expectations, method='richardson'):
if method == 'linear':
return 2 * expectations[0] - expectations[1]
elif method == 'richardson':
coeffs = np.polyfit(noise_factors, expectations, len(noise_factors) - 1)
return np.polyval(coeffs, 0.0)
def simulate_noisy_circuit(noise_level):
ideal = 0.75
return ideal * (1 - noise_level) + 0.5 * noise_level
noise_factors = [1.0, 1.5, 2.0, 2.5, 3.0]
expectations = [simulate_noisy_circuit(s * 0.05) for s in noise_factors]
result = zne_extrapolation(noise_factors, expectations, 'richardson')
print(f"ZNE result: {result:.4f}, Ideal: 0.7500")
Error Mitigation Theory
The Pauli twirling approximation: for any channel , the average over Pauli twirling:
is a Pauli channel. This simplifies the noise model and enables efficient mitigation.
Error Mitigation Comparison
| Method | Assumption | Overhead | Accuracy |
|---|---|---|---|
| ZNE | Noise scaling known | O(k^2) | High |
| PEC | Noise model known | Exponential | Very high |
| CDR | Clifford simulation | O(m^2) | Medium |
| DD | Quasi-static noise | O(1) | Limited |
Stacking Techniques Without Multiplying Away Your Shots
Mitigations compose, but their overheads multiply, so the order matters more than the menu. A typical production stack runs dynamical decoupling inside the circuit, wraps the whole thing in zero-noise extrapolation, and finishes with readout mitigation on the measurement statistics. Each layer buys accuracy at a specific price:
| Layer | What it removes | Cost in samples |
|---|---|---|
| Dynamical decoupling | Quasi-static dephasing during idle windows | Free in shots; a few extra pulses per idle |
| Zero-noise extrapolation at 3 noise scales | Coherent over-rotation and some depolarizing error | 3× circuit executions, roughly 4× variance after a linear fit |
| Probabilistic error cancellation | Any calibrated channel, exactly in expectation | Variance amplification equal to the squared quasi-probability norm |
| Readout mitigation | Assignment asymmetry in the confusion matrix | Variance amplified by about the square of the matrix condition number |
Work the numbers on a concrete run. Start with 10,000 shots per expectation value; ZNE at three noise scales raises that to 30,000 executions, and the linear fit leaves roughly 40,000 shots' worth of effective variance. Add PEC with a variance amplification of 10, and the same observable now needs on the order of 400,000 executions to reach the precision the ZNE-only run already delivered. Readout mitigation on top is cheap by comparison: an assignment fidelity of 98% corresponds to a confusion-matrix condition number near 1.04 and costs about 8% more variance, while 90% fidelity costs closer to 60%. Order the layers by overhead, apply the cheapest first, and stop the moment the target precision is reached.
Verifying That the Mitigation Worked
The noiseless answer is exactly what you do not have, so the check has to come from inside the experiment:
- Identity resolution. Insert identity operations into the circuit at the target noise scale. A correctly calibrated extrapolation returns the same value whether or not the identities were added; a mismatch larger than the statistical error bar means the assumed noise scaling does not match the hardware.
- Model-order sanity. Richardson extrapolation through k points fits a polynomial of degree k−1 exactly, so the useful diagnostic is the curvature between the first two noise levels. Strong curvature means a linear model is unsafe and more noise scales are required.
- Symmetry and parity checks. Many Hamiltonians commute with a parity operator, so measured bit strings must obey a known parity. If a mitigation stack shifts parity-weighted expectation values, it is amplifying readout asymmetry rather than removing it.
- Simulable fragments. Replace one slice of the circuit with a classically simulable equivalent, run the full stack, and compare against exact simulation. This is the only check that tests calibration, model fitting and sampling together.
The identity test is the cheapest of the four and belongs in every run plan before expensive data collection starts, not in the analysis afterwards.
import numpy as np
def confusion_matrix(p0, p1):
# rows are ideal states, columns are observed bit values
return np.array([[p0, 1 - p0], [1 - p1, p1]])
def mitigate(counts, M):
p_obs = counts / counts.sum()
p_ideal = np.linalg.solve(M, p_obs) # solve, never invert by hand
return np.clip(p_ideal, 0, 1)
M = confusion_matrix(0.98, 0.97)
observed = np.array([540, 460]) # 1000 shots of a nominally balanced state
print("confusion matrix\n", M)
print(f"observed: {observed / observed.sum()}")
print(f"mitigated: {mitigate(observed, M)}")
print(f"condition number: {np.linalg.cond(M):.3f}")
print(f"variance amplification: {np.linalg.cond(M) ** 2:.3f}")
The printed condition number for 98% assignment fidelity sits just above 1, which is why readout mitigation is the one technique almost every experiment should run: the calibration costs a few hundred shots per qubit configuration, and the variance penalty disappears into the sampling noise.
Summary
Error mitigation is the only accuracy tool available while logical qubits remain out of reach, and every technique is a specific trade rather than a general improvement. Zero-noise extrapolation needs a controllable noise scale, probabilistic error cancellation needs a calibrated noise model and pays for it in variance, Clifford data regression needs a nearby classically simulable circuit, and dynamical decoupling is nearly free but only counters dephasing. Readout mitigation is worth running almost everywhere because its calibration is cheap and its variance cost is small at high assignment fidelity. Stack the layers in overhead order, verify them with identity insertions and parity checks, and stop as soon as the effective sample count no longer supports the precision you intend to report.
Common Mistakes
Applying probabilistic error cancellation to a circuit whose depth makes the quasi-probability norm explode
Fix: Estimate the variance amplification first; beyond about 10 to 20 the shot cost outruns any accuracy gain, so prefer ZNE or a shorter circuit
Extrapolating from noise scales that were never verified on hardware
Fix: Run the identity-insertion check at each scale before collecting production data, and reject scales where the measured noise does not track the assumed factor
Treating measurement mitigation as free because the matrix inversion is trivial
Fix: Budget for the variance amplification, which grows with the square of the confusion-matrix condition number and dominates as assignment fidelity drops
Reporting a mitigated value with error bars taken from the raw samples
Fix: Propagate the overhead factor through the error bar; a 10× variance amplification means ten times the shots for the same uncertainty
Key Takeaways
- Error mitigation trades sampling overhead for reduced bias, while error correction trades thousands of physical qubits per logical qubit
- ZNE needs verified noise scaling, PEC needs a calibrated noise model and pays in variance, CDR needs simulable neighbour circuits, and dynamical decoupling only fights dephasing
- Layering mitigations multiplies their overheads, so apply them cheapest-first and stop at the target precision
- Readout mitigation is the default technique: cheap calibration, small variance cost at high assignment fidelity
- Identity insertions, parity checks and simulable circuit fragments are the available substitutes for a noiseless reference
Measurement Error Mitigation Deep Dive
Measurement error mitigation is essential for accurate quantum computing results. The confusion matrix relates ideal probabilities to observed probabilities:
To correct, we invert: .
The matrix inversion amplifies statistical noise, so regularized methods (least-squares, Bayesian) are preferred. For qubits, the confusion matrix has entries, requiring calibration measurements.