Understanding Pauli Gates (X, Y, Z)

An intuitive overview of the Pauli operators, their matrices, and how they transform qubits.

Why the Pauli gates matter

Pauli X, Y, and Z are the fundamental single-qubit operations. They flip amplitudes and phases and form a basis for more complex gates.

Matrices

X = [[0, 1],
     [1, 0]]

Y = [[0, -i],
     [i,  0]]

Z = [[1,  0],
     [0, -1]]

Action on basis states

  • X: swaps |0⟩ and |1⟩.
  • Y: like X with a phase — rotates around Y-axis on the Bloch sphere.
  • Z: flips the phase of |1⟩, rotation around Z-axis.

Bloch sphere intuition

X is a π-rotation around the X-axis, Y around the Y-axis, Z around the Z-axis. Applied twice, each returns the qubit to its original state.

Try them in Qly

Open the Playground, start with |0⟩, place X to get |1⟩. Combine H then Z then H to emulate an X via basis change. Experiment with measurement statistics.

Compositions and identities

  • H Z H = X
  • H X H = Z
  • S X S† = Y

Where Pauli gates show up

From error correction (stabilizers) to variational algorithms, Paulis are everywhere. Measuring along different axes effectively measures Pauli observables.