Skip to content
Quantum ComputingAN INTERACTIVE OPEN TEXTBOOK
charithj.com.au

Pauli gates and the Hadamard gate

Bit flips, phase flips and a change of basis.

10 min readDr. Charith Jayasekara↓ Chapter PDF
By the end, you’ll be able to
  • Calculate the effect of X, Y, Z and H on basis states.
  • Verify HZH = X using a worked input.
X=(0110),Y=(0−ii0),Z=(100−1).X=\begin{pmatrix}0&1\\1&0\end{pmatrix},\quad Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix},\quad Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.

X exchanges ∣0⟩\lvert0\rangle and ∣1⟩\lvert1\rangle. Y sends ∣0⟩\lvert0\rangle to i∣1⟩i\lvert1\rangle and ∣1⟩\lvert1\rangle to −i∣0⟩-i\lvert0\rangle. Z leaves ∣0⟩\lvert0\rangle alone and negates ∣1⟩\lvert1\rangle.

Each Pauli squares to I. On a basis state, Z’s minus may be only a global phase; on a superposition it can change a relative phase.

H∣0⟩=∣+⟩,H∣1⟩=∣−⟩.H\lvert0\rangle=\lvert+\rangle,\qquad H\lvert1\rangle=\lvert-\rangle.

Because H2=IH^2=I, it also maps ∣+⟩\lvert+\rangle back to 0 and ∣−⟩\lvert-\rangle back to 1. This is why H before Z readout implements an X-basis measurement.

Trace HZH∣0⟩HZH\lvert0\rangle: the first H gives plus, Z gives minus, and the second H gives 1. On ∣1⟩\lvert1\rangle, the sequence gives 0. Thus HZH=XHZH=X on a basis, hence on all states by linearity.

Use the qubit explorer to compare X and Y on ∣0⟩\lvert0\rangle. Their outcome probabilities agree, but their statevectors differ by a global phase. Then test them on a superposition: agreement on one input is not agreement as operators.

Reference: IBM Quantum — Single systems.

ONE IDEA FURTHER

Ready for the next step?

Your progress stays in this browser.