The Pauli-Z gate looks like it does nothing if you only ever look at the basis states: |0⟩ stays at |0⟩, and |1⟩ becomes −|1⟩. The minus sign is invisible if you only measure in the standard basis.
The change is real, though. Apply Z to |+⟩ and you get |−⟩. That's why the demo above starts at |+⟩. On the Bloch sphere, Z is a 180° rotation about the z-axis.
Related concepts
- Pauli-X: 180° rotation about x (quantum NOT).
- Pauli-Y: 180° rotation about y.
- T gate: a 45° phase rotation about z (Z = T4).
- What is a quantum gate? The umbrella concept.
Frequently asked questions
What does Pauli-Z do? It looks like it does nothing to |0⟩ or |1⟩.
Right. Pauli-Z leaves |0⟩ unchanged and just flips the sign of |1⟩. On a basis state alone you can't see the difference. But Z absolutely changes a superposition: apply Z to |+⟩ and you get |−⟩. That phase flip is detectable when you measure in the right basis.
Is Z self-inverse?
Yes. Z² = I. Apply Z twice and you're back where you started.