|q⟩ Bad Qubits

beginner · Physics · Math Foundations: Calculus, Probability & Statistics

Checkpoint: Statistics of a Qubit

A qubit is not simply 0 or 1 — it is a superposition whose measurement statistics can be fully predicted from the state vector. This checkpoint asks you to apply the probability, mean, and variance formulas you have built up in Module 3 directly to a qubit state.

From amplitudes to probabilities

A general single-qubit state is

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

with α,β∈C\alpha, \beta \in \mathbb{C} and the normalisation condition ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1. When the qubit is measured in the computational basis, the Born rule gives

P(0)=∣α∣2,P(1)=∣β∣2.P(0) = |\alpha|^2, \qquad P(1) = |\beta|^2.

These are the only two possible outcomes; they form a valid probability distribution because they are non-negative and sum to one.

Eigenvalues and the measurement random variable

To compute a mean and variance we need numerical eigenvalues. A standard convention assigns eigenvalue 00 to outcome ∣0⟩|0\rangle and eigenvalue 11 to outcome ∣1⟩|1\rangle, so the measurement defines a random variable XX with distribution

P(X=0)=∣α∣2,P(X=1)=∣β∣2.P(X = 0) = |\alpha|^2, \qquad P(X = 1) = |\beta|^2.

Mean. By definition,

⟨X⟩=0⋅∣α∣2+1⋅∣β∣2=∣β∣2.\langle X \rangle = 0 \cdot |\alpha|^2 + 1 \cdot |\beta|^2 = |\beta|^2.

The mean equals the probability of measuring ∣1⟩|1\rangle — a useful shortcut for this particular eigenvalue assignment.

Mean square. Because 02=00^2 = 0 and 12=11^2 = 1,

⟨X2⟩=02⋅∣α∣2+12⋅∣β∣2=∣β∣2.\langle X^2 \rangle = 0^2 \cdot |\alpha|^2 + 1^2 \cdot |\beta|^2 = |\beta|^2.

Note that ⟨X2⟩=⟨X⟩\langle X^2 \rangle = \langle X \rangle for this binary variable with eigenvalues 00 and 11.

Variance. Applying Var⁡(X)=⟨X2⟩−⟨X⟩2\operatorname{Var}(X) = \langle X^2 \rangle - \langle X \rangle^2,

Var⁡(X)=∣β∣2−∣β∣4=∣β∣2(1−∣β∣2)=∣β∣2 ∣α∣2.\operatorname{Var}(X) = |\beta|^2 - |\beta|^4 = |\beta|^2\bigl(1 - |\beta|^2\bigr) = |\beta|^2\,|\alpha|^2.

This is maximised at ∣α∣2=∣β∣2=1/2|\alpha|^2 = |\beta|^2 = 1/2 (the uniform superposition, e.g. H∣0⟩H|0\rangle), where Var⁡(X)=1/4\operatorname{Var}(X) = 1/4, and it vanishes when the state is either ∣0⟩|0\rangle or ∣1⟩|1\rangle — a perfectly predictable outcome carries zero variance.

A worked example

Consider ∣ψ⟩=13∣0⟩+23∣1⟩|\psi\rangle = \tfrac{1}{\sqrt{3}}|0\rangle + \sqrt{\tfrac{2}{3}}|1\rangle. The amplitudes give

∣α∣2=13,∣β∣2=23.|\alpha|^2 = \frac{1}{3}, \qquad |\beta|^2 = \frac{2}{3}.

Check normalisation: 13+23=1\tfrac{1}{3} + \tfrac{2}{3} = 1. Then

⟨X⟩=23,\langle X \rangle = \frac{2}{3},

Var⁡(X)=23⋅13=29≈0.222.\operatorname{Var}(X) = \frac{2}{3} \cdot \frac{1}{3} = \frac{2}{9} \approx 0.222.

The standard deviation is σ=2/9=2/3≈0.471\sigma = \sqrt{2/9} = \sqrt{2}/3 \approx 0.471.

Try it

This is a numerical exercise — your code should return a number, not a circuit. The qubit is in state ∣ψ⟩=13∣0⟩+23∣1⟩|\psi\rangle = \tfrac{1}{\sqrt{3}}|0\rangle + \sqrt{\tfrac{2}{3}}|1\rangle. Eigenvalues are 00 for ∣0⟩|0\rangle and 11 for ∣1⟩|1\rangle. Compute the variance of a single measurement outcome.

Run your code to see the quantum state.

Sign in on the full site to ask questions and join the discussion.