Noise Tailoring and Randomized Compiling
Every real quantum processor makes two very different kinds of mistake, and telling them apart is the whole game. A stochastic error is an honest coin flip — with some probability the gate applies an unwanted Pauli, and the damage adds up like votes in a ballot box. A coherent error is a systematic miss — a pulse that over-rotates by a fixed angle, a residual interaction, a slow drift — and its damage compounds like a debt. The distinction is not academic: identical over-rotations build an error growing like , and the worst-case infidelity of a near-unitary gate scales like the square root of its average infidelity, so a gate that looks superb on a benchmark can be catastrophic at depth. Noise tailoring converts the dangerous coherent noise into the benign stochastic kind without changing the logical circuit at all. The engine is the Pauli twirl: average a channel over conjugation by the full Pauli group and every off-diagonal element of its Pauli-transfer matrix is annihilated, leaving a stochastic Pauli channel with the same diagonal. Randomized compiling, introduced by Wallman and Emerson in 2016, performs this average physically and for free — random Pauli gates before each hard entangling gate and compensating Paulis after, a fresh dressing every repetition, so the average is precisely the twirled channel. RC does not lower your error budget; it reshapes it into a form whose worst case equals its average, whose accumulation is linear, and for which every fault-tolerance theorem and error-mitigation method was actually written.
- Randomized compiling (RC) sandwiches each hard gate between random Pauli "twirling" gates and matched "correction" gates, leaving the logical circuit untouched but the per-cycle error tailored.
- The core effect is the Pauli twirl: averaging over conjugation by the Pauli group is a linear projection deleting every off-diagonal (coherent) element of its Pauli-transfer matrix.
- Tailoring turns coherent errors — worst-case diamond error — into stochastic noise with worst case , so accumulation over depth becomes linear () not quadratic ().
- Pauli-twirled noise is exactly the model assumed by fault-tolerance thresholds, makes benchmarking predictive, and is the precondition for probabilistic error cancellation.
- RC is essentially free: only single-qubit Paulis, no extra qubits; the twirl is realized by averaging observables over many random circuit instances.
- Key idea: the Pauli twirl is a linear projection that annihilates the off-diagonal (coherence) part of a channel's Pauli-transfer matrix, turning any CPTP error into a stochastic Pauli channel with the same diagonal — trading worst-case scaling for benign scaling at zero logical cost.
Averaging a noisy gate over a random Pauli twirl is a linear projection that annihilates the off-diagonal (coherence) part of its Pauli-transfer matrix, turning any CPTP error into a stochastic Pauli channel with the same diagonal — trading worst-case scaling for benign scaling at no logical cost.
Where this lives today
Randomized compiling has moved from proposal to plumbing. On superconducting hardware the 2021 Berkeley demonstration by Hashim, Siddiqi and collaborators showed that RC improves deep-circuit performance and makes the residual error learnable: cycle benchmarking (Erhard and coworkers, 2019) reads out the sparse Pauli rates directly. Those rates feed probabilistic error cancellation: IBM's 2023 demonstration of error mitigation "before fault tolerance" on a 127-qubit processor combined Pauli-twirling with sparse Pauli-Lindblad noise learning and zero-noise extrapolation to recover accurate expectation values beyond exact simulation; commercially, Emerson and Wallman's True-Q (now within Keysight) bakes RC into a compiler pass. The open problems stay active: tailoring the non-Clifford -gate layers RC cannot cheaply twirl, and how far correlated, non-Markovian noise resists conversion to a Pauli model. The through-line is always the same — turn the noise into something whose worst case equals its average, then exploit that you finally know what it is.
The physical picture
Picture a marksman whose sights are biased by a fixed small angle. Fire the same shot a thousand times and every miss lands in the same place — the bias is coherent, the holes march steadily off-centre. Now randomly rotate the target frame before each shot and back afterward. The physical bias is unchanged, but relative to the target it points in a random direction each time, so the holes scatter symmetrically around the bullseye and the average displacement collapses to zero. That reframing is the Pauli twirl; the scatter is the stochastic Pauli channel; and the fact that the shooter still misses on any single shot is why RC does not lower the average error — it removes only the systematic, compounding part. The bookkeeping lives in the Pauli-transfer matrix (PTM): a channel on qubits is a real matrix acting on Pauli operators. Coherent errors deposit weight off the diagonal — correlations between an input Pauli and a different output Pauli — and such cross-terms interfere when gates compose. The twirl zeros every off-diagonal entry while leaving the diagonal untouched, giving a Pauli channel. The first figure shows the twirl on one over-rotated gate; the second the payoff with depth.
The second figure is the number a device engineer cares about. Two gates carry the identical per-cycle average infidelity, one coherent and one tailored. Run each to depth : the coherent case rises like , the tailored case like , and by depth one hundred they separate by nearly two orders of magnitude — purely because one error compounds and the other does not.
The core equations
The starting point is the twirl itself: a channel is symmetrized by conjugating input and output with the same random Pauli and averaging over the group — a linear, idempotent projection onto the subspace of Pauli channels.
where: — the noisy CPTP channel on qubits; — the -qubit Pauli group modulo phases, ; — a Pauli summed uniformly; — the input density operator. Reading it: dress the input by , pass through the real channel, undress by , average — the dressing that hurt one error helps another, and only the diagonal survives. Carrying out that average diagonalizes the PTM, and a diagonal PTM is exactly a probabilistic mixture of Pauli operators — the probabilities being the Walsh–Hadamard transform of the diagonal.
where: — probability of Pauli error , with , ; — diagonal PTM elements (Pauli eigenvalues, ); — symplectic inner product, if commute and if they anticommute. Reading it: the tailored channel is specified entirely by the original diagonal — coherences never enter. Because the twirl preserves the diagonal exactly, every quantity built from it alone is invariant — the average gate fidelity above all, the content of "RC does not change your average error."
where: — average gate fidelity, ; ; ; — average error rate. Reading it: sees only , which the twirl leaves fixed, so and are twirl-invariant. Randomized compiling implements the twirl in situ: around each hard gate it inserts a random Pauli before and a compensating after, so averaged over the draw the cycle equals the ideal gate then twirled noise.
where: — random Pauli before the hard gate; — compensating restoring the ideal logic; — expectation over random Paulis; — the noise-free gate. Reading it: the logic is untouched while its attached noise is twirled. For that compensation to be a cheap single-qubit layer, the hard gate must be Clifford — the Clifford group being the normalizer of the Pauli group.
where: — the ideal hard gate, required Clifford; — twirling and correction Paulis. Reading it: since , the correction is always a single Pauli, compiled into the adjacent layer for free; for a non-Clifford it escapes the Pauli group and the cheap correction fails. The reason it is worth doing lives in the diamond norm — the worst-case error thresholds are stated in — which for coherent noise dwarfs the average but for stochastic noise tracks it.
where: — diamond norm, whose half bounds worst-case error over all inputs including entangled ancillae; — the error channel; — its average error rate. Reading it: tailoring pulls the worst case from to — the key inequality here. Finally, the twirl is realized without ever building a channel — by Monte Carlo over circuit instances.
where: — the -th random circuit realization with its own twirls; — number of distinct instances, each a modest shot count; — observable estimate from . Reading it: the average over dressed circuits is the twirled expectation — the tailored channel realized in software at run time.
The goal is to watch tailoring happen on the simplest non-trivial example: take a single-qubit unitary over-rotation about the axis, twirl it over the Pauli group , and show the coherent cross-term is annihilated while the diagonal survives, leaving a phase-flip channel whose flip probability we read off. This is the whole story of noise tailoring in four lines, and every later -versus- claim is a scaled-up version of it.
Step 1. Write the error as with , , so . Why: the first two terms are diagonal Pauli actions; the third — the commutator — is the coherence, the off-diagonal PTM weight that makes the error unitary rather than stochastic.
Step 2. Apply the twirl . The diagonal pieces and are invariant under every conjugation (the sign appears twice and cancels). Why: anything already diagonal in the Pauli basis is a fixed point of the twirl — this is why the average fidelity cannot change.
Step 3. Average the coherence: , since preserve the commutator's sign while flip it and the pairs cancel. Why: character orthogonality in miniature — the commutator lives in a PTM sector where half the group acts and half , so its average vanishes.
Step 4. What survives is : a phase-flip channel, , . Why: the coherent worst-case error, once , is now the flip probability — the gap closed in one example. *Note: confirms trace preservation; the diagonal PTM elements , match a dephasing channel, giving at .*
Go deeper · Derivation B · 1 minThe Pauli twirl annihilates every off-diagonal PTM element
The goal is to prove the general statement behind the phase-flip example: for an arbitrary -qubit CPTP channel the Pauli twirl sends its transfer matrix to a diagonal matrix with the same diagonal, so the tailored channel is always a stochastic Pauli channel of unchanged average fidelity. The engine is character orthogonality — each Pauli commutes or anticommutes with any basis Pauli, contributing , and these sign-functions are orthogonal characters, the exact sense in which the twirl is a projection.
Step 1. Compute , inserting and the rules , with . Why: conjugating a Pauli by a Pauli returns the same Pauli up to a sign, so the twirl acts diagonally and the computation reduces to bookkeeping signs.
Step 2. The signs factor out: . Why: leaves untouched, its fate handed to a purely group-theoretic sum — channel details no longer matter.
Step 3. Apply character orthogonality: , since is a character, trivial only when . Why: exactly half of the Paulis anticommute with any fixed non-identity Pauli, so and balance and the off-diagonal average dies.
Step 4. Hence — the twirled PTM is diagonal with unchanged diagonal, a stochastic Pauli channel of identical average fidelity. Why: equations (2) and (3) proven at once — a Pauli channel with (hence ) preserved. *On one qubit this general result recovers the phase-flip example above — , and the rest vanish while are preserved.*
The same two-line algebra explains accumulation over depth, worked numerically in the second example below: coherent errors compose as , so their probability grows like , while tailored independent flips give — a ratio of order the depth , which is the entire operational payoff of tailoring.
Limiting cases
Tailoring is best understood by tracking how worst-case and average error scale, and what the twirl produces in the cases that bracket the general one.
| Case | Result | Meaning |
|---|---|---|
| Coherent error before tailoring | : | Average error quadratic in , worst-case linear, so worst case — the gap RC closes. |
| Same error after Pauli twirl | Stochastic flip channel; worst case and average both . Coherence gone, scaling benign. | |
| Maximal (full Clifford) twirl | Averaging over the Clifford group depolarizes any channel to one depolarizing parameter — the basis of randomized benchmarking. | |
| Already a Pauli channel | Pauli channels are fixed points: the twirl is idempotent, confirming is a projection. |
Worked examples
1 · A coherent over-rotation, tailored (fully worked)
A single-qubit gate carries a systematic over-rotation of rad (about ). Find the tailored error probabilities, the average and process infidelities, and the worst-case (diamond) error before and after RC, showing that RC leaves the average untouched while collapsing the worst case.
Step 1. Tailored channel. From Derivation A the twirl gives a phase flip with , — an honest phase flip, no coherence.
Step 2. Infidelities. The PTM diagonal is , so and . The process infidelity is . Both depend only on the diagonal, so both are identical before and after RC.
Step 3. Worst case, coherent. For the diamond distance to identity is set by the largest eigenvalue of : — the worst case is the square root of the process error, the hallmark scaling.
Step 4. Worst case, tailored. The stochastic flip has diamond distance of order its error probability, .
Step 5. The verdict. The worst-case-to-average ratio is for the raw coherent gate and after tailoring. RC collapsed that ratio from about 30 to about 1.5 while leaving the average error unchanged at — the worst case fell twentyfold.
2 · Accumulation over a depth-100 circuit
The same -axis miscalibration, now rad per cycle, is applied times. Compare the accumulated error with and without RC, given equal per-cycle infidelity.
Step 1. Per-cycle error. The per-cycle process infidelity is — identical whether the error stays coherent or is tailored to a stochastic flip .
Step 2. Untailored (coherent). Identical over-rotations compose to angle rad, so — a 23% error.
Step 3. Tailored (stochastic). Independent flips give — 0.25%.
Step 4. The verdict. Same per-cycle infidelity, but the coherent circuit is off by 23% and the tailored one by 0.25%, a ratio of — of order the depth . Tailoring turned a ruinous 23% coherent buildup into a benign 0.25% stochastic error at no change in the gate's headline fidelity. And it costs nothing extra: – dressed instances (equation 7) average out the coherence, sharing the shot budget you already spend — which is why RC is on by default in modern stacks.
Physics of the portrait
Noise tailoring is the history of one idea — twirling to average away structure — migrating from entanglement theory into gate characterization and finally into the compiler.
Origins · 1 minrandomized compiling and how this was discovered
Randomized compiling is a young idea with a deep pedigree — the meeting point of three lineages. The first is twirling: around 1996–1998 Charles Bennett and collaborators, building entanglement purification, realized that averaging a noisy state over random local operations symmetrizes it into an isotropic form one can reason about. The second is characterization: Joseph Emerson, with Alicki and Życzkowski, proposed in 2005 estimating a channel's average error with random unitaries, which matured through Knill's 2008 experiments into the 2011 scalable randomized benchmarking of Magesan, Gambetta and Emerson — a Clifford twirl reducing any gate's error to one depolarizing number. The synthesis came in 2016, when Wallman and Emerson asked: instead of merely measuring the twirled error, why not impose it? RC inserts random Paulis around each hard Clifford so the logic is preserved while the noise, averaged over samples, is forced onto the diagonal. Hashim, Siddiqi and coworkers demonstrated it on a superconducting processor in 2021, and it now sits inside commercial toolchains and the pipelines of every major hardware group. What Bennett began as a trick to clean up entangled states, Wallman and Emerson turned into the standard way to make a real quantum computer behave like the idealized one in the theorems.
Going further
Texts. Nielsen & Chuang, Quantum Computation and Quantum Information, Ch. 8 & 10 · Preskill, Lecture Notes on Quantum Computation, Ch. 3 & 7 · Wilde, Quantum Information Theory, 2nd ed., Ch. 4 · Watrous, The Theory of Quantum Information, Ch. 2–4 · Kitaev, Shen & Vyalyi, Classical and Quantum Computation.
Papers. Wallman & Emerson, "Noise tailoring for scalable quantum computation via randomized compiling", Phys. Rev. A 94, 052325 (2016) · Emerson, Alicki & Życzkowski, J. Opt. B 7, S347 (2005) · Magesan, Gambetta & Emerson, "Scalable and robust randomized benchmarking", Phys. Rev. A 85, 042311 (2012) · Hashim et al., "Randomized compiling on a noisy superconducting processor", Phys. Rev. X 11, 041039 (2021) · Kim et al., "Evidence for the utility of quantum computing before fault tolerance", Nature 618, 500 (2023). Key numerical anchors: the dephasing twirl gives at ; the average fidelity formula is twirl-invariant with ; character-orthogonality diagonalizes the PTM; the -vs- diamond scaling and the depth-100 accumulation ( vs , ratio 92) at are all worked out above.
Prerequisites. Quantum Operations and CPTP Maps · Kraus Representation of Quantum Channels · Pauli and Bit/Phase-Flip Channels · Depolarizing Channel · Markovian vs Non-Markovian Dynamics. Leads to. Probabilistic Error Cancellation · Randomized Benchmarking · Fault-Tolerant Thresholds · Depolarizing Channel.
Ask the tutor: Ask me to twirl any noisy gate by hand and watch its coherences vanish, or to show why a gate that aces randomized benchmarking can still sink a deep circuit.
Does randomized compiling actually reduce my errors, or just relabel them?
It relabels them, and that is more valuable than it sounds. RC leaves the average gate infidelity unchanged — the PTM diagonal, hence , is invariant. What changes is the character of the error: coherent, compounding noise becomes stochastic, additive noise. Three wins follow: worst-case error drops from toward ; error over depth grows like not ; and the residual noise becomes a learnable Pauli channel mitigation can invert. You spend the same on errors — you just stop paying compound interest.
Why must the hard gate be a Clifford — can I randomized-compile a T gate?
The cheap version of RC needs the hard gate Clifford. Inserting a random twirling Pauli before , you must undo it afterward; the correction is . If is Clifford it normalizes the Pauli group, so is again a single Pauli that merges into the next single-qubit layer for free. If is a gate, is generally not a Pauli and the correction is no longer cheap. In practice RC is applied to the Clifford entangling layers, where the dominant coherent errors live; non-Clifford gates are handled separately.
What is the difference between a coherent and a stochastic error, physically?
A stochastic error is a genuine random event: with probability the gate applies an unwanted Pauli. A coherent error is deterministic and systematic: the gate always over-rotates by the same angle, or feels the same residual coupling. The difference shows up under repetition. Stochastic errors add in probability — like coin flips, the failure rate over cycles is about . Coherent errors add in amplitude — the rotations reinforce, so the error grows like . That is why a gate with a tiny coherent miscalibration can ace a single-gate benchmark yet wreck a deep circuit.
What exactly is the Pauli-transfer matrix, and why care about its diagonal?
The PTM is the channel in the Pauli basis: , a real matrix telling you how much input Pauli turns into output Pauli . The diagonal entries (the Pauli eigenvalues) record how much each Pauli is preserved — they set the average fidelity and are what stochastic Pauli channels are made of. The off-diagonal entries are coherences: an input Pauli partly rotating into a different one, which is what makes an error unitary rather than a flip. Noise tailoring zeros the off-diagonal while keeping the diagonal.
Is the Pauli twirl the same operation as randomized benchmarking?
They share an engine but ask different questions. Randomized benchmarking uses the Clifford twirl, which depolarizes any channel to a single-parameter depolarizing channel, and RB exploits this to measure one clean error number. RC uses the gentler Pauli twirl: it leaves a full stochastic Pauli channel with many rates, its purpose being to impose that structure on a running algorithm, not to characterize it. Cycle benchmarking is the bridge — it measures the individual Pauli rates of exactly the tailored cycles RC produces.
If the noise is non-Markovian or correlated, does randomized compiling still work?
Partly, and knowing where it breaks matters. RC's clean guarantee — that the average over instances equals a stochastic Pauli channel — assumes each cycle's noise is an independent, roughly Markovian event. Real hardware has slow drifts and correlated noise that strain this, and strongly non-Markovian noise can leave residual structure the twirl does not remove. Even so, RC helps: twirling across the register also randomizes spatial correlations like crosstalk into stochastic Pauli errors a learned model can describe. It guarantees tailoring for Markovian noise and helps for mildly non-Markovian noise; strongly correlated noise remains open.