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

Understanding qubits

Meet the smallest quantum information system, with a sphere you can explore.

12 min readDr. Charith Jayasekara↓ Chapter PDF
By the end, you’ll be able to
  • Describe a pure qubit using amplitudes and angles.
  • Predict computational-basis measurement probabilities.
  • Distinguish a mathematical state from one measured bit.

A pure qubit lives in a two-dimensional complex vector space. After removing an unobservable global phase, we can write it as

∣ψ⟩=cos⁡(θ/2)∣0⟩+eiϕsin⁡(θ/2)∣1⟩.\lvert\psi\rangle=\cos(\theta/2)\lvert0\rangle+ e^{i\phi}\sin(\theta/2)\lvert1\rangle.

The polar angle θ\theta sets the Z-basis probabilities. The azimuth ϕ\phi sets the relative phase. The explorer uses degrees for its controls; the formula uses radians.

At θ=0\theta=0, the state is ∣0⟩\lvert0\rangle. At θ=180°\theta=180°, it is ∣1⟩\lvert1\rangle, up to a global phase. Along the equator, θ=90°\theta=90° and both Z outcomes have probability 1/21/2.

L01 · INTERACTIVE LABRuns on your device

Qubit explorer

A pure qubit is a normalised pair of complex amplitudes. The sphere shows the state; the bars show measurement probabilities in the Z basis.

Make a prediction first

Move the state to the equator. What will happen to the Z-basis probabilities when you change only the phase?

Experiment controls
|0⟩|1⟩xyz|ψ⟩
Exact probability
|0⟩
50.0%
|1⟩
50.0%

Exact ideal-model predictions · run a measurement experiment to compare.

MODEL · Ideal pure-state vector, complex double precisionORDER · q0 is the leftmost bit
Take it further

Create a state with a 75% probability of measuring 1. Can you find two different phases with the same probabilities?

Choose θ=120°\theta=120° and ϕ=90°\phi=90°. Then

∣ψ⟩=12∣0⟩+i32∣1⟩.\lvert\psi\rangle=\frac12\lvert0\rangle+i\frac{\sqrt3}{2}\lvert1\rangle.

Therefore P(0)=1/4P(0)=1/4 and P(1)=3/4P(1)=3/4. A 1,024-shot experiment has expected counts 256 and 768, but its observed counts fluctuate.

The arrow is a geometric representation of an ideal pure state. It is not a tiny physical arrow inside every device. Mixed states belong inside the Bloch sphere; this particular explorer stays on the surface and does not model decoherence.

PAUSE & THINK

You change only φ while keeping θ fixed. What stays the same?

Choose your answer

Reference: Microsoft Learn — The qubit.

ONE IDEA FURTHER

Ready for the next step?

Your progress stays in this browser.