Pauli gates

Also known as: Pauli-X gate · Pauli-Y gate · Pauli-Z gate

On this page 7

Pauli gates are the three single-qubit operations X, Y and Z defined by the Pauli matrices, and they form the most basic building blocks of quantum gates & circuits in quantum computing. The Pauli-X gate flips the computational basis states, the Pauli-Z gate flips the relative phase, and the Pauli-Y gate does both at once, each corresponding to a rotation by 180 degrees about one axis of the Bloch sphere.

Beyond their role as gates, the Pauli operators are the language of quantum noise and error correction: errors are expanded in the Pauli basis, stabilizer codes are defined by products of Pauli operators, and hardware benchmarks report error rates per Pauli channel. Understanding them is therefore a prerequisite for reading almost any circuit diagram or error model.

How the Pauli gates act on a qubit

Each Pauli gate is a 2×2 unitary and Hermitian matrix, which means it is its own inverse: applying the same Pauli gate twice returns the qubit to its original state. The X gate swaps the amplitudes of |0⟩ and |1⟩, so it behaves as the quantum NOT gate. The Z gate leaves |0⟩ unchanged and multiplies |1⟩ by -1, which changes the relative phase without changing measurement probabilities in the computational basis.

The Y gate equals iXZ, so it flips the bit and applies a phase with an imaginary factor. Because global phase has no observable effect, Y is often described as “X and Z together”, but the factor of i matters when Y appears inside controlled gates or when operators are composed algebraically. The following table summarizes the action of each gate on the basis states.

GateMatrix rowsEffect on |0⟩Effect on |1⟩Bloch sphere action
Identity (I)[1, 0]; [0, 1]|0⟩|1⟩No rotation
Pauli-X[0, 1]; [1, 0]|1⟩|0⟩180 degrees about x
Pauli-Y[0, -i]; [i, 0]i|1⟩-i|0⟩180 degrees about y
Pauli-Z[1, 0]; [0, -1]|0⟩-|1⟩180 degrees about z
Action of the Pauli gates on computational basis states

Algebraic properties of the Pauli matrices

The Pauli matrices have a compact algebra that explains why they appear everywhere in quantum information. Each one squares to the identity, any two distinct Pauli matrices anticommute, and the product of two gives the third up to a phase factor of plus or minus i. Together with the identity, they form a basis for all 2×2 matrices, so any single-qubit operator or density matrix can be written as a weighted sum of I, X, Y and Z.

Their eigenvalues are +1 and -1, which makes them observables as well as gates. Measuring Z is the standard computational basis measurement, while measuring X or Y requires a basis change, typically a Hadamard gate before a Z measurement for X. The table below lists the relations that circuit designers and compilers use most often.

RelationExpressionPractical consequence
Self-inverseX² = Y² = Z² = ITwo identical Pauli gates cancel
AnticommutationXZ = -ZXReordering gates introduces a sign
Product ruleXY = iZ, YZ = iX, ZX = iYAny Pauli product stays a Pauli up to phase
EigenbasesX: |+⟩, |-⟩; Z: |0⟩, |1⟩Each Pauli defines a measurement basis
TraceTr(X) = Tr(Y) = Tr(Z) = 0Pauli components are easy to extract
Key algebraic relations of the Pauli operators

Products of Pauli operators on several qubits, such as X⊗Z⊗I, form the n-qubit Pauli group. This group, taken up to phases, has 4^n elements and underlies the stabilizer formalism, in which quantum states and codes are described by the Pauli operators that leave them unchanged.

Pauli gates are a subset of the Clifford gates, the operations that map Pauli operators to Pauli operators under conjugation. The Hadamard and Phase gates complete the single-qubit Clifford group, and the T gate lies outside it. Because Clifford circuits can be simulated efficiently on a classical computer, as stated by the Gottesman–Knill theorem, Pauli gates alone never provide a quantum speedup.

Each Pauli gate is also a special case of a rotation gate: X equals Rx(π) up to a global phase, and the same holds for Y and Z. The comparison below places the Pauli gates next to the neighbors they are most often confused with.

GateRotation angleClifford gateTypical role
Pauli X, Y, Zπ (half turn)YesBit and phase flips, error modeling
Hadamardπ about the x+z axisYesCreates superposition, swaps X and Z
Phase (S)π/2 about zYesQuarter-turn phase, maps X to Y
T gateπ/4 about zNoSupplies non-Clifford power for universality
Rotation gatesAny angleOnly at special anglesParameterized and variational circuits
Pauli gates compared with neighboring single-qubit gates

Where Pauli gates appear in circuits

In algorithms, Pauli gates mostly perform state preparation and bookkeeping. An X gate prepares |1⟩ from the default |0⟩ state, Z gates implement phase oracles in algorithms such as Deutsch–Jozsa and Grover search, and controlled versions give the CNOT gate (controlled-X) and the Controlled-Z gate, which are the standard entangling operations on most hardware.

  • Quantum teleportation uses classically controlled X and Z corrections on the receiving qubit.
  • Variational algorithms estimate energies by measuring Hamiltonians written as weighted sums of Pauli strings.
  • Stabilizer codes such as the surface code detect errors by measuring multi-qubit X-type and Z-type Pauli operators.
  • Randomized compiling and Pauli twirling insert random Pauli gates to convert coherent errors into stochastic Pauli noise.

On hardware, the Z gate is usually a virtual gate: compilers implement it by shifting the phase reference of subsequent microwave pulses, so it takes zero time and has essentially no error. X and Y gates on superconducting and trapped-ion devices are physical pulses with typical single-qubit fidelities from about 99.9 to 99.99 percent, depending on platform and calibration.

Pauli errors and common misconceptions

The Pauli operators double as the standard error model. A bit-flip error is an unwanted X, a phase-flip error is an unwanted Z, and a Y error combines both. Because the Paulis form a basis, correcting X and Z errors on each qubit is enough to correct any single-qubit error, a result known as error discretization.

MisconceptionWhy it is wrongCorrect view
Z does nothing visibleZ changes interference with later gatesPhase matters after a basis change
Y is simply X then ZIt differs by a factor of iTrack phases inside controlled gates
Pauli gates are universalThey generate only a finite groupAdd Hadamard, Phase, T and CNOT
All Pauli gates cost the sameZ is often virtual on hardwareCheck the native gate set
Common misconceptions about Pauli gates

A practical warning for compilers: commuting a Pauli gate past a Clifford gate changes which Pauli it becomes, for example H X H = Z. Optimizers exploit these rules to merge or cancel gates, but sign errors in hand-derived circuits are a frequent source of bugs.

Stripped to the essentials

A qubit can be pictured as an arrow pointing somewhere on a globe. The three Pauli gates turn that arrow halfway around one of three axes. X flips the arrow from the north pole to the south pole, like flipping a coin. Z leaves the poles alone but turns everything else around the vertical axis, a hidden change that shows up only later. Y does a flip and a turn together.

These three moves are simple, but they matter far beyond their size. Engineers use them to describe what goes wrong inside a quantum computer, since almost any small error can be broken down into some mix of X, Y and Z.

Where it is applied

A research team running a variational quantum eigensolver on a 20-qubit superconducting processor wants the ground-state energy of a small molecule. The molecular Hamiltonian is mapped to a sum of several hundred Pauli strings, such as Z⊗Z⊗I⊗X, each with a numerical weight. For every group of commuting strings, the circuit appends Hadamard or S-dagger and Hadamard gates to rotate X and Y measurements into the Z basis, then samples the qubits thousands of times.

To keep results stable, the team also applies Pauli twirling: each two-qubit gate is surrounded by randomly chosen Pauli gates that cancel ideally but turn coherent miscalibration into random Pauli noise. The outcome is a smoother, more predictable error profile, which makes error mitigation methods such as zero-noise extrapolation work reliably and brings the computed energy within the accuracy the experiment targets.