DeepPractise
DeepPractise

Pauli-Z Gate

Track: Quantum Gates & Circuits · Difficulty: Beginner · Est: 13 min

Pauli-Z Gate

Overview

Pauli-Z (often just “Z”) is a single-qubit gate that illustrates a key quantum theme:

  • you can change a state in a way that does not change computational-basis probabilities,
  • yet still changes future measurement statistics in other bases.

Z is the canonical phase flip. It is one of the simplest examples of something with no true classical analogue.

Intuition

In the computational basis, the Z gate:

  • leaves 0|0\rangle alone,
  • multiplies 1|1\rangle by a minus sign.

That minus sign is a relative phase between the two basis components.

If you measure immediately in the computational basis, probabilities only depend on magnitudes like α2|\alpha|^2 and β2|\beta|^2. So a sign change may appear to “do nothing.”

But relative phase matters when amplitudes later interfere (for example, when you measure in a different basis). So Z changes the state in a way that becomes visible only in the right context.

On the Bloch sphere, Z corresponds to a 180° rotation about the zz axis. That means it flips the equator point at +xx to −xx (and +yy to −yy), while leaving the poles fixed.

Formal Description

Action on basis states

The defining action is

Z0=0,Z1=1.Z|0\rangle = |0\rangle,\qquad Z|1\rangle = -|1\rangle.

By linearity, for

ψ=α0+β1,|\psi\rangle = \alpha|0\rangle + \beta|1\rangle,

we get

Zψ=α0β1.Z|\psi\rangle = \alpha|0\rangle - \beta|1\rangle.

So Z keeps the 0|0\rangle amplitude and flips the sign (phase by π\pi) of the 1|1\rangle amplitude.

Minimal matrix form

In the computational basis,

Z=(1001).Z = \begin{pmatrix} 1 & 0\\ 0 & -1 \end{pmatrix}.

Read this as:

  • the first component (the 0|0\rangle component) is unchanged,
  • the second component (the 1|1\rangle component) gets a minus sign.

Worked Example

Start with

+=12(0+1).|+\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle + |1\rangle).

Apply Z:

Z+=12(01)=.Z|+\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle - |1\rangle) = | - \rangle.

Now notice:

  • Measuring +|+\rangle in the computational basis gives P(0)=P(1)=1/2P(0)=P(1)=1/2.
  • Measuring | - \rangle in the computational basis also gives P(0)=P(1)=1/2P(0)=P(1)=1/2.

So Z does not change computational-basis probabilities for this input.

But +|+\rangle and | - \rangle are perfectly distinguishable if you measure in the {+,}\{|+\rangle,| - \rangle\} basis:

  • +|+\rangle gives “+” with probability 1.
  • | - \rangle gives “−” with probability 1.

This is why Z has no clean classical analogue: it changes relative phase, which is only revealed through interference or a different measurement basis.

Turtle Tip

Turtle Tip

If a gate seems to “do nothing,” change the measurement basis. Phase changes often hide in the computational basis and show up elsewhere.

Common Pitfalls

Common Pitfalls
  • Don’t confuse a minus sign with “negative probability.” Probabilities come from squared magnitudes; a sign is a phase.
  • Don’t assume phase is unphysical. Global phase is unobservable, but relative phase affects interference and other-basis measurements.

Quick Check

Quick Check
  1. What does Z do to the amplitudes of ψ=α0+β1|\psi\rangle = \alpha|0\rangle + \beta|1\rangle?
  2. Why can Z change future measurement statistics even if computational-basis probabilities don’t change?

What’s Next

We now have two concrete Pauli gates:

  • X (bit-flip-like),
  • Z (phase-flip-like).

Next we will introduce another foundational single-qubit gate that creates and reveals interference in a very direct way, building on the phase intuition from Z.