|q⟩ Bad Qubits

beginner · Programming · The Bloch Sphere

Picturing a Qubit

A qubit is the basic unit of quantum information. Like a classical bit it can be measured as 0 or 1, but before measurement it lives in a richer mathematical space. Any single-qubit pure state can be written

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

where α\alpha and β\beta are complex amplitudes satisfying ∣α∣2+∣β∣2=1|\alpha|^2 + |\beta|^2 = 1. The real-valued probabilities ∣α∣2|\alpha|^2 and ∣β∣2|\beta|^2 say how likely each outcome is when you measure, but the amplitudes themselves can interfere — a feature that has no classical counterpart.

The Bloch sphere

Because of the normalization constraint and the fact that an overall complex phase carries no physical meaning, the state space of a single qubit is actually a two-dimensional surface, not a four-dimensional one. A convenient way to see this is to write the general state in terms of two real angles θ∈[0,π]\theta \in [0, \pi] and ϕ∈[0,2π)\phi \in [0, 2\pi):

∣ψ⟩=cos⁡ ⁣θ2∣0⟩+eiϕsin⁡ ⁣θ2∣1⟩.|\psi\rangle = \cos\!\tfrac{\theta}{2}|0\rangle + e^{i\phi}\sin\!\tfrac{\theta}{2}|1\rangle.

These two angles parameterize every point on a unit sphere — the Bloch sphere. The north and south poles correspond to the computational basis states:

States along the equator (θ=π/2\theta = \pi/2) are equal superpositions. The most familiar ones sit on the ±x\pm x and ±y\pm y axes:

| State | θ\theta | ϕ\phi | Bloch direction | |---|---|---|---| | ∣0⟩|0\rangle | 00 | — | +z+z | | ∣1⟩|1\rangle | π\pi | — | −z-z | | ∣+⟩=12(∣0⟩+∣1⟩)|{+}\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle+|1\rangle) | π/2\pi/2 | 00 | +x+x | | ∣−⟩=12(∣0⟩−∣1⟩)|{-}\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle-|1\rangle) | π/2\pi/2 | π\pi | −x-x | | ∣+i⟩=12(∣0⟩+i∣1⟩)|{+i}\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle+i|1\rangle) | π/2\pi/2 | π/2\pi/2 | +y+y | | ∣−i⟩=12(∣0⟩−i∣1⟩)|{-i}\rangle = \tfrac{1}{\sqrt{2}}(|0\rangle-i|1\rangle) | π/2\pi/2 | 3π/23\pi/2 | −y-y |

Single-qubit gates as rotations

Every single-qubit unitary gate corresponds to a rotation of the Bloch sphere. For example:

This rotational picture makes it easy to reason about what a sequence of gates will do: you trace a path of rotations on the sphere rather than multiplying matrices step by step.

Understanding the Bloch sphere is a foundation for the entire module. Future lessons will use it to build intuition for phase kickback, gate decompositions, and eventually the structure of multi-qubit entanglement.

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