Years 11–12 · Week 5 of 12

Single-Qubit Gates as Matrices

55 minutes 7 possible star points Mathematical Extension for Year 12

Learning goals

By the end, you can…

  • Apply I, X, Z and H matrices to simple state vectors.
  • Identify the qualitative actions of Y, S and T gates.
  • Explain why an ideal quantum gate is unitary and reversible.
  • Track gate order when matrices act on column state vectors.

What you already know

Connect to a familiar idea

Gates change quantum states. Matrix notation now makes those changes calculable and shows why ideal gates preserve total probability.

  • Two-by-two matrix multiplication
  • Normalised one-qubit state vectors
  • Relative phase and computational-basis measurement

Opening story

Start with something familiar

A coordinate transformation can rotate or reflect an arrow without destroying its length. A unitary gate similarly transforms a state vector while preserving its normalisation.

Plain-English explanation

Build the idea carefully

Matrices that act on qubit states

A one-qubit gate U acts by matrix multiplication: |ψout⟩ = U|ψin⟩. For example, X = [[0, 1], [1, 0]], so X|0⟩ = |1⟩ and X|1⟩ = |0⟩. I leaves every state unchanged. Z = [[1, 0], [0, −1]] leaves |0⟩ unchanged and adds a relative minus sign to |1⟩. H = (1/√2)[[1, 1], [1, −1]] changes between the Z and X bases: H|0⟩ = |+⟩ and H|1⟩ = |−⟩.

Unitarity, reversibility and gate families

Y swaps |0⟩ and |1⟩ with phase factors involving i. S adds a phase of i to the |1⟩ amplitude, and T adds a phase of e^(iπ/4). Students may use their qualitative actions in core mode without completing complex-number calculations. An ideal gate is unitary: U†U = I, where U† is the conjugate transpose. Unitary operations preserve inner products and normalisation and have inverse U†. Measurement is not represented as an ordinary reversible unitary gate on the measured system alone.

Try the model

Single-qubit gate matrix explorer

Select I, X, Y, Z, H, S or T, choose an input state, and step through the row-by-column calculation or use core mode to view the result directly.

Interactive teaching model
|0⟩ Choose a gate to begin Measure

Qubit 0 is the least-significant state-vector bit. Displayed basis labels read q(n−1)…q0.

Ready. Adjust a control, then run the model.

What this model shows: Detailed complex arithmetic is optional; every mode displays the same ideal unitary transformation.

Text alternative for this interactive

Text alternative: the X matrix swaps the two vector entries; Z changes the sign of the second; H forms the scaled sum and difference.

Expected observation: Applying X to |0⟩ produces |1⟩, while applying H to |0⟩ produces equal-magnitude amplitudes and applying X twice returns the input state.

Guided activity

Predict, multiply, verify

  1. Calculate X|0⟩, Z|+⟩ and H|1⟩ by hand.
  2. Check each output in the matrix explorer.
  3. Apply X twice and H twice to two different input states.
  4. Identify the inverse of each tested gate and justify the answer.

Evidence to collect: Three correct matrix-vector products, normalisation checks and simulation results showing X² = I and H² = I on the tested states.

Glossary

Words to know

matrix
A rectangular array of numbers representing a linear transformation.
unitary
A matrix U satisfying U†U = I, so it preserves inner products.
identity gate
The gate I that leaves every state unchanged.
Pauli gates
The X, Y and Z single-qubit gates.
Hadamard gate
The gate H that changes between the Z and X bases.
conjugate transpose
The transpose of a matrix with each entry also complex-conjugated.
inverse
A transformation that undoes another transformation.

Short recap

Keep these ideas

  • One-qubit gates are represented by two-by-two matrices.
  • X swaps basis amplitudes, Z changes relative phase and H forms sums and differences.
  • Y, S and T require complex phase for their full descriptions.
  • Ideal unitary gates preserve normalisation and can be reversed.

Knowledge check

7 clear questions

Choose an answer for immediate feedback. You may retry, and your best submitted score is kept.

1Which statement best answers this lesson's essential question?
2Which idea is supported by the explanation?
3Which result should you look for in the interactive model?
4Which statement correctly fixes the common misconception?
5Where does the helpful analogy stop being exact?
6What evidence should the guided activity collect?
7Which statement belongs in the lesson recap?
Mathematical Extension Optional extension for Year 12

Write Y = [[0, −i], [i, 0]], S = [[1, 0], [0, i]] and T = [[1, 0], [0, e^(iπ/4)]]. Verify U†U = I for one of these matrices and identify its inverse.

Try this

Calculate S|+⟩ and then S²|+⟩. Compare S² with Z and explain why T² = S using their diagonal phase factors.

Adult support Teacher and parent notes

Discuss

  • Why does unitarity imply preservation of total probability?
  • Which gates are their own inverses?
  • Why is measurement not modelled as a reversible one-qubit gate?

Answer guidance

Check matrix order, the factor 1/√2 in H and phase signs. Core students may describe Y, S and T qualitatively; extension students should use complex entries accurately.

Offline activity

Prepare gate and state-vector cards. Students perform matrix-vector products on mini-whiteboards, then pair each gate with an inverse.

Safety

No hardware is required. Treat matrix animations as representations of state change, not as pictures of a physical gate moving through a qubit.

Open the full Quantum Computing Foundations adult guide

Sources and further reading

Checked references for this lesson

These sources support the lesson’s main scientific claims. Links open on the source organisation’s site.

  1. Circuits IBM Quantum Learning · official learning module · checked 2026-08-02
  2. The qubit in quantum computing Microsoft Learn · official documentation · checked 2026-08-02
  3. Quantum Computation and Quantum Information Cambridge University Press · textbook publisher page · checked 2026-08-02

Content review: Reviewed on 2026-08-02.