Simple Algorithm
Quantum Computing · Rydberg State · 28 min

Pauli Noise, Twirling & Error Models

Turning arbitrary noise into stochastic Pauli errors.

Real noise is messy: coherent over-rotations, correlated crosstalk, slow drifts. Yet almost every threshold calculation assumes random Pauli errors. The bridge is twirling: randomize your gates and any noise channel becomes a Pauli channel with the same average fidelity. Along the way you will meet the right, and the misleading, ways to measure how bad an error is.

What you’ll learn

  • Represent a channel by its Pauli χ\chi matrix, and convert between Pauli error rates and Pauli fidelities.
  • Prove that Pauli twirling projects any channel onto the Pauli channel with the same diagonal χ\chi.
  • Prove Favg=(dFe+1)/(d+1)F_{\text{avg}} = (dF_e+1)/(d+1).
  • Define the diamond distance, explain why it rather than average infidelity governs fault tolerance, and compare coherent with stochastic errors.

Channels in the Pauli basis

Expand every Kraus operator of an nn-qubit channel in the Pauli basis Pn={I,X,Y,Z}⊗n\mathcal{P}_n = \{\id,X,Y,Z\}^{\otimes n} (phases dropped, d=2nd = 2^n, ∣Pn∣=d2=4n\abs{\mathcal{P}_n} = d^2 = 4^n). Writing Kk=∑PakPPK_k = \sum_Pa_{kP}P defines the process matrix χ\chi:

E(ρ)=∑P,Q∈PnχPQ PρQ,χPQ=∑kakP akQ∗,χ≥0,∑PχPP=1\mathcal{E}(\rho) = \sum_{P,Q\in\mathcal{P}_n}\chi_{PQ}\,P\rho Q,\qquad \chi_{PQ} = \sum_ka_{kP}\,a_{kQ}^*,\qquad \chi\ge0,\quad \sum_P\chi_{PP} = 1
Trace preservation reads ∑PQχPQ QP=I\sum_{PQ}\chi_{PQ}\,QP = \id; taking its trace gives Tr⁡χ=1\Tr\chi = 1.
DerivationError rates from fidelities: a Walsh–Hadamard transform
  1. ∑Q∈Pn(−1)⟨R,Q⟩=4n δR,I\sum_{Q\in\mathcal{P}_n}(-1)^{\langle R,Q\rangle} = 4^n\,\delta_{R,\id}

    Every non-identity Pauli anticommutes with exactly half of Pn\mathcal{P}_n:

  2. ∑Q(−1)⟨P′,Q⟩fQ=∑PpP∑Q(−1)⟨PP′,Q⟩=4n pP′\sum_Q(-1)^{\langle P',Q\rangle}f_Q = \sum_Pp_P\sum_Q(-1)^{\langle PP',Q\rangle} = 4^n\,p_{P'}

    Multiply fQf_Q by (−1)⟨P′,Q⟩(-1)^{\langle P',Q\rangle}, sum over QQ, and use the bilinearity ⟨P,Q⟩+⟨P′,Q⟩≡⟨PP′,Q⟩(mod2)\langle P,Q\rangle+\langle P',Q\rangle\equiv\langle PP',Q\rangle\pmod 2:

  3. pP=14n∑Q(−1)⟨P,Q⟩fQ,pI=14n∑QfQp_P = \frac{1}{4^n}\sum_Q(-1)^{\langle P,Q\rangle}f_Q,\qquad p_{\id} = \frac{1}{4^n}\sum_Qf_Q

    So the 4n4^n fidelities and the 4n4^n error rates determine each other. In particular, the probability of no error is the average Pauli fidelity. This is how modern Pauli-noise learning works: the fQf_Q are measured as decay rates of Pauli expectation values and transformed into error rates.

Twirling

In practice you twirl a noisy gate, not bare noise. For a Clifford gate UU, insert a random Pauli RR before it and the Pauli URU†URU^\dagger after it. Ideally the two cancel, while the noise in between is twirled. Compiling the random Paulis into neighboring single-qubit gates costs no extra depth: this is randomized compiling (Wallman & Emerson 2016), building on Knill's Pauli-frame randomization.

Pauli before the CNOTPauli after it that undoes the first
X⊗IX\otimes\idX⊗XX\otimes X
I⊗X\id\otimes XI⊗X\id\otimes X
Z⊗IZ\otimes\idZ⊗IZ\otimes\id
I⊗Z\id\otimes ZZ⊗ZZ\otimes Z
Conjugation by CNOT (control first): XX spreads from control to target, ZZ from target to control. Products follow by multiplication.
Check your understanding

A gate suffers a coherent ZZ over-rotation, E(ρ)=e−iϵZ/2ρ eiϵZ/2\mathcal{E}(\rho) = e^{-i\epsilon Z/2}\rho\,e^{i\epsilon Z/2}. What is its Pauli twirl?

  1. The identity channel: twirling removes the error
  2. The depolarizing channel with p=ϵ2p = \epsilon^2
  3. A dephasing channel: ZZ errors with probability sin⁡2(ϵ/2)\sin^2(\epsilon/2)
  4. A bit-flip channel with probability sin⁡2(ϵ/2)\sin^2(\epsilon/2)
Show the answer

C. A dephasing channel: ZZ errors with probability sin⁡2(ϵ/2)\sin^2(\epsilon/2)

The single Kraus operator is cos⁡ϵ2 I−isin⁡ϵ2 Z\cos\tfrac\epsilon2\,\id-i\sin\tfrac\epsilon2\,Z, so χII=cos⁡2ϵ2\chi_{\id\id} = \cos^2\tfrac\epsilon2 and χZZ=sin⁡2ϵ2\chi_{ZZ} = \sin^2\tfrac\epsilon2, plus off-diagonal terms. Twirling keeps the diagonal: ρ↦cos⁡2ϵ2 ρ+sin⁡2ϵ2 ZρZ\rho\mapsto\cos^2\tfrac\epsilon2\,\rho+\sin^2\tfrac\epsilon2\,Z\rho Z.

Process fidelity and average fidelity

Two fidelities quantify how close a channel is to the identity. The entanglement (process) fidelity FeF_e sends half of a maximally entangled state ∣Φ⟩=d−1/2∑i∣ii⟩\ket\Phi = d^{-1/2}\sum_i\ket{ii} through the channel; the average fidelity averages over pure inputs drawn from the unitarily invariant (Haar) measure:

Fe=⟨Φ|(id⊗E)(∣Φ⟩ ⁣⟨Φ∣)|Φ⟩=1d2∑k∣Tr⁡Kk∣2=χII,Favg=∫dψ  ⟨ψ|E(∣ψ⟩ ⁣⟨ψ∣)|ψ⟩F_e = \mel{\Phi}{(\mathrm{id}\otimes\mathcal{E})(\dyad{\Phi})}{\Phi} = \frac{1}{d^2}\sum_k\abs{\Tr K_k}^2 = \chi_{\id\id},\qquad F_{\text{avg}} = \int d\psi\;\mel{\psi}{\mathcal{E}(\dyad\psi)}{\psi}
DerivationProof via the symmetric subspace
  1. ⟨ψ|E(∣ψ⟩ ⁣⟨ψ∣)|ψ⟩=∑k∣⟨ψ|Kk|ψ⟩∣2=∑kTr⁡[(Kk⊗Kk†) ∣ψ⟩ ⁣⟨ψ∣⊗2]\mel{\psi}{\mathcal{E}(\dyad\psi)}{\psi} = \sum_k\abs{\mel{\psi}{K_k}{\psi}}^2 = \sum_k\Tr\Big[(K_k\otimes K_k^\dagger)\,\dyad{\psi}^{\otimes2}\Big]

    Write the integrand with two copies of ∣ψ⟩\ket\psi:

  2. ∫dψ ∣ψ⟩ ⁣⟨ψ∣⊗2=I+Fd(d+1)\int d\psi\,\dyad{\psi}^{\otimes2} = \frac{\id+\mathbb{F}}{d(d+1)}

    The Haar average of ∣ψ⟩ ⁣⟨ψ∣⊗2\dyad\psi^{\otimes2} commutes with every U⊗UU\otimes U and is supported on the symmetric subspace, so it is the normalized projector onto it (F\mathbb{F} is the swap operator):

  3. Favg=1d(d+1)∑k(∣Tr⁡Kk∣2+Tr⁡(Kk†Kk))F_{\text{avg}} = \frac{1}{d(d+1)}\sum_k\Big(\abs{\Tr K_k}^2+\Tr\big(K_k^\dagger K_k\big)\Big)

    Use Tr⁡[(A⊗B) I]=Tr⁡A Tr⁡B\Tr[(A\otimes B)\,\id] = \Tr A\,\Tr B and Tr⁡[(A⊗B) F]=Tr⁡(AB)\Tr[(A\otimes B)\,\mathbb{F}] = \Tr(AB):

  4. Favg=d2Fe+dd(d+1)=dFe+1d+1□F_{\text{avg}} = \frac{d^2F_e+d}{d(d+1)} = \frac{dF_e+1}{d+1}\qquad\square

    Completeness gives ∑kTr⁡(Kk†Kk)=d\sum_k\Tr(K_k^\dagger K_k) = d, and ∑k∣Tr⁡Kk∣2=d2Fe\sum_k\abs{\Tr K_k}^2 = d^2F_e:

Because twirling preserves χII\chi_{\id\id}, it preserves both fidelities. Twirling over the Clifford group, a unitary 2-design, goes further and yields the depolarizing channel with the same FavgF_{\text{avg}}; its decay under random Clifford sequences is what randomized benchmarking measures. For a qubit the average error rate is r=1−Favg=23(1−Fe)r = 1-F_{\text{avg}} = \tfrac23(1-F_e), so a Pauli channel has r=23(pX+pY+pZ)r = \tfrac23(p_X+p_Y+p_Z).

Predict before you look

A single-qubit Pauli channel has pX=pY=pZ=10−3p_X = p_Y = p_Z = 10^{-3}. What is its average gate infidelity rr, in units of 10−310^{-3}?

Show the answer

2 × 10⁻³

Fe=pI=1−3×10−3F_e = p_{\id} = 1-3\times10^{-3}, so r=dd+1(1−Fe)=23×3×10−3=2×10−3r = \tfrac{d}{d+1}(1-F_e) = \tfrac23\times3\times10^{-3} = 2\times10^{-3}. The average fidelity counts inputs that an error leaves unharmed: an XX error does nothing to ∣±⟩\ket\pm, for example.

The diamond norm, and why coherent errors are dangerous

Unlike average infidelity, the diamond distance is a worst-case quantity that composes well: d⋄(E2E1,F2F1)≤d⋄(E2,F2)+d⋄(E1,F1)d_\diamond(\mathcal{E}_2\mathcal{E}_1,\mathcal{F}_2\mathcal{F}_1)\le d_\diamond(\mathcal{E}_2,\mathcal{F}_2)+d_\diamond(\mathcal{E}_1,\mathcal{F}_1), and it is stable under tensoring with the identity. That is why threshold theorems are proven for diamond-norm error rates. How do the two measures compare?

DerivationAverage infidelity versus diamond distance
  1. d⋄(E,id)  ≥  1−Fe=d+1d rd_\diamond(\mathcal{E},\mathrm{id})\;\ge\;1-F_e = \frac{d+1}{d}\,r

    Lower bound. Feed in ∣Φ⟩\ket\Phi and test with the projector ∣Φ⟩ ⁣⟨Φ∣\dyad\Phi, which detects any deviation with probability 1−Fe1-F_e:

  2. d⋄(E,id)  ≤  d1−Fe=d(d+1) rd_\diamond(\mathcal{E},\mathrm{id})\;\le\;d\sqrt{1-F_e} = \sqrt{d(d+1)\,r}

    Upper bound. The Fuchs–van de Graaf inequality bounds the distance between Choi states by 1−Fe\sqrt{1-F_e}, and the diamond norm exceeds the trace norm of the normalized Choi operator by at most a factor dd:

  3. E(ρ)=∑PpP PρP⟹d⋄(E,id)=1−pI\mathcal{E}(\rho) = \sum_Pp_P\,P\rho P\quad\Longrightarrow\quad d_\diamond(\mathcal{E},\mathrm{id}) = 1-p_{\id}

    Pauli channels saturate the lower bound. For a qubit this means d⋄=32rd_\diamond = \tfrac32r.

  4. r=10−4:d⋄ Pauli=1.5×10−4,d⋄ coherent≈1.2×10−2r = 10^{-4}:\qquad d_\diamond^{\,\text{Pauli}} = 1.5\times10^{-4},\qquad d_\diamond^{\,\text{coherent}}\approx1.2\times10^{-2}

    Coherent errors sit near the square-root end. For U=e−iϵX/2U = e^{-i\epsilon X/2}, Fe=cos⁡2ϵ2F_e = \cos^2\tfrac\epsilon2 but d⋄=∣sin⁡ϵ2∣d_\diamond = \abs{\sin\tfrac\epsilon2}. With r=23sin⁡2ϵ2r = \tfrac23\sin^2\tfrac\epsilon2 that is d⋄=3r/2d_\diamond = \sqrt{3r/2}:

Error modelWhat can failSurface-code threshold
Code capacitydata qubits only, e.g. independent depolarizing errorsof order 10%
Phenomenologicaldata qubits and syndrome bitsa few %
Circuit-levelevery gate, idle step, preparation and measurementabout 1% or below
Erasureerrors at known locations50% with perfect checks (bond percolation)
The standard hierarchy of noise models used in QEC, with rough surface-code thresholds.

Key takeaways

  • Channels expand in the Pauli basis as E(ρ)=∑PQχPQPρQ\mathcal{E}(\rho) = \sum_{PQ}\chi_{PQ}P\rho Q; Pauli channels have diagonal χ\chi, and their error rates and Pauli fidelities are related by a Walsh–Hadamard transform.
  • Pauli twirling (in practice, randomized compiling) deletes the off-diagonal χPQ\chi_{PQ}, turning any noise into stochastic Pauli errors with the same fidelities.
  • Favg=(dFe+1)/(d+1)F_{\text{avg}} = (dF_e+1)/(d+1), proven with the Haar average over the symmetric subspace.
  • The diamond distance is the worst-case, composable error measure: d+1dr≤d⋄≤d(d+1)r\tfrac{d+1}{d}r\le d_\diamond\le\sqrt{d(d+1)r}, with Pauli noise at the bottom and coherent errors near the top.

Check yourself

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

Question 1

Twirling a channel over the nn-qubit Pauli group preserves which of the following?

  1. The full χ\chi matrix
  2. The diamond distance to the identity
  3. The diagonal of χ\chi, and hence both FeF_e and FavgF_{\text{avg}}
  4. Only the purity of output states
Show the answer

C. The diagonal of χ\chi, and hence both FeF_e and FavgF_{\text{avg}}

The twirl keeps χPP\chi_{PP} and deletes χPQ\chi_{PQ} for P≠QP\ne Q. Since Fe=χIIF_e = \chi_{\id\id} and Favg=(dFe+1)/(d+1)F_{\text{avg}} = (dF_e+1)/(d+1), both fidelities are unchanged, while the diamond distance generally drops.

Question 2

A two-qubit gate has process fidelity Fe=0.99F_e = 0.99. What is its average gate fidelity?

  1. 0.9900.990
  2. 0.9930.993
  3. 0.9920.992
  4. 0.9800.980
Show the answer

C. 0.9920.992

d=4d = 4: Favg=(4×0.99+1)/5=4.96/5=0.992F_{\text{avg}} = (4\times0.99+1)/5 = 4.96/5 = 0.992.

Question 3

Which statement about a single-qubit Pauli channel with total error probability p=pX+pY+pZp = p_X+p_Y+p_Z is correct?

  1. Its diamond distance to the identity is pp, and its average infidelity is 2p/32p/3
  2. Its diamond distance to the identity is p\sqrt p
  3. Its average infidelity is pp
  4. Its diamond distance to the identity is 2p/32p/3
Show the answer

A. Its diamond distance to the identity is pp, and its average infidelity is 2p/32p/3

Pauli channels saturate the lower bound: d⋄=1−pI=pd_\diamond = 1-p_{\id} = p, while r=23(1−Fe)=23pr = \tfrac23(1-F_e) = \tfrac23p.

Question 4

Why are fault-tolerance thresholds stated in terms of the diamond norm rather than average infidelity?

  1. Because the diamond norm is easier to measure experimentally
  2. Because average infidelity can be negative
  3. Because the diamond distance is always smaller, which gives better thresholds
  4. Because it bounds the worst case over all inputs, including entangled ones, and adds up under composition
Show the answer

D. Because it bounds the worst case over all inputs, including entangled ones, and adds up under composition

In a long computation, errors act on states entangled with the rest of the computer. The diamond distance bounds the damage for every such input and is subadditive under composition, so a per-gate bound becomes a whole-circuit bound.

Further reading

  • C. H. Bennett, D. P. DiVincenzo, J. A. Smolin & W. K. Wootters, "Mixed-state entanglement and quantum error correction", Physical Review A 54, 3824 (1996).
  • M. A. Nielsen, "A simple formula for the average gate fidelity of a quantum dynamical operation", Physics Letters A 303, 249 (2002).
  • J. J. Wallman & J. Emerson, "Noise tailoring for scalable quantum computation via randomized compiling", Physical Review A 94, 052325 (2016).
  • A. Yu. Kitaev, "Quantum computations: algorithms and error correction", Russian Mathematical Surveys 52, 1191 (1997).
  • J. Watrous, The Theory of Quantum Information, Ch. 3 (Cambridge, 2018).