Simple Algorithm
Quantum Computing · Excited State · 20 min

Error Mitigation for Near-Term Devices

Extracting better answers from noisy hardware without full QEC.

Without full error correction, a noisy quantum computer returns biased answers. Error mitigation does not repair the quantum state; it repairs the statistics, by running extra or modified circuits and combining the results into a better estimate. The bill is paid in measurement shots, and it grows exponentially with circuit size.

What you’ll learn

  • Distinguish error mitigation (better estimates of expectation values) from error correction (protected quantum states).
  • Correct readout errors with a confusion matrix and quantify the variance cost.
  • Apply zero-noise extrapolation and probabilistic error cancellation, and compute their sampling overheads.
  • Use symmetry verification to flag errors, and explain which errors it misses.
  • Explain why every mitigation method pays a cost exponential in the total noise of the circuit.

Estimate, don't correct

Most near-term (NISQ) algorithms, such as VQE, need expectation values ⟨O⟩=Tr⁡(Oρ)\expval{O}=\Tr(O\rho) rather than individual bit strings. Noise replaces the ideal state ρ\rho by a noisy one, and the estimate becomes biased: no number of shots averages the bias away.

Error mitigation builds an estimator E^\hat E from many runs of noisy (possibly modified) circuits such that E[E^]≈Tr⁡(Oρ)\mathbb{E}[\hat E]\approx\Tr(O\rho). It uses no extra qubits for encoding and no real-time feedback. The error of any estimator splits as

E[(E^−⟨O⟩)2]=(E[E^]−⟨O⟩)2⏟bias2+Var⁡(E^)⏟shrinks like 1/N\mathbb{E}\big[(\hat E-\expval{O})^2\big] = \underbrace{\big(\mathbb{E}[\hat E]-\expval{O}\big)^2}_{\text{bias}^2} + \underbrace{\operatorname{Var}(\hat E)}_{\text{shrinks like }1/N}
Mitigation trades bias for variance. Its sampling overhead C=Var⁡(E^mit)/Var⁡(E^raw)C=\operatorname{Var}(\hat E_{\mathrm{mit}})/\operatorname{Var}(\hat E_{\mathrm{raw}}) is the factor by which the number of shots NN must grow to keep the same statistical error.
MethodIdeaNeeds
Readout mitigationInvert the measured confusion matrixCalibration circuits
Zero-noise extrapolation (ZNE)Measure at amplified noise, extrapolate to zeroA way to scale the noise
Probabilistic error cancellation (PEC)Sample from a signed decomposition of the inverse noiseAn accurate noise model
Symmetry verificationDiscard shots that violate a known conserved quantityA symmetry of the ideal state
Other members of the family: virtual distillation (using several copies of the state), Clifford data regression (learning the noise from classically simulable circuits), and noise tailoring by twirling, which makes noise easier to mitigate.

Readout errors

Measurement is often the noisiest operation. For one qubit, let e0=Pr⁡(read 1∣0)e_0=\Pr(\text{read }1\mid0) and e1=Pr⁡(read 0∣1)e_1=\Pr(\text{read }0\mid1). Measured frequencies are a linear image of the true ones, p⃗meas=Mp⃗true\vec p_{\mathrm{meas}}=M\vec p_{\mathrm{true}}, with the confusion matrix

M=(1−e0e1e01−e1),p⃗est=M−1p⃗measM=\begin{pmatrix}1-e_0 & e_1\\ e_0 & 1-e_1\end{pmatrix},\qquad \vec p_{\mathrm{est}} = M^{-1}\vec p_{\mathrm{meas}}
MM is measured by preparing ∣0⟩\ket0 and ∣1⟩\ket1 many times. For nn qubits with independent readout errors, M=M1⊗⋯⊗MnM=M_1\otimes\cdots\otimes M_n can be inverted factor by factor.
DerivationWhat inversion costs
  1. ⟨Z⟩meas=(e1−e0)+(1−e0−e1)⟨Z⟩\expval{Z}_{\mathrm{meas}} = (e_1-e_0) + (1-e_0-e_1)\expval{Z}

    Substitute p0=1+⟨Z⟩2p_0=\tfrac{1+\expval{Z}}{2} and p1=1−⟨Z⟩2p_1=\tfrac{1-\expval{Z}}{2}. The signal shrinks by 1−e0−e11-e_0-e_1 and shifts.

  2. Z^=Z^meas−(e1−e0)1−e0−e1\hat Z = \frac{\hat Z_{\mathrm{meas}}-(e_1-e_0)}{1-e_0-e_1}

    Inverting is unbiased (if MM is accurate), but it divides the statistical fluctuations by 1−e0−e11-e_0-e_1 too.

  3. C=1(1−e0−e1)2 per qubit,CZ⊗n=1(1−2e)2nC = \frac{1}{(1-e_0-e_1)^2}\ \text{per qubit},\qquad C_{Z^{\otimes n}} = \frac{1}{(1-2e)^{2n}}

    For a parity Z⊗nZ^{\otimes n} with symmetric errors ee the factors multiply: the overhead is exponential in the number of qubits measured.

Check your understanding

A qubit has symmetric readout error e0=e1=0.05e_0=e_1=0.05. You measure ⟨Z⟩meas=0.72\expval{Z}_{\mathrm{meas}}=0.72. What is the mitigated estimate?

  1. 0.720.72
  2. 0.770.77
  3. 0.800.80
  4. 0.650.65
Show the answer

C. 0.800.80

⟨Z⟩=0.72/(1−2⋅0.05)=0.72/0.9=0.80\expval{Z}=0.72/(1-2\cdot0.05)=0.72/0.9=0.80. The price: the shot noise is divided by 0.90.9 as well, so you need 1/0.81≈1.231/0.81\approx1.23 times the shots for the same error bar.

Zero-noise extrapolation

Suppose you could turn the noise up by a known factor λ≥1\lambda\ge1. Measuring E(λ)E(\lambda) at several values of λ\lambda and fitting a curve lets you extrapolate to E(0)E(0), the noiseless value. Ways to amplify noise:

  • Pulse stretching: run every gate more slowly with proportionally weaker pulses, so decoherence acts λ\lambda times longer (the gates must be recalibrated).
  • Gate folding: replace a gate GG by G G†GG\,G^\dagger G, logically the same but with three times the noise; folding only some gates gives intermediate λ\lambda.
  • Probabilistic error amplification: insert extra random Pauli errors drawn from a learned noise model.
ER=2E(1)−E(2),ER=12(3E(1)−E(3))E_{\mathrm{R}} = 2E(1)-E(2),\qquad E_{\mathrm{R}} = \tfrac{1}{2}\big(3E(1)-E(3)\big)
Linear (first-order Richardson) extrapolation from λ∈{1,2}\lambda\in\{1,2\} or {1,3}\{1,3\} cancels the term linear in λ\lambda. With equal shots at each point, the variance grows by 22+12=52^2+1^2=5 (respectively (9+1)/4=2.5(9+1)/4=2.5).

The extrapolation is only as good as its model. Noise often makes signals decay exponentially in the amount of noise, and a straight line through exponential data undershoots. You can watch such a decay directly: in the T2T_2 experiment below the coherence of ∣+⟩\ket{+} decays like e−t/T2e^{-t/T_2} (dephasing), and stretching a circuit's duration by λ\lambda multiplies the exponent by λ\lambda.

Predict before you look

A signal decays exponentially with the noise scale: you measure E(1)=0.60E(1)=0.60 and E(2)=0.36E(2)=0.36, and the true value is E(0)=1E(0)=1. What does linear extrapolation, 2E(1)−E(2)2E(1)-E(2), return?

Show the answer

0.84

2(0.60)−0.36=0.842(0.60)-0.36=0.84: much better than the raw 0.600.60, but still biased. Exponential extrapolation, E(0)=E(1)2/E(2)=0.36/0.36=1E(0)=E(1)^2/E(2)=0.36/0.36=1, is exact here because the model matches the decay.

Probabilistic error cancellation

If you know the noise channel N\mathcal{N} that follows a gate, you can try to undo it. N−1\mathcal{N}^{-1} is usually not a physical operation, but it can be written as a signed combination of operations you can implement, typically Pauli gates:

N−1=∑iqi Bi,∑iqi=1,γ=∑i∣qi∣ ≥1\mathcal{N}^{-1} = \sum_i q_i\,\mathcal{B}_i,\qquad \sum_i q_i = 1,\qquad \gamma = \sum_i\abs{q_i}\ \ge 1
Some qiq_i are negative, so this is a quasi-probability decomposition. Its cost is set by γ\gamma.
DerivationSampling a quasi-probability
  1. ⟨O⟩ideal=∑iqi⟨O⟩Bi=γ∑i∣qi∣γ sgn⁡(qi)⟨O⟩Bi\expval{O}_{\mathrm{ideal}} = \sum_i q_i\expval{O}_{\mathcal{B}_i} = \gamma\sum_i \frac{\abs{q_i}}{\gamma}\,\operatorname{sgn}(q_i)\expval{O}_{\mathcal{B}_i}

    Insert N−1\mathcal{N}^{-1} after the gate and expand by linearity.

  2. For each shot, pick ii with probability ∣qi∣/γ\abs{q_i}/\gamma, run the circuit with Bi\mathcal{B}_i inserted, and record γsgn⁡(qi)\gamma\operatorname{sgn}(q_i) times the measured outcome. The average is unbiased.

  3. ∣γsgn⁡(qi) o∣≤γ∥O∥ ⟹ C≈γ2\abs{\gamma\operatorname{sgn}(q_i)\,o}\le\gamma\norm{O}\ \Longrightarrow\ C\approx\gamma^2

    The recorded values are γ\gamma times larger, so the variance, and with it the shot count, grows by about γ2\gamma^2.

  4. γtotal=∏gγg≈(1+2p)L,C≈γtotal2≈e4pL\gamma_{\mathrm{total}} = \prod_{g}\gamma_g\approx(1+2p)^L,\qquad C\approx\gamma_{\mathrm{total}}^2\approx e^{4pL}

    For single-qubit depolarizing noise with Pauli error probability pp per gate, γg≈1+2p\gamma_g\approx1+2p (derived in the Rydberg State lesson). Over LL gates the costs multiply.

Total noise pLpLPEC overhead e4pLe^{4pL}
0.250.25≈3\approx3
11≈55\approx55
2.52.5≈2×104\approx2\times10^4
55≈5×108\approx5\times10^8
pLpL is roughly the expected number of errors per run. Beyond a few errors per run, mitigation becomes impractical.
Check your understanding

Each of 500 gates has γg=1.01\gamma_g=1.01. Roughly how many times more shots does PEC need?

  1. About 2×1042\times10^4
  2. About 150150
  3. About 1010
  4. About 1.011.01
Show the answer

A. About 2×1042\times10^4

γtotal=1.01500≈e4.98≈145\gamma_{\mathrm{total}}=1.01^{500}\approx e^{4.98}\approx145, and the shot overhead is γtotal2≈2.1×104\gamma_{\mathrm{total}}^2\approx2.1\times10^4.

Symmetry verification, and the limits

Sometimes you know a property the ideal state must have: a conserved particle number, a fixed parity. Measure it, and throw away the shots that violate it. The Bell state 12(∣00⟩+∣11⟩)\tfrac{1}{\sqrt2}(\ket{00}+\ket{11}), for instance, has even parity: Z⊗Z=+1Z\otimes Z=+1.

Symmetry verification removes the errors that break the symmetry, at the price of discarded shots. The surviving fraction decays exponentially with the number of error locations, so this method, too, has an exponential cost.

Key takeaways

  • Error mitigation estimates expectation values with reduced bias from many noisy runs; it does not produce protected states.
  • Readout mitigation inverts a confusion matrix; ZNE extrapolates E(λ)E(\lambda) to λ=0\lambda=0; PEC samples a quasi-probability decomposition of N−1\mathcal{N}^{-1}; symmetry verification postselects on conserved quantities.
  • Each removes bias at a variance cost: (1−2e)−2n(1-2e)^{-2n} for readout, ∑jγj2\sum_j\gamma_j^2 for Richardson extrapolation, γ2L≈e4pL\gamma^{2L}\approx e^{4pL} for PEC.
  • All costs grow exponentially with the expected number of errors per run, so mitigation suits circuits with O(1)\order{1} errors; large computations need error correction.

Check yourself

In the interactive lesson these are scored with your confidence, and what you miss comes back for review.

Question 1

What does error mitigation deliver?

  1. A corrected quantum state that can be used in further computation
  2. Logical qubits with lower error rates
  3. Exact noiseless results at no extra cost
  4. Better estimates of expectation values, assembled from many runs of noisy circuits
Show the answer

D. Better estimates of expectation values, assembled from many runs of noisy circuits

Mitigation post-processes measurement statistics. It never produces a cleaner quantum state, so it cannot feed a longer computation the way error correction does.

Question 2

At noise scales λ=1\lambda=1 and λ=3\lambda=3 you measure E(1)=0.70E(1)=0.70 and E(3)=0.40E(3)=0.40. What does linear extrapolation to λ=0\lambda=0 give?

  1. 1.001.00
  2. 0.850.85
  3. 0.550.55
  4. 0.700.70
Show the answer

B. 0.850.85

The slope is (0.40−0.70)/2=−0.15(0.40-0.70)/2=-0.15 per unit of λ\lambda, so E(0)=0.70+0.15=0.85E(0)=0.70+0.15=0.85. Equivalently, 12(3E(1)−E(3))=12(2.1−0.4)=0.85\tfrac12(3E(1)-E(3))=\tfrac12(2.1-0.4)=0.85.

Question 3

Why is the cost of probabilistic error cancellation exponential in circuit size?

  1. The quasi-probability norms of the gates multiply, γtotal=∏gγg\gamma_{\mathrm{total}}=\prod_g\gamma_g, and the shot count scales as γtotal2\gamma_{\mathrm{total}}^2
  2. Each gate must be characterized by tomography with exponentially many measurements
  3. The number of possible error patterns grows exponentially, and PEC enumerates all of them
  4. PEC needs one extra qubit per gate
Show the answer

A. The quasi-probability norms of the gates multiply, γtotal=∏gγg\gamma_{\mathrm{total}}=\prod_g\gamma_g, and the shot count scales as γtotal2\gamma_{\mathrm{total}}^2

Each estimate is multiplied by ±γtotal\pm\gamma_{\mathrm{total}}, so its variance grows like γtotal2=∏gγg2≈e4pL\gamma_{\mathrm{total}}^2=\prod_g\gamma_g^2\approx e^{4pL}. Sampling avoids enumerating error patterns, but not this blow-up.

Question 4

Symmetry verification using the parity Z⊗Z=+1Z\otimes Z=+1 of a Bell state catches which single-qubit errors?

  1. All single-qubit errors
  2. Only ZZ errors
  3. XX and YY errors, but not ZZ errors
  4. None, because measuring the parity destroys the entanglement
Show the answer

C. XX and YY errors, but not ZZ errors

An error is caught when it anticommutes with Z⊗ZZ\otimes Z: XX and YY on either qubit do, while ZZ commutes and slips through. Measuring only the parity leaves the Bell state intact.

Go deeper

Further reading

  • K. Temme, S. Bravyi & J. M. Gambetta, "Error mitigation for short-depth quantum circuits", Phys. Rev. Lett. 119, 180509 (2017).
  • A. Kandala, K. Temme, A. D. Córcoles, A. Mezzacapo, J. M. Chow & J. M. Gambetta, "Error mitigation extends the computational reach of a noisy quantum processor", Nature 567, 491 (2019).
  • Z. Cai, R. Babbush, S. C. Benjamin, S. Endo, W. J. Huggins, Y. Li, J. R. McClean & T. E. O'Brien, "Quantum error mitigation", Rev. Mod. Phys. 95, 045005 (2023).
  • Y. Kim et al., "Evidence for the utility of quantum computing before fault tolerance", Nature 618, 500 (2023).