Probabilistic Error Cancellation
A quantum computer is asked to run an ideal unitary , but the hardware always delivers something slightly wrong: a noise channel rides along, so the executed operation is the completely positive map . The obvious repair — apply the inverse and undo the damage — is impossible. Undoing decoherence would run the second law backwards; formally is a perfectly good linear map on operators but it is not completely positive, so no dial on the machine implements it. Probabilistic error cancellation gets the effect of without ever performing it: it moves the inversion out of the hardware and into classical post-processing. The move rests on one algebraic fact. Although is not a channel, it is a real linear combination of channels — operations the device can run, such as Pauli or Clifford gates: with . Trace preservation forces the coefficients to sum to one, but irreversibility forces some negative. You cannot run a circuit "with probability ", yet you can run it, measure, and attach a minus sign. Sampling each with probability (where ) and re-weighting every shot by builds a signed Monte Carlo estimator whose average is the noise-free expectation value — exactly, with zero bias, provided the noise model is right. Nothing is free. The price is variance: each mitigated gate multiplies the shot budget by , and the factors compound, so the cost climbs like in the number of noisy gates. That exponential is why PEC is the sharpest tool of the pre-fault-tolerant era for modest circuits and a wall for large ones — an unbiased estimator that error correction, not more sampling, must eventually replace.
- Probabilistic error cancellation (PEC) recovers a noise-free expectation value by writing a characterized noise channel's inverse as a real combination of gates the hardware can run.
- Because the inverse of a noisy (non-unitary) channel is not completely positive, that combination carries negative coefficients — a quasiprobability whose absolute weights sum to .
- You sample operations with probability , weight each shot by , and average; the estimator is provably unbiased when the model is exact.
- The cost is variance inflation by per gate, so the overhead grows exponentially with depth and error rate.
- PEC lives or dies by calibration: a wrong noise model leaves a residual bias no sampling removes — a mitigation, not a correction.
- Key idea: the noise-inverse super-operator , though not a valid channel, is a real linear combination of valid channels; sampling those channels with sign-corrected weights converts an impossible deterministic inversion into an unbiased — but variance-amplified — Monte Carlo estimator of the ideal expectation value.
Where this lives today
PEC is now a standard entry in the near-term quantum toolbox. Its flagship demonstration came from IBM in 2023, where the noise of each entangling layer of a superconducting processor was characterized as a sparse Pauli–Lindblad model — a few hundred to a few thousand Pauli error rates per layer rather than a full, exponentially large channel — and its inverse sampled to cancel the dominant two-qubit-gate noise, recovering expectation values across dozens of qubits at non-trivial depth. In practice PEC is rarely run alone: hybrid pipelines invert only the worst noise with partial PEC and mop up the residual with zero-noise extrapolation. It also doubles as a diagnostic — failure to converge to a known calibration answer fingerprints model error, gate drift, or non-Markovian correlations. Qiskit and Mitiq ship PEC, and the frontier pushes the mitigation horizon outward with better noise learning to shrink and honest accounting of where the wall forces the handoff to error correction.
The physical picture
Think of a noisy gate as a known smudge stamped on your data. You cannot physically un-smudge a quantum state — that is decoherence run in reverse, forbidden like unscrambling an egg. But an expectation value is an average over many runs, and averages can be repaired in software: run a small family of slightly different circuits, add some results and subtract others with carefully chosen frequencies, so the smudge cancels in the mean while the clean signal survives. The negative signs are the whole point — the software stand-in for an operation the hardware cannot perform. Concretely, the inverse is expanded over gates the machine can run, , and the negative are unavoidable whenever the noise is lossy. The first figure shows this for a depolarized qubit: one tall positive weight on "do nothing" and three small negative weights on the Pauli corrections. The one-norm measures how far outside the physical channels the inverse reaches — exactly the factor by which sampling costs inflate.
The overhead is small for weak noise — a gate gives — so one gate is nearly free. But multiplies down the circuit, so the cost is exponential in size. The second figure plots this for the depolarizing channel: sits just above one for realistic error but curves sharply upward and diverges as the noise approaches the point where the channel erases its input. That divergence is the physical wall — where information is destroyed, no post-processing can retrieve it, and PEC has nothing to invert.
The core equations
Start from what the hardware does. Programming a gate executes it followed by a characterized noise channel ; if is invertible we can name — but not run — the operation that would undo it.
where: — ideal unitary super-operator, ; — characterized CPTP noise channel; — the noisy operation the device runs; — linear inverse of the noise map, existing but not CPTP in general. Reading: the ideal circuit is one away from the noisy one — the method realizes that inverse without a device that implements it. The realization is a quasiprobability decomposition: expand over operations the machine can run, with the coefficients summing to one by trace preservation.
where: — implementable (CPTP) basis operations, typically Paulis or Cliffords; — real quasiprobability coefficients, at least one negative; is trace preservation. Reading: an honest equality of super-operators — the negativity is what stops the right-hand side from being a physical channel. Two derived quantities run the sampler: the one-norm is the total absolute weight, and dividing each by it gives a probability distribution.
where: — one-norm of the quasiprobability, the sampling cost (the decomposition's negativity); — normalized probability of drawing . Reading: always, equal to one precisely when is already a physical channel; every unit above is irreversibility paid for in variance. Each shot draws an , measures the observable, and multiplies by the sign-and-scale factor; in expectation it is the ideal value — PEC's central promise.
where: — single-shot mitigated estimator for ; — value of on the run using ; — sign correction restoring the quasiprobability weight. Reading: the machine only runs physical circuits; the impossible part lives in the classical factor . The catch is the spread: each shot is inflated by , so its variance is inflated by .
where: — largest magnitude eigenvalue of , bounding a single shot's range; — variance amplification relative to unmitigated sampling. Reading: reaching a target error needs about times as many shots — the exponential wall lives here once compounds. Across a circuit the inverses of independent layers multiply, so do their one-norms, and the shot budget scales as the product squared.
where: — number of noisy gates each carrying an independent inverse; — per-gate overhead ; — target standard error. Reading: for weak noise , so — tame while , exponential after. Finally, the workhorse: the inverse of a single-qubit depolarizing channel over identity and Pauli operations (convention , the full-depolarization probability).
where: — depolarizing channel ; — Pauli super-operations . Reading: coefficients sum to one, absolute values to — the curve above. Over circuits, . The three derivations below establish why the weights go negative, why the signed average is unbiased, and how much it costs.
The goal is to prove that the negativity in the quasiprobability decomposition is not a modeling choice but a theorem: whenever is a genuinely noisy (non-unitary) channel, its inverse can never be written with all coefficients non-negative, so at least one and strictly. The argument needs no calculation, only that a convex mixture of channels is again a channel.
Step 1. Suppose, for contradiction, that with every CPTP, every , and . Then is a convex combination of channels, hence itself CPTP. Why: the set of CPTP maps is convex, so a probability-weighted average of channels is a legitimate channel.
Step 2. If is CPTP, then is a channel with a CPTP inverse — reversible within the physical operations. But a reversible CPTP map is necessarily a unitary conjugation . Why: reversibility forbids leakage to an environment, since a non-trivial dilation would lose distinguishability no channel can restore (data-processing inequality).
Step 3. By assumption is noisy, hence not a unitary conjugation — a contradiction. So Step 1 fails: at least one , and . Why: the triangle inequality is saturated only when all terms share a sign, so any negative weight pushes above one, measuring how far the inverse sits outside the physical set.
Go deeper · Derivation B · 1 minUnbiasedness of the signed Monte Carlo estimator
The goal is to show that the sampling recipe — draw with probability , insert it, measure , report times the outcome — has expectation equal to the ideal, noise-free value exactly, with no bias, so long as the characterized channel matches the true one. The proof is a short chain of identities whose one non-trivial move is that the sampling weight and sign correction conspire to rebuild the true coefficient .
Step 1. Condition on the drawn index . The device runs after the noisy gate, so the conditional mean is and the reported value is . Why: the hardware executes only the physical operation ; the sign and are applied afterward in software.
Step 2. Average over the sampling: . Why: the total expectation is the weighted sum of the conditional means.
Step 3. Collapse the weights: . Why: the engine of the method — the probability cancels and the sign turns back into the signed quasiprobability, recovering the exact coefficient a deterministic inversion would use.
Step 4. Reassemble by linearity: . Why: the sum is, by (2), exactly — the average has rebuilt it.
Step 5. Cancel the noise: since and , . Why: the inverse annihilates the noise — holding only if the modeled equals the true noise, the estimator's single assumption.
Go deeper · Derivation C · 1 minSampling cost of inverting the depolarizing channel
The goal is to compute the quasiprobability coefficients and overhead for the single-qubit depolarizing channel from scratch, verify the coefficients preserve trace, and locate the noise strength at which the inverse ceases to exist. The Pauli-transfer basis makes the channel diagonal, so inversion just reciprocates eigenvalues; the only care is to fix one parametrization, since the literature carries two with different-looking .
Step 1. Fix ; since , the completely depolarizing map is , and has eigenvalue on , on . Why: on Paulis both and are diagonal, so the channel inverts eigenvalue-by-eigenvalue.
Step 2. Invert on the diagonal: needs eigenvalue on the Paulis (where vanishes), so ; and on , so , . Why: the basis that diagonalizes the channel turns operator inversion into two scalar equations.
Step 3. Expand : and . Trace check: . Why: the coefficients must sum to one since inverts a trace-preserving map — an independent check on the algebra.
Step 4. One-norm and limits: . As , ; as , . Why: at the channel sends every input to , its eigenvalue hits zero, the map is singular, and no finite-weight inverse exists — the information-destroyed wall.
Limiting cases
How and PEC's feasibility depend on the noise structure:
| Case | Result | Meaning |
|---|---|---|
| Weak local noise | For per-gate error across gates, the cost is tame while — this is PEC's practical operating regime. | |
| Depolarizing channel | (single qubit) | Closed form in the depolarizing strength ; diverges as , where the channel is non-invertible and information is irretrievably lost. |
| Amplitude damping | not a Pauli mixture | Non-unital noise needs a richer basis (Paulis plus resets), so the decomposition is less compact and larger for the same average error. |
| Deep / high-error circuits | The multiplicative blow-up makes PEC infeasible past a depth set by the error budget — the wall that motivates fault-tolerant error correction. |
Worked examples
1 · The quasiprobability of a single depolarized qubit (fully worked)
A single-qubit gate is followed by a depolarizing channel of strength (convention ). Build the quasiprobability decomposition, find the sampling distribution and signs, compute , and state the shot cost.
Step 1. Coefficients from equation (7): , and each Pauli weight . Trace check: .
Step 2. Overhead. , matching — the amber marker on the second figure.
Step 3. Sampling and signs. Draw the identity with probability ; each of with probability (summing to ). Identity draws take sign , Pauli draws ; every outcome is multiplied by .
Step 4. Shot cost. Variance is inflated by , so matching an unmitigated run's error needs about four times as many shots for this gate. Decomposition , , sampling with sign on the Paulis, shot cost .
2 · Overhead of a hundred-gate circuit
A circuit contains two-qubit gates, each with per-gate overhead . Estimate the total overhead and shot budget, and read off the "mitigation horizon".
Step 1. Overhead multiplies (eq. 6): .
Step 2. Shot budget scales as the square: , roughly 50 times more shots than unmitigated for the same error — expensive but feasible.
Step 3. Push the depth. At such gates . The exponential is gentle until then brutal — solving gives the largest rescuable circuit. and a shot cost at gates; the same noise makes gates cost — the wall where mitigation must yield to correction.
Physics of the portrait
Probabilistic error cancellation is barely a decade old, born from a specific realization about quasiprobabilities that a small group of theorists turned into working hardware protocols. It belongs to quantum error mitigation — squeezing accurate answers from imperfect, uncorrected devices — which crystallized around 2017 and now sits between raw NISQ hardware and the still-distant fault-tolerant machine.
Origins · 1 minquantum error mitigation and how this was discovered
Quantum error mitigation is the youngest idea in this chapter and the most pragmatic: unlike error correction, it accepts uncorrected qubits and asks only for accurate expectation values, paid for in extra runs rather than extra qubits. PEC was introduced in 2017 by Kristan Temme, Sergey Bravyi, and Jay Gambetta, who expanded the non-physical inverse of a characterized noise channel as a quasiprobability over physical gates and estimated it by signed sampling — an unbiased estimator with a controllable, if exponential, cost. The next year Suguru Endo, Simon Benjamin, and Ying Li generalized it to realistic gate sets, making it a practical recipe rather than a theorem. Its mathematics is inherited: quasiprobability representations of completely positive maps (the negativity that powers PEC is the same that marks non-classicality in Wigner functions), and Monte Carlo estimation of signed integrals from the fermionic sign problem, where plays the role of sign-problem severity. By 2023 Ewout van den Berg, Zlatko Minev, Abhinav Kandala, and Temme had scaled PEC to superconducting processors via sparse Pauli–Lindblad noise learning, and the review by Zhenyu Cai and collaborators placed it alongside zero-noise extrapolation as one of the two rigorously grounded mitigation methods — the exact, expensive one against the cheap, biased one.
Going further
References. Temme, Bravyi and Gambetta, "Error mitigation for short-depth quantum circuits", Phys. Rev. Lett. 119, 180509 (2017) · Endo, Benjamin and Li, "Practical quantum error mitigation for near-future applications", Phys. Rev. X 8, 031027 (2018) · van den Berg, Minev, Kandala and Temme, "Probabilistic error cancellation with sparse Pauli–Lindblad models", Nat. Phys. 19, 1116 (2023) · Cai et al., "Quantum error mitigation", Rev. Mod. Phys. 95, 045005 (2023) · Nielsen and Chuang, Quantum Computation and Quantum Information (2010), Ch. 8 · Watrous, The Theory of Quantum Information (2018), Ch. 2.
Provenance. The unbiasedness proof and the identity follow Temme–Bravyi–Gambetta (2017) and Endo–Benjamin–Li (2018). The depolarizing coefficients and overhead are derived here from scratch in the Nielsen–Chuang convention : eigenvalue on the Paulis, , , , diverging at . The alternative has eigenvalue and diverges at ; the two must not be mixed. A verifier should confirm the CP/unitarity argument forcing at least one (Watrous Ch. 2, Nielsen–Chuang Ch. 8), the coefficients giving at , and with .
Prerequisites. CPTP Maps and Quantum Operations · Kraus Representation · Pauli and Bit/Phase-Flip Channels · Depolarizing Channel · Lindblad / GKSL Master Equation. Leads to. Zero-Noise Extrapolation · Quantum Error Correction · Markovian vs Non-Markovian Dynamics.
Ask the tutor: Ask me to walk through building the quasiprobability decomposition for your own noise channel, or to work out exactly where the exponential sampling wall stops your circuit.
If the inverse of the noise cannot be run on the machine, what exactly does the hardware do?
The hardware only ever runs physically legal circuits — the noisy gate followed by one implementable operation (a Pauli, a Clifford, sometimes a reset). The impossible part, the inversion, lives entirely in software: after each run you look up which was inserted, multiply the outcome by , and add it to a running average. The negative signs and the factor are numbers in a spreadsheet, not settings on the device — an operation forbidden as a channel is perfectly legal as a post-processing rule on already-collected data.
Is PEC a form of quantum error correction?
No, and the distinction matters. Error correction protects a quantum state in real time using redundant qubits and syndrome measurements, so a corrected computation runs to arbitrary depth. PEC touches no state and adds no qubits; it recovers only expectation values, as a statistical average over many runs, and pays a cost exponential in circuit size — whereas fault-tolerant correction costs only polynomially once below threshold. PEC is a near-term mitigation that stretches what uncorrected hardware can measure accurately; correction is the long-term architecture that removes the depth limit altogether.
Why is PEC called unbiased when its results are so noisy?
"Unbiased" and "low-variance" are different virtues. Unbiased means the estimator's expected value is exactly the ideal answer — average enough runs and you converge with no systematic offset. High-variance means any finite sample scatters widely around that truth. PEC deliberately trades one for the other: it removes the systematic bias of the noise channel and pays in variance, inflating the shot count by per gate. That is a good trade when you can afford the shots, since variance shrinks as while bias would never shrink — provided the noise model is correct.
Where do the negative quasiprobabilities come from, physically?
They are the fingerprint of irreversibility. A noisy channel loses information to its environment, and no physical operation can pull it back — the data-processing inequality forbids it. So the map that would undo the noise cannot itself be a channel, and the only way to write a non-channel as a combination of channels is to allow negative weights. Their size, , measures how much information was scrambled: weak noise gives tiny negatives and , while a channel that erases the qubit drives to infinity. The same negativity marks non-classicality in Wigner functions and the fermionic sign problem.
Why does the reported overhead formula differ between textbooks?
Because the depolarizing channel has two common parametrizations that define differently. Here, : is the probability of full depolarization, the Pauli eigenvalue is , and diverges at . In the alternative , the eigenvalue is and the channel is singular already at . Both are correct, related by a rescaling of . The one fatal mistake — which careful sources still make — is to write the channel in one convention and quote the overhead from the other.
Can PEC be combined with zero-noise extrapolation, and why would you?
Yes, and the combination often beats either alone. Their weaknesses are complementary: PEC is unbiased but its cost explodes with depth, while zero-noise extrapolation is cheap but biased by its extrapolation model. A hybrid pipeline uses partial PEC to invert only the most damaging noise — the two-qubit-gate errors — lowering the effective error rate, then extrapolates the residual. Because only part of the noise was inverted, stays small and the shot budget manageable — a deliberate slide along the bias–variance–cost trade-off, tuned to the machine at hand.