Probabilistic Error Cancellation
Probabilistic error cancellation (PEC) estimates an ideal expectation by sampling executable noisy circuits with ordinary probabilities and attaching positive or negative weights to their outcomes. The cancellation occurs in the ensemble average. No single run experiences a negative probability or a physical inverse of decoherence.
The essential requirements are an accurate model of the operations actually executed, a signed decomposition that reproduces the intended transformation, and enough samples to tolerate the larger fluctuations. This page derives the estimator, follows a complete bit-flip example, and explains how noise placement, calibration and the choice of decomposition affect its result.
Required background. Error mitigation explains the bias–variance comparison. Quantum channels supplies composition, linear representations and the difference between an inverse linear map and a physical channel.
Helpful background. Pauli noise explains Pauli transfer eigenvalues. Variance and covariance develops sampling uncertainty.
Signed decompositions of executable operations
Section titled “Signed decompositions of executable operations”Let be the ideal circuit channel and a collection of physical circuit variants. A quasiprobability decomposition is a real linear identity
The coefficients may be negative. Each variant must include its actual inserted-gate noise, preparation, control context and any modeled measurement operation. Replacing it by a more convenient ideal operation changes the mathematical identity.
For trace-preserving variants and target, taking the trace shows that . Define
If , the coefficients are all nonnegative. Otherwise they describe signed cancellation rather than a physical convex mixture. Temme, Bravyi and Gambetta (2017) introduced this approach to quantum error mitigation; Endo, Benjamin and Li (2018) developed its use with characterized noisy operations.
In a real matrix representation, stack the vectorized variants as columns of and the target as . Solving asks whether the target lies in their real span. A nonsingular fitted noise channel does not guarantee that its inverse lies in the span of the available corrections. An overcomplete basis can provide several solutions with different .
For a fixed characterized basis, minimizing is a linear-programming problem after splitting positive and negative parts. Approximate decompositions can trade residual bias against sampling cost (Piveteau, Sutter and Woerner, 2022). A smaller coefficient norm is useful only if the new physical decomposition still approximates the intended target.
Why signed sampling gives the desired mean
Section titled “Why signed sampling gives the desired mean”For each nonzero coefficient, sample label with probability , execute that variant, and measure outcome . Define
If the physical variant has mean , then
The proof uses the actual sampling probabilities, physical maps and outcome normalization. A learned model being exactly invertible does not make its predictions exact for a drifting device. Selecting only successful variants can also change the sampling law.
For independent records and ,
For binary outcomes , the first expression is exactly . The factor is a worst-case second-moment scale, not an automatic ratio of total experimental costs. Calibration and circuit duration can matter as much as shot count.
Other positive sampling laws are possible: use . Its second moment is . Thus absolute-coefficient sampling is optimal for this second moment when every branch has the same outcome second moment, including binary outcomes. If branches are acquired in fixed strata instead, optimal allocation uses their standard deviations: . Random branch sampling and stratified sampling are different designs.
A complete bit-flip example
Section titled “A complete bit-flip example”Let and
Using , solve for a formal inverse:
For , and the identity and branches have sampling probabilities and . Assume here that the added Pauli conjugation is implemented accurately; otherwise its noise belongs in the basis.
At , take ideal mean . The noisy mean is :
| Correction branch | Sampling probability | Outcome mean | Analysis multiplier |
|---|---|---|---|
| Identity | |||
The expected signed result is . Its per-shot variance is . At shots, its MSE is , versus for the uncorrected mean. This example assumes exact calibration and equal shot costs; the mitigation overview shows why the comparison can reverse at low sample size.
At , the channel destroys the and components and has no full inverse. It still preserves : singularity does not prevent every observable from being estimated. For the channel becomes invertible again with ; at it is the known unitary bit flip, whose inverse is physical.
Place corrections in the right circuit order
Section titled “Place corrections in the right circuit order”Use the convention that the rightmost channel acts first. If a gate is implemented as , then
The inverse is expanded into corrections after that implementation. Moving it before the ideal gate generally requires conjugating the correction model; it cannot simply be moved unchanged.
For example, prepare , apply Hadamard, then bit-flip noise with , and measure . The ideal mean is one and the noisy mean is . The formal inverse after the noise restores the expectation to one. Applied before Hadamard instead, it leaves unchanged, so the later bit-flip noise still gives .
An alternative is to decompose each ideal gate directly into fully implemented fragments,
Expanding the ordered product of these sums gives an exact circuit decomposition when the location models compose as assumed. Independent label sampling has
This uses distributivity, not commutativity of gates. Crosstalk or memory may make a location’s map depend on other sampled operations. In that case the simple product model must be enlarged or replaced. See Markovian and non-Markovian noise.
Pauli models and the cost of a decomposition
Section titled “Pauli models and the cost of a decomposition”For a one-qubit Pauli channel, define for commuting Paulis and for anticommuting Paulis. Its transfer eigenvalues and inverse coefficients are
provided every is nonzero. Small eigenvalues lead to large coefficients. Merely expressing a channel in a Pauli basis does not make it Pauli diagonal: a coherent rotation can mix Pauli directions and require additional physical variants.
For nonnegative integrated rates in a Pauli–Lindblad layer,
the conjugation superoperators commute. Each elementary inverse is
Its coefficient norm is . Sampling generators separately therefore gives . Correlated multi-qubit Pauli strings are allowed in a sparse model; sparse does not mean independent noise (van den Berg et al., 2023).
Combining identical branches can reduce the cost
Section titled “Combining identical branches can reduce the cost”The factorized is a property of that sampling construction, not always the smallest norm for the same layer. For equal-rate generators on one qubit, all three Bloch components decay by . Combining identical Pauli branches gives
This is smaller than the separately sampled when . Both represent the same inverse. For large layers, combining all branches may be computationally expensive, and corrections at different circuit locations cannot generally be merged across intervening gates.
For equal generator rates, combining identical Pauli corrections reduces the squared coefficient norm from to . The physical noise and target are unchanged. These are bounded-outcome sampling scales; they omit characterization and execution costs.
Imperfect models leave bias
Section titled “Imperfect models leave bias”For an approximate circuit decomposition, write
For normalized input and bounded , the remaining expectation error obeys
Here the diamond norm has no factor of one half. A discrepancy measured on a few states and observables is not automatically a uniform norm bound.
If the true bit-flip probability is but the fitted value is , the noisy mean is corrected to . The residual bias is . More science shots do not remove it.
Finite calibration also produces uncertainty. Hold the true physical distribution fixed while varying the estimated rate: the mean correction has derivative . At the true parameters in the example this is . Independent binomial calibration with shots has variance , giving leading calibration contribution to the corrected mean’s variance. A common calibration creates covariance between separately estimated observables. The exact law of total variance separates conditional science variance from variance of the calibration-dependent conditional mean; the derivative formula is only a local approximation.
Test the complete sampled procedure on representative known-answer circuits and observables distinct from those used to tune it. Include phase-sensitive tests when coherent errors may matter. Preparation, readout, leakage and the inserted corrections must be modeled consistently; measurement-error mitigation treats terminal detector response separately.
If a variant succeeds with probability , retaining only successful runs changes its frequency from to . The old signed weights no longer prove unbiasedness. Physical survival, numerical rejection and job failures need different models; none can silently disappear from normalization or cost. Likewise, symmetry conditioning introduces a ratio of signed sums, rather than an ordinary positive accepted fraction.
Exercises
Section titled “Exercises”1. Invert a mostly reversed bit-flip channel
Section titled “1. Invert a mostly reversed bit-flip channel”Find the inverse coefficients, norm and sampling signs at . Compare with and .
Solution
The coefficients are , with norm , sampling probabilities and signs . At the directions are erased. At one, the sole correction is with norm one. A high flip probability is not itself an information-loss criterion when the flip is predictable.
2. Derive an importance-sampling estimator
Section titled “2. Derive an importance-sampling estimator”For any on the nonzero coefficients, prove unbiasedness of and minimize its second moment over .
Solution
Summing over the sampled label gives . The second moment is , where . Cauchy–Schwarz gives minimum , attained at . Terms with zero second moment contribute nothing and can be omitted for that observable.
3. Move a correction through Hadamard
Section titled “3. Move a correction through Hadamard”For the example in the text, explain why an -noise inverse moved before Hadamard without modification fails. Which noise axis should the moved inverse use?
Solution
An inverse leaves unchanged, so later noise still gives . Since , the correction moved through Hadamard must be the corresponding inverse. Then in the exact model. Its physical implementation must still realize the assumed map.
4. Compose three sampling norms
Section titled “4. Compose three sampling norms”For independent local bit-flip decompositions with , compute and a conservative shot count for standard error at most with unit-bounded outcomes.
Solution
The norms are , and . Hence and . The variance bound requires . This bounds standard deviation, not a specified confidence level or systematic bias.
5. Compare bias with sampling uncertainty
Section titled “5. Compare bias with sampling uncertainty”At true , fitted and ideal mean , calculate the residual bias. At the true fitted rate, compare leading calibration variance for with science variance for .
Solution
The wrong-rate mean is , with bias . For correctly centered calibration the leading variance is , exceeding the exact-model science contribution . A narrow conditional science interval can therefore omit a larger uncertainty source, as well as any model bias.
6. Combine the three Pauli-generator inverses
Section titled “6. Combine the three Pauli-generator inverses”Derive the combined coefficients in the figure and show that their norm is no greater than the factorized norm.
Solution
The inverse transfer eigenvalues are with . Their Pauli transform gives and the three remaining coefficients . Let . The norm difference is
Combining branches cancels some signed coefficients before sampling; it does not change the represented channel.
7. Detect a missing nonunital direction
Section titled “7. Detect a missing nonunital direction”Amplitude damping has affine Bloch action with and invertible . Can its full inverse be a normalized real linear combination of Pauli conjugations?
Solution
The inverse maps to , so it has a nonzero translation. Every Pauli conjugation is unital, and any trace-preserving real combination has coefficients summing to one and remains unital. It cannot reproduce that translation. Channel invertibility alone therefore does not supply a feasible Pauli-only inverse decomposition.
8. Check survival-dependent sampling
Section titled “8. Check survival-dependent sampling”Two branches are requested with probabilities and succeed with probabilities . What law do retained labels follow, and why can the original PEC weights fail?
Solution
Overall success is and the retained law is , not . In general the weighted branch means are therefore combined with different coefficients. Correcting label frequencies alone would still require success to leave the relevant within-branch outcome distribution unchanged; state-dependent physical loss needs its full conditional model.
References
Section titled “References”- Z. Cai, R. Babbush, S. C. Benjamin, S. Endo, W. J. Huggins, Y. Li, J. R. McClean, and T. E. O’Brien, “Quantum Error Mitigation,” Reviews of Modern Physics 95, 045005 (2023), doi:10.1103/RevModPhys.95.045005 — broader context and experimental limitations.
- S. Endo, S. C. Benjamin, and Y. Li, “Practical Quantum Error Mitigation for Near-Future Applications,” Physical Review X 8, 031027 (2018), doi:10.1103/PhysRevX.8.031027.
- C. Piveteau, D. Sutter, and S. Woerner, “Quasiprobability Decompositions with Reduced Sampling Overhead,” npj Quantum Information 8, 12 (2022), doi:10.1038/s41534-022-00517-3.
- K. Temme, S. Bravyi, and J. M. Gambetta, “Error Mitigation for Short-Depth Quantum Circuits,” Physical Review Letters 119, 180509 (2017), doi:10.1103/PhysRevLett.119.180509.
- E. van den Berg, Z. K. Minev, A. Kandala, and K. Temme, “Probabilistic Error Cancellation with Sparse Pauli–Lindblad Models on Noisy Quantum Processors,” Nature Physics 19, 1116–1121 (2023), doi:10.1038/s41567-023-02042-2.