beginner · Physics · Math Foundations: Linear Algebra
Checkpoint: Linear Algebra for Qubits
This lesson brings together every linear-algebra tool from Module 2 and shows how
each one has a direct role in describing single-qubit operations.
The qubit state space
A single qubit lives in C2. Any pure state is a normalised column
vector
∣ψ⟩=α∣0⟩+β∣1⟩=(αβ),∣α∣2+∣β∣2=1.
The computational basis vectors ∣0⟩=(10)
and ∣1⟩=(01) are orthonormal: their inner
products satisfy ⟨0∣0⟩=⟨1∣1⟩=1 and
⟨0∣1⟩=0. The norm condition ∥∣ψ⟩∥=1
is therefore equivalent to the Born-rule requirement that probabilities sum to 1.
Single-qubit gates as 2×2 unitary matrices
Every physically allowed operation on a qubit is a unitary linear map:
a 2×2 matrix U satisfying U†U=I. Two gates that appear
constantly are the Pauli-X and the Hadamard.
The Pauli-X gate flips the two basis states. Its matrix is
X=(0110).
One can verify X†X=I directly: X is real and symmetric, so
X†=X, and X2=I.
The Hadamard gate creates an equal superposition:
H=21(111−1).
A short calculation confirms it is unitary:
H†H=21(111−1)21(111−1)=21(2002)=I.
Composing gates: matrix multiplication
Applying H and then X to ∣0⟩ means computing the matrix product
X⋅(H∣0⟩), or equivalently (XH)∣0⟩. Working step by step:
This is the ∣+⟩ eigenstate of X, with both amplitudes equal to
21.
Step 2 — apply X to ∣+⟩:
X∣+⟩=(0110)21(11)=21(11)=∣+⟩.
The state is unchanged: ∣+⟩ is an eigenvector of X with
eigenvalue +1. This is a direct consequence of the eigenvalue equation
X∣+⟩=(+1)∣+⟩, which can be verified by the characteristic
polynomial of X:
det(X−λI)=det(−λ11−λ)=λ2−1=0⟹λ=±1.
The eigenvalue +1 eigenvector satisfies (X−I)v=0, giving
v1=v2, i.e. the normalised form 21(11)=∣+⟩.
Eigenvalues and measurement outcomes
The eigenvalue equation connects linear algebra directly to physics: measuring
a qubit in the eigenbasis of the observable X (the Pauli-X operator) gives
outcome +1 with certainty when the state is ∣+⟩, because
∣+⟩ is the +1 eigenstate of X. More generally, if the state is
∣ψ⟩ and we measure observable A with eigenvalues λj and
normalised eigenvectors ∣j⟩, the probability of outcome λj is
∣⟨j∣ψ⟩∣2 (the Born rule) and the expected value is
⟨A⟩=⟨ψ∣A∣ψ⟩=j∑λj∣⟨j∣ψ⟩∣2.
This expectation value formula is a direct application of matrix multiplication
and inner products — the same operations practised throughout this module.
Try it
Build a one-qubit circuit that applies H and then X to qubit 0. After
pressing Run you should see both amplitudes equal 21≈0.707 — confirming that XH∣0⟩=∣+⟩ exactly as
computed above.
Run your code to see the quantum state.
Sign in on the full site to ask questions and join the discussion.