• Error Correction

Pauli Twirling

Pauli twirling is a noise tailoring technique that converts arbitrary quantum noise channels into Pauli channels by randomly applying Pauli gates before and after operations, simplifying error characterization and mitigation.

Real quantum noise is rarely as simple as the textbook depolarizing channel. Gate errors on actual hardware include coherent components (small miscalibrated rotations), non-Markovian memory effects, and leakage to non-computational states, all of which make the noise difficult to model or cancel. Pauli twirling addresses this by deliberately randomizing the noise into a simpler form. The idea is to randomly insert a Pauli operator P chosen from {I, X, Y, Z} (or more generally from the n-qubit Pauli group) before each gate and its conjugate P after the gate. Because P*P = I, this insertion has no net effect on the ideal computation. But it changes the noise: the random Pauli conjugations average out the off-diagonal elements of the noise channel’s process matrix, leaving only diagonal Pauli error terms. The result is a Pauli channel, where each error is a tensor product of Pauli operators with some probability.

Why Pauli channels are easier to work with

A Pauli channel is characterized entirely by a probability distribution over Pauli errors: p_I for no error, p_X for a bit flip, p_Y for both, p_Z for a phase flip (and their tensor products for multiple qubits). This structure is much easier to characterize by randomized benchmarking and much easier to simulate classically using stabilizer methods. More importantly, Pauli channels are incoherent: they cannot cause coherent cancellation or amplification of errors across different runs. This means that error mitigation techniques based on linearity, such as zero-noise extrapolation (ZNE) or probabilistic error cancellation (PEC), work more predictably after twirling because the noise model they assume (a Pauli channel) matches the actual noise more closely.

Gate twirling versus Clifford twirling

Two variants are commonly used. Gate twirling applies random Pauli pairs around a single target gate (such as a two-qubit CNOT or echoed cross-resonance gate), tailoring the noise on that gate alone. It requires only 16 Pauli combinations for a two-qubit gate and adds minimal circuit depth. Clifford twirling, also called randomized benchmarking, applies random Clifford unitaries to full circuit layers, averaging over a much larger group. Clifford twirling gives a stronger noise-tailoring guarantee and is the basis of simultaneous randomized benchmarking for characterizing crosstalk-aware gate error rates. The trade-off is circuit overhead: Clifford twirling requires compiling random Clifford gates on top of the target circuit, which roughly doubles depth. In practice, gate twirling is preferred when the goal is to prepare a noise-tailored circuit for ZNE or PEC, while Clifford twirling is used for characterization.

Integration with error mitigation pipelines

Pauli twirling is built into IBM’s Qiskit Runtime as a transpilation option (twirling=True) and is applied automatically when using the Estimator primitive in resilience modes 1 and 2. In a typical workflow, the user submits a circuit and an observable; the runtime generates multiple twirled copies of the circuit, executes all of them, and averages the expectation values. The averaging suppresses coherent errors and converts the noise into a Pauli channel amenable to further mitigation. ZNE then extrapolates this averaged signal to the zero-noise limit by rescaling gate error rates. PEC corrects the Pauli channel exactly (in expectation) by running circuits with quasi-probabilistic gate inversions. Both techniques are more accurate and more sample-efficient when applied after twirling than when applied to raw, un-twirled circuits with arbitrary coherent noise.

See also