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 ZZZZ interaction, a slow drift — and its damage compounds like a debt. The distinction is not academic: NN identical over-rotations build an error growing like N2N^2, 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.

Key takeaways
  • 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 E\mathcal{E} 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 ∼r\sim\sqrt{r} — into stochastic noise with worst case ∼r\sim r, so accumulation over depth NN becomes linear (NN) not quadratic (N2N^2).
  • 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 r\sqrt{r} worst-case scaling for benign rr scaling at zero logical cost.
The core insight

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 p\sqrt{p} worst-case scaling for benign pp 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 pAp_A 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 TT-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 nn qubits is a real 4n×4n4^n \times 4^n matrix Λ\Lambda 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.

Figure
The Pauli twirl acting on a Z over-rotation of angle θ = 0.1 rad. The 4×4 PTM keeps its diagonal (Λ_II = 1, Λ_XX = Λ_YY = cos θ = 0.995, Λ_ZZ = 1) but carries coherent off-diagonal weight ±sin θ = ±0.0998 in the X–Y block; averaging over I, X, Y, Z zeros those entries and leaves a stochastic phase-flip channel.
The twirl kills the off-diagonal (coherent) PTM entries, keeps the diagonal coherent error 𝓔 twirled 𝒯[𝓔] (Pauli channel) IXYZ IXYZ 1.000.9950.9951.00 −0.0998 +0.0998 Pauli twirl 𝒯 average over I, X, Y, Z IXYZ 1.000.9950.9951.00 00 diagonal preserved ⇒ average fidelity unchanged; off-diagonal zeroed ⇒ coherence removed result: p_I = cos²(θ/2) = 0.9975, p_Z = sin²(θ/2) = 0.0025 — a stochastic phase flip

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 NN: the coherent case rises like (Nθ)2(N\theta)^2, the tailored case like NpNp, and by depth one hundred they separate by nearly two orders of magnitude — purely because one error compounds and the other does not.

Figure
Error accumulation over circuit depth for a per-cycle over-rotation θ = 0.01 rad. Untailored, coherent errors add in amplitude, P ≈ sin²(Nθ/2) ∝ N², reaching 23% at N = 100. Tailored to a stochastic flip of the same per-cycle infidelity p = 2.5×10⁻⁵, errors add in probability, P ≈ Np ∝ N, reaching only 0.25% — a ninetyfold difference at equal per-cycle error.
The punchline: coherent error compounds like N², tailored error grows like N 0%5%10%15%20% 020406080100 circuit depth N (cycles) accumulated error probability coherent 23% (∝ N²θ²/4) untailored over-rotation tailored 0.25% (∝ Np) randomized-compiled (stochastic)

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.

T[E](ρ)=1∣Pn∣∑P∈PnP† E ⁣(PρP†)P(1)\mathcal{T}[\mathcal{E}](\rho)=\frac{1}{|\mathcal{P}_n|}\sum_{P\in\mathcal{P}_n} P^\dagger\,\mathcal{E}\!\left(P\rho P^\dagger\right)P \qquad (1)

where: E\mathcal{E} — the noisy CPTP channel on nn qubits; Pn\mathcal{P}_n — the nn-qubit Pauli group modulo phases, ∣Pn∣=4n|\mathcal{P}_n|=4^n; PP — a Pauli summed uniformly; ρ\rho — the input density operator. Reading it: dress the input by PP, pass through the real channel, undress by P†P^\dagger, 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.

T[E](ρ)=∑A∈PnpA AρA†,pA=14n∑B(−1)⟨A,B⟩ ΛBB(2)\mathcal{T}[\mathcal{E}](\rho)=\sum_{A\in\mathcal{P}_n} p_A\,A\rho A^\dagger,\qquad p_A=\frac{1}{4^n}\sum_{B} (-1)^{\langle A,B\rangle}\,\Lambda_{BB} \qquad (2)

where: pAp_A — probability of Pauli error AA, with ∑ApA=1\sum_A p_A=1, pA≥0p_A\ge 0; ΛBB\Lambda_{BB} — diagonal PTM elements (Pauli eigenvalues, ΛBB=1dTr[B E(B)]\Lambda_{BB}=\tfrac1d\mathrm{Tr}[B\,\mathcal{E}(B)]); ⟨A,B⟩\langle A,B\rangle — symplectic inner product, 00 if A,BA,B commute and 11 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."

Fˉ=Tr(Λ)/d+1d+1,r=1−Fˉ(3)\bar F=\frac{\mathrm{Tr}(\Lambda)/d+1}{d+1},\qquad r=1-\bar F \qquad (3)

where: Fˉ\bar F — average gate fidelity, Fˉ=∫ ⁣dψ ⟨ψ∣E(∣ψ⟩⟨ψ∣)∣ψ⟩\bar F=\int\!\mathrm{d}\psi\,\langle\psi|\mathcal{E}(|\psi\rangle\langle\psi|)|\psi\rangle; Tr(Λ)=∑AΛAA\mathrm{Tr}(\Lambda)=\sum_A\Lambda_{AA}; d=2nd=2^n; rr — average error rate. Reading it: Fˉ\bar F sees only TrΛ\mathrm{Tr}\Lambda, which the twirl leaves fixed, so Fˉ\bar F and rr are twirl-invariant. Randomized compiling implements the twirl in situ: around each hard gate it inserts a random Pauli TT before and a compensating T′T' after, so averaged over the draw the cycle equals the ideal gate then twirled noise.

EcycleRC=ET ⁣[ CT′corr∘Ehard∘CTtwirl ]=Gideal∘T[Enoise](4)\mathcal{E}_{\mathrm{cycle}}^{\mathrm{RC}}=\mathbb{E}_{T}\!\Big[\,\mathcal{C}_{T'}^{\mathrm{corr}}\circ\mathcal{E}_{\mathrm{hard}}\circ\mathcal{C}_{T}^{\mathrm{twirl}}\,\Big]=\mathcal{G}_{\mathrm{ideal}}\circ \mathcal{T}[\mathcal{E}_{\mathrm{noise}}] \qquad (4)

where: CTtwirl\mathcal{C}_T^{\mathrm{twirl}} — random Pauli TT before the hard gate; CT′corr\mathcal{C}_{T'}^{\mathrm{corr}} — compensating T′=G T G†T'=G\,T\,G^\dagger restoring the ideal logic; ET\mathbb{E}_T — expectation over random Paulis; Gideal\mathcal{G}_{\mathrm{ideal}} — 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.

T′=G T G†∈Pnfor Clifford G(5)T'=G\,T\,G^\dagger\in\mathcal{P}_n\quad\text{for Clifford }G \qquad (5)

where: GG — the ideal hard gate, required Clifford; T, T′T,\,T' — twirling and correction Paulis. Reading it: since GPnG†=PnG\mathcal{P}_nG^\dagger=\mathcal{P}_n, the correction T′T' is always a single Pauli, compiled into the adjacent layer for free; for a non-Clifford GG 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.

12∥N∥⋄  ≥  r,12∥N∥⋄=O ⁣(r) (coherent),O(r) (stochastic)(6)\tfrac{1}{2}\lVert \mathcal{N}\rVert_\diamond \;\ge\; r,\qquad \tfrac{1}{2}\lVert \mathcal{N}\rVert_\diamond=\mathcal{O}\!\big(\sqrt{r}\big)\ \text{(coherent)},\quad \mathcal{O}(r)\ \text{(stochastic)} \qquad (6)

where: ∥⋅∥⋄\lVert\cdot\rVert_\diamond — diamond norm, whose half bounds worst-case error over all inputs including entangled ancillae; N=E∘Gideal−1\mathcal{N}=\mathcal{E}\circ\mathcal{G}_{\mathrm{ideal}}^{-1} — the error channel; rr — its average error rate. Reading it: tailoring pulls the worst case from r\sqrt{r} to rr — the key inequality here. Finally, the twirl is realized without ever building a channel — by Monte Carlo over circuit instances.

⟨O⟩RC=1M∑m=1M⟨O⟩Cm  →M→∞  Tr ⁣[O ERC(ρ)](7)\langle O\rangle_{\mathrm{RC}}=\frac{1}{M}\sum_{m=1}^{M}\langle O\rangle_{C_m}\;\xrightarrow{M\to\infty}\;\mathrm{Tr}\!\big[O\,\mathcal{E}^{\mathrm{RC}}(\rho)\big] \qquad (7)

where: CmC_m — the mm-th random circuit realization with its own twirls; MM — number of distinct instances, each a modest shot count; ⟨O⟩Cm\langle O\rangle_{C_m} — observable estimate from CmC_m. Reading it: the average over dressed circuits is the twirled expectation — the tailored channel realized in software at run time.

Derivation AA coherent over-rotation becomes a stochastic phase flip

The goal is to watch tailoring happen on the simplest non-trivial example: take a single-qubit unitary over-rotation about the ZZ axis, twirl it over the Pauli group {I,X,Y,Z}\{I,X,Y,Z\}, 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 r\sqrt{r}-versus-rr claim is a scaled-up version of it.

Step 1. Write the error as U=e−iθZ/2=cI−isZU=e^{-i\theta Z/2}=cI-isZ with c=cos⁡(θ/2)c=\cos(\theta/2), s=sin⁡(θ/2)s=\sin(\theta/2), so E(ρ)=UρU†=c2ρ+s2ZρZ+ics(ρZ−Zρ)\mathcal{E}(\rho)=U\rho U^\dagger=c^2\rho+s^2 Z\rho Z+ics(\rho Z-Z\rho). Why: the first two terms are diagonal Pauli actions; the third — the commutator [ρ,Z][\rho,Z] — is the coherence, the off-diagonal PTM weight that makes the error unitary rather than stochastic.

Step 2. Apply the twirl T[E](ρ)=14∑P∈{I,X,Y,Z}P†E(PρP†)P\mathcal{T}[\mathcal{E}](\rho)=\tfrac14\sum_{P\in\{I,X,Y,Z\}}P^\dagger\mathcal{E}(P\rho P^\dagger)P. The diagonal pieces c2ρc^2\rho and s2ZρZs^2 Z\rho Z 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: 14∑PP†(ρZ−Zρ)P=0\tfrac14\sum_P P^\dagger(\rho Z-Z\rho)P=0, since P∈{I,Z}P\in\{I,Z\} preserve the commutator's sign while P∈{X,Y}P\in\{X,Y\} flip it and the pairs cancel. Why: character orthogonality in miniature — the commutator lives in a PTM sector where half the group acts +1+1 and half −1-1, so its average vanishes.

Step 4. What survives is T[E](ρ)=cos⁡2(θ/2) ρ+sin⁡2(θ/2) ZρZ\mathcal{T}[\mathcal{E}](\rho)=\cos^2(\theta/2)\,\rho+\sin^2(\theta/2)\,Z\rho Z: a phase-flip channel, pI=cos⁡2(θ/2)p_I=\cos^2(\theta/2), pZ=sin⁡2(θ/2)p_Z=\sin^2(\theta/2). Why: the coherent worst-case error, once ∼θ\sim\theta, is now the flip probability sin⁡2(θ/2)≈θ2/4\sin^2(\theta/2)\approx\theta^2/4 — the r\sqrt{r} gap closed in one example. *Note: c2+s2=1c^2+s^2=1 confirms trace preservation; the diagonal PTM elements ΛZZ=1\Lambda_{ZZ}=1, ΛXX=ΛYY=cos⁡θ\Lambda_{XX}=\Lambda_{YY}=\cos\theta match a dephasing channel, giving pZ=sin⁡2(0.05)=2.50×10−3p_Z=\sin^2(0.05)=2.50\times10^{-3} at θ=0.1\theta=0.1.*

Go deeper · Derivation B · 1 minThe Pauli twirl annihilates every off-diagonal PTM element
Derivation BThe Pauli twirl annihilates every off-diagonal PTM element

The goal is to prove the general statement behind the phase-flip example: for an arbitrary nn-qubit CPTP channel the Pauli twirl sends its transfer matrix Λ\Lambda 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 ±1\pm1, and these sign-functions are orthogonal characters, the exact sense in which the twirl is a projection.

Step 1. Compute (Λtw)μν=1dTr ⁣[Pμ T[E](Pν)](\Lambda^{\mathrm{tw}})_{\mu\nu}=\tfrac1d\mathrm{Tr}\!\big[P_\mu\,\mathcal{T}[\mathcal{E}](P_\nu)\big], inserting T\mathcal{T} and the rules P†PνP=χν(P)PνP^\dagger P_\nu P=\chi_\nu(P)P_\nu, PPμP†=χμ(P)PμP P_\mu P^\dagger=\chi_\mu(P)P_\mu with χ(P)=±1\chi(P)=\pm1. 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: (Λtw)μν=(14n∑Pχμ(P)χν(P))Λμν(\Lambda^{\mathrm{tw}})_{\mu\nu}=\Big(\tfrac{1}{4^n}\sum_P \chi_\mu(P)\chi_\nu(P)\Big)\Lambda_{\mu\nu}. Why: Λμν\Lambda_{\mu\nu} leaves untouched, its fate handed to a purely group-theoretic sum — channel details no longer matter.

Step 3. Apply character orthogonality: 14n∑Pχμ(P)χν(P)=δμν\tfrac{1}{4^n}\sum_P\chi_\mu(P)\chi_\nu(P)=\delta_{\mu\nu}, since χμχν\chi_\mu\chi_\nu is a character, trivial only when μ=ν\mu=\nu. Why: exactly half of the 4n4^n Paulis anticommute with any fixed non-identity Pauli, so +1+1 and −1-1 balance and the off-diagonal average dies.

Step 4. Hence (Λtw)μν=δμνΛμμ(\Lambda^{\mathrm{tw}})_{\mu\nu}=\delta_{\mu\nu}\Lambda_{\mu\mu} — 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 TrΛ\mathrm{Tr}\Lambda (hence Fˉ\bar F) preserved. *On one qubit this general result recovers the phase-flip example above — ΛXZ\Lambda_{XZ}, ΛXY\Lambda_{XY} and the rest vanish while ΛXX,ΛYY,ΛZZ\Lambda_{XX},\Lambda_{YY},\Lambda_{ZZ} are preserved.*

The same two-line algebra explains accumulation over depth, worked numerically in the second example below: coherent errors compose as (e−iθZ/2)N=e−iNθZ/2\big(e^{-i\theta Z/2}\big)^N=e^{-iN\theta Z/2}, so their probability grows like sin⁡2(Nθ/2)≈(Nθ/2)2\sin^2(N\theta/2)\approx(N\theta/2)^2, while tailored independent flips give 1−(1−p)N≈Np1-(1-p)^N\approx Np — a ratio of order the depth NN, 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.

CaseResultMeaning
Coherent error before tailoringU=e−iθP/2U=e^{-i\theta P/2}:  r∼θ2/4, 12∥U−I∥⋄∼θ/2\ r\sim\theta^2/4,\ \tfrac12\lVert U-I\rVert_\diamond\sim\theta/2Average error quadratic in θ\theta, worst-case linear, so worst case ∼r\sim\sqrt{r} — the gap RC closes.
Same error after Pauli twirlpI≈cos⁡2(θ/2), pP≈sin⁡2(θ/2), 12∥⋅∥⋄∼θ2/4p_I\approx\cos^2(\theta/2),\ p_P\approx\sin^2(\theta/2),\ \tfrac12\lVert\cdot\rVert_\diamond\sim\theta^2/4Stochastic flip channel; worst case and average both ∼θ2∼r\sim\theta^2\sim r. Coherence gone, scaling benign.
Maximal (full Clifford) twirlTCliff[E](ρ)=(1−p)ρ+p Id\mathcal{T}_{\mathrm{Cliff}}[\mathcal{E}](\rho)=(1-p)\rho+p\,\tfrac{I}{d}Averaging over the Clifford group depolarizes any channel to one depolarizing parameter — the basis of randomized benchmarking.
Already a Pauli channelE=∑PpP P⋅P† ⇒ TPauli[E]=E\mathcal{E}=\sum_P p_P\,P\cdot P^\dagger\ \Rightarrow\ \mathcal{T}_{\mathrm{Pauli}}[\mathcal{E}]=\mathcal{E}Pauli channels are fixed points: the twirl is idempotent, confirming T\mathcal{T} is a projection.

Worked examples

1 · A coherent over-rotation, tailored (fully worked)

A single-qubit gate carries a systematic ZZ over-rotation of θ=0.1\theta=0.1 rad (about 5.7∘5.7^\circ). 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 pZ=sin⁡2(0.05)=2.4979×10−3p_Z=\sin^2(0.05)=2.4979\times10^{-3}, pI=0.9975p_I=0.9975 — an honest 2.50×10−32.50\times10^{-3} phase flip, no coherence.

Step 2. Infidelities. The PTM diagonal is ΛII=ΛZZ=1, ΛXX=ΛYY=cos⁡θ=0.9950\Lambda_{II}=\Lambda_{ZZ}=1,\ \Lambda_{XX}=\Lambda_{YY}=\cos\theta=0.9950, so Fˉ=(TrΛ/2+1)/3=(2+cos⁡θ)/3=0.99833\bar F=(\mathrm{Tr}\Lambda/2+1)/3=(2+\cos\theta)/3=0.99833 and r=1−Fˉ=1.665×10−3r=1-\bar F=\mathbf{1.665\times10^{-3}}. The process infidelity is 1−Fe=sin⁡2(θ/2)=2.50×10−3=pZ1-F_e=\sin^2(\theta/2)=\mathbf{2.50\times10^{-3}}=p_Z. Both depend only on the diagonal, so both are identical before and after RC.

Step 3. Worst case, coherent. For U=e−iθZ/2U=e^{-i\theta Z/2} the diamond distance to identity is set by the largest eigenvalue of θZ/2\theta Z/2: 12∥U−I∥⋄≈sin⁡(θ/2)=5.00×10−2=re\tfrac12\lVert\mathcal{U}-\mathcal{I}\rVert_\diamond\approx\sin(\theta/2)=\mathbf{5.00\times10^{-2}}=\sqrt{r_e} — the worst case is the square root of the process error, the hallmark r\sqrt{r} scaling.

Step 4. Worst case, tailored. The stochastic flip has diamond distance of order its error probability, ≈pZ=2.50×10−3\approx p_Z=\mathbf{2.50\times10^{-3}}.

Step 5. The verdict. The worst-case-to-average ratio is 5.00×10−2/1.665×10−3≈305.00\times10^{-2}/1.665\times10^{-3}\approx\mathbf{30} for the raw coherent gate and ≈1.5\approx\mathbf{1.5} after tailoring. RC collapsed that ratio from about 30 to about 1.5 while leaving the average error unchanged at 1.67×10−31.67\times10^{-3} — the worst case fell twentyfold.

2 · Accumulation over a depth-100 circuit

The same ZZ-axis miscalibration, now θ=0.01\theta=0.01 rad per cycle, is applied N=100N=100 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 sin⁡2(0.005)=2.50×10−5\sin^2(0.005)=\mathbf{2.50\times10^{-5}} — identical whether the error stays coherent or is tailored to a stochastic flip pp.

Step 2. Untailored (coherent). Identical over-rotations compose to angle Nθ=1.0N\theta=1.0 rad, so Perr=sin⁡2(0.5)=0.230P_{\mathrm{err}}=\sin^2(0.5)=\mathbf{0.230} — a 23% error.

Step 3. Tailored (stochastic). Independent flips give Perr=1−(1−p)100=2.50×10−3P_{\mathrm{err}}=1-(1-p)^{100}=\mathbf{2.50\times10^{-3}} — 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 ≈92\approx\mathbf{92} — of order the depth N=100N=100. 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: M∼20M\sim20–100100 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
RC
randomized compiling
the protocol that twirls coherent gate noise into stochastic Pauli noise in situ · open-system quantum computation and error mitigation

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.

History
1998
— Bennett and coworkers use twirling to depolarize noise in entanglement purification
2005
— Emerson, Alicki and Życzkowski estimate channel noise with random unitary operators
2011
— Magesan, Gambetta and Emerson make randomized benchmarking scalable via the Clifford twirl
2016
— Wallman and Emerson introduce randomized compiling for scalable quantum computation
2021
— Hashim and coworkers demonstrate randomized compiling on a superconducting processor

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 pZ=sin⁡2(θ/2)=2.50×10−3p_Z=\sin^2(\theta/2)=2.50\times10^{-3} at θ=0.1\theta=0.1; the average fidelity formula Fˉ=(TrΛ/d+1)/(d+1)\bar F=(\mathrm{Tr}\Lambda/d+1)/(d+1) is twirl-invariant with r=1.665×10−3r=1.665\times10^{-3}; character-orthogonality diagonalizes the PTM; the r\sqrt{r}-vs-rr diamond scaling and the depth-100 accumulation (0.2300.230 vs 2.50×10−32.50\times10^{-3}, ratio 92) at θ=0.01\theta=0.01 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 Fˉ\bar F, 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 r\sqrt{r} toward rr; error over depth NN grows like NN not N2N^2; 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 GG Clifford. Inserting a random twirling Pauli TT before GG, you must undo it afterward; the correction is T′=GTG†T'=GTG^\dagger. If GG is Clifford it normalizes the Pauli group, so T′T' is again a single Pauli that merges into the next single-qubit layer for free. If GG is a TT gate, GTG†GTG^\dagger 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 pp 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 ZZZZ coupling. The difference shows up under repetition. Stochastic errors add in probability — like coin flips, the failure rate over NN cycles is about NpNp. Coherent errors add in amplitude — the rotations reinforce, so the error grows like (Nθ)2(N\theta)^2. 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: Λμν=1dTr[Pμ E(Pν)]\Lambda_{\mu\nu}=\tfrac1d\mathrm{Tr}[P_\mu\,\mathcal{E}(P_\nu)], a real 4n×4n4^n\times4^n matrix telling you how much input Pauli PνP_\nu turns into output Pauli PμP_\mu. The diagonal entries Λμμ\Lambda_{\mu\mu} (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 ZZZZ 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.

Before this

Where this leads