The Bloch Sphere

3.5 hours ~5 min read

Two real numbers describe a qubit's state — and two real numbers are the latitude and longitude of a point on a sphere. The Bloch sphere turns the algebra of C2\mathbb{C}^2 into geometry you can see: states are points, gates are rotations, orthogonal states are antipodes. It is the single most useful picture in all of single-qubit quantum computing, and we'll lean on it constantly.

Learning Objectives

After this lesson you will be able to:

  1. Derive the Bloch-sphere parametrization ∣ψ⟩=cos⁡θ2∣0⟩+eiφsin⁡θ2∣1⟩\lvert\psi\rangle = \cos\tfrac\theta2\lvert0\rangle + e^{i\varphi}\sin\tfrac\theta2\lvert1\rangle.
  2. Compute the Bloch vector r⃗=(⟨X⟩,⟨Y⟩,⟨Z⟩)\vec r = (\langle X\rangle, \langle Y\rangle, \langle Z\rangle) of a pure state.
  3. Locate the standard states (∣0⟩,∣1⟩,∣±⟩,∣±i⟩\lvert0\rangle,\lvert1\rangle,\lvert\pm\rangle,\lvert\pm i\rangle) on the sphere.
  4. Explain why antipodal points are orthogonal and why gates act as rotations.
  5. Map states to Bloch vectors in NumPy.

Intuition

In 1.1.1 E5 we counted a qubit's degrees of freedom: four real numbers in C2\mathbb{C}^2, minus one for normalization, minus one for the unobservable global phase, leaving two. Two angles parametrize a sphere. So the set of pure qubit states is (geometrically) the surface of a unit ball — the Bloch sphere. The north and south poles are ∣0⟩\lvert0\rangle and ∣1⟩\lvert1\rangle; the equator holds the "equal-superposition" states whose only difference is a relative phase. Once you internalize this, single-qubit gates stop being matrices and become rotations of a sphere, which is far easier to reason about.


Theory

The parametrization

Start from a general ∣ψ⟩=α∣0⟩+β∣1⟩\lvert\psi\rangle = \alpha\lvert0\rangle + \beta\lvert1\rangle. Write α,β\alpha,\beta in polar form and factor out the global phase of α\alpha (which is unobservable, 1.1.1). Normalization ∣α∣2+∣β∣2=1|\alpha|^2+|\beta|^2 = 1 lets us set ∣α∣=cos⁡θ2|\alpha| = \cos\tfrac\theta2, ∣β∣=sin⁡θ2|\beta| = \sin\tfrac\theta2 for a unique θ∈[0,π]\theta\in[0,\pi]. The only surviving phase is the relative phase φ∈[0,2π)\varphi\in[0,2\pi) between β\beta and α\alpha. Hence

 ∣ψ(θ,φ)⟩=cos⁡θ2 ∣0⟩+eiφsin⁡θ2 ∣1⟩  \boxed{\ \lvert\psi(\theta,\varphi)\rangle = \cos\tfrac{\theta}{2}\,\lvert0\rangle + e^{i\varphi}\sin\tfrac{\theta}{2}\,\lvert1\rangle\ }

The half-angle θ/2\theta/2 is not a typo — it's what makes the map to the sphere exact (and why a 2π2\pi rotation in θ\theta takes you only halfway, the famous spin-12\tfrac12 sign; see Exercises).

The Bloch vector

Map ∣ψ(θ,φ)⟩\lvert\psi(\theta,\varphi)\rangle to the point

r⃗=(sin⁡θcos⁡φ, sin⁡θsin⁡φ, cos⁡θ)∈S2. \vec r = (\sin\theta\cos\varphi,\ \sin\theta\sin\varphi,\ \cos\theta) \in S^2 .

The components are exactly the expectation values of the Pauli operators:

r⃗=(⟨X⟩, ⟨Y⟩, ⟨Z⟩),⟨σk⟩=⟨ψ∣σk∣ψ⟩. \vec r = \big(\langle X\rangle,\ \langle Y\rangle,\ \langle Z\rangle\big), \qquad \langle\sigma_k\rangle = \langle\psi|\sigma_k|\psi\rangle .

Derivation of the zz-component. $\langle Z\rangle = \langle\psi|Z|\psi\rangle = |\alpha|^2 - |\beta|^2 = \cos^2\tfrac\theta2 - \sin^2\tfrac\theta2 = \cos\theta = r_z$. ✓ Similarly (Exercise E1) ⟨X⟩=sin⁡θcos⁡φ\langle X\rangle = \sin\theta\cos\varphi and ⟨Y⟩=sin⁡θsin⁡φ\langle Y\rangle = \sin\theta\sin\varphi. For a pure state ∣r⃗∣=1|\vec r| = 1 (on the surface); mixed states (1.5.3) live inside the ball with ∣r⃗∣<1|\vec r| < 1, and ρ=12(I+r⃗⋅σ⃗)\rho = \tfrac12(I + \vec r\cdot\vec\sigma) (Appendix E).

Landmarks on the sphere

            +z = |0>            (north pole, θ=0)
             |
   |-i> ----- + ----- |+i>      (±y on the equator)
            / | \
   |-> ---/   |   \--- |+>       (±x on the equator, φ=0 and φ=π)
             |
            -z = |1>            (south pole, θ=π)
State (θ,φ)(\theta,\varphi) Bloch vector r⃗\vec r Axis
∣0⟩\lvert0\rangle (0, −)(0,\,-) (0,0,+1)(0,0,+1) +z+z
∣1⟩\lvert1\rangle (π, −)(\pi,\,-) (0,0,−1)(0,0,-1) −z-z
∣+⟩\lvert+\rangle (π2,0)(\tfrac\pi2, 0) (+1,0,0)(+1,0,0) +x+x
∣−⟩\lvert-\rangle (π2,π)(\tfrac\pi2, \pi) (−1,0,0)(-1,0,0) −x-x
∣+i⟩\lvert{+}i\rangle (π2,π2)(\tfrac\pi2, \tfrac\pi2) (0,+1,0)(0,+1,0) +y+y
∣−i⟩\lvert{-}i\rangle (π2,3π2)(\tfrac\pi2, \tfrac{3\pi}2) (0,−1,0)(0,-1,0) −y-y

Antipodes are orthogonal; gates are rotations

Two key geometric facts:

  • Orthogonal ⟺ antipodal. A state and its orthogonal partner sit at opposite points of the sphere (θ→π−θ\theta\to\pi-\theta, φ→φ+π\varphi\to\varphi+\pi). E.g. ∣0⟩⊥∣1⟩\lvert0\rangle\perp\lvert1\rangle are the two poles; ∣+⟩⊥∣−⟩\lvert+\rangle\perp\lvert-\rangle are ±x\pm x. (Note: a 90°90° physical angle between measurement axes corresponds to a 180°180° angle on the Bloch sphere — the half-angle again.)
  • Unitaries are rotations. Every single-qubit unitary acts on r⃗\vec r as a rotation in SO(3)SO(3); in particular Rn(θ)=e−iθ n^⋅σ⃗/2R_n(\theta) = e^{-i\theta\,\hat n\cdot\vec\sigma/2} rotates the Bloch vector by angle θ\theta about axis n^\hat n (Appendix E). So XX is a 180°180° flip about x^\hat x, ZZ about z^\hat z, the Hadamard about (x^+z^)/2(\hat x+\hat z)/\sqrt2. This is the geometric heart of Term 2's gate algebra, and the picture behind Rabi precession (1.6.2).

All of this section, live. Jump between the landmarks and check that each orthogonal pair sits at opposite ends of a diameter; then apply gates and watch each one turn the whole sphere about a fixed axis, drawn dashed while it turns:

Interactive demo: Bloch sphere. Apply gates to one qubit and follow its state on the sphere, or shrink it into the ball to see mixed states.


Worked Examples

Example 1 — Bloch vector of ∣+⟩\lvert+\rangle

∣+⟩\lvert+\rangle has α=β=12\alpha=\beta=\tfrac1{\sqrt2}, so cos⁡θ2=12⇒θ=π2\cos\tfrac\theta2 = \tfrac1{\sqrt2}\Rightarrow\theta = \tfrac\pi2 and relative phase φ=0\varphi = 0. Then $\vec r = (\sin\tfrac\pi2\cos0,\ \sin\tfrac\pi2\sin0,\ \cos\tfrac\pi2) = (1,0,0)—the — the +xaxis.Directly: axis. Directly: \langle X\rangle = \langle+|X|+\rangle = 1,, \langle Y\rangle = \langle Z\rangle = 0$. ✓

Example 2 — From Bloch angles to a state vector

The point (θ,φ)=(π3,π2)(\theta,\varphi) = (\tfrac\pi3, \tfrac\pi2) corresponds to

∣ψ⟩=cos⁡π6∣0⟩+eiπ/2sin⁡π6∣1⟩=32∣0⟩+i2∣1⟩. \lvert\psi\rangle = \cos\tfrac\pi6\lvert0\rangle + e^{i\pi/2}\sin\tfrac\pi6\lvert1\rangle = \tfrac{\sqrt3}{2}\lvert0\rangle + \tfrac{i}{2}\lvert1\rangle .

Check ∣α∣2+∣β∣2=34+14=1|\alpha|^2+|\beta|^2 = \tfrac34 + \tfrac14 = 1 ✓, and ⟨Z⟩=34−14=12=cos⁡π3\langle Z\rangle = \tfrac34-\tfrac14 = \tfrac12 = \cos\tfrac\pi3 ✓.


Hands-on (Python)

import numpy as np

X = np.array([[0, 1], [1, 0]], dtype=complex)
Y = np.array([[0, -1j], [1j, 0]], dtype=complex)
Z = np.array([[1, 0], [0, -1]], dtype=complex)

def state(theta, phi):
    return np.array([np.cos(theta/2), np.exp(1j*phi)*np.sin(theta/2)], dtype=complex)

def bloch_vector(psi):
    """(<X>,<Y>,<Z>) for a single-qubit pure state."""
    return np.array([np.real(psi.conj() @ M @ psi) for M in (X, Y, Z)])

# Landmarks:
print(np.round(bloch_vector(state(0, 0)), 3))          # |0> -> [0 0 1]  (north pole)
print(np.round(bloch_vector(state(np.pi, 0)), 3))      # |1> -> [0 0 -1] (south pole)
print(np.round(bloch_vector(state(np.pi/2, 0)), 3))    # |+> -> [1 0 0]
print(np.round(bloch_vector(state(np.pi/2, np.pi/2)),3))# |+i>-> [0 1 0]

# Pure states have |r| = 1:
r = bloch_vector(state(1.1, 2.0))
print(round(np.linalg.norm(r), 6))                     # 1.0
# Antipodal = orthogonal. |+> at +x, |-> at -x:
plus  = state(np.pi/2, 0)
minus = state(np.pi/2, np.pi)
print(np.round(bloch_vector(plus), 3), np.round(bloch_vector(minus), 3))  # [1 0 0] [-1 0 0]
print(abs(np.vdot(plus, minus)))                       # 0.0  -> orthogonal

# A gate is a rotation: X flips the Bloch vector 180° about x (z -> -z).
psi0 = state(0, 0)                                     # |0>, r=(0,0,1)
print(np.round(bloch_vector(X @ psi0), 3))             # |1>, r=(0,0,-1)

For a rendered 3-D Bloch sphere, qutip's Bloch class is excellent (pip install qutip); we keep to the lightweight bloch_vector here to avoid an extra dependency, as in Appendix B §7.2.


Exercises

E1 (easy). Derive ⟨X⟩=sin⁡θcos⁡φ\langle X\rangle = \sin\theta\cos\varphi for ∣ψ(θ,φ)⟩\lvert\psi(\theta,\varphi)\rangle.

Solution

X∣ψ⟩=cos⁡θ2∣1⟩+eiφsin⁡θ2∣0⟩X\lvert\psi\rangle = \cos\tfrac\theta2\lvert1\rangle + e^{i\varphi}\sin\tfrac\theta2\lvert0\rangle. Then $\langle\psi|X|\psi\rangle = \cos\tfrac\theta2,e^{i\varphi}\sin\tfrac\theta2 + e^{-i\varphi}\sin\tfrac\theta2\cos\tfrac\theta2 = 2\sin\tfrac\theta2\cos\tfrac\theta2\cos\varphi = \sin\theta\cos\varphi,using, using \tfrac{e^{i\varphi}+e^{-i\varphi}}2=\cos\varphi$ and the double-angle identity. ∎

E2 (easy). Where on the sphere is ∣−i⟩=12(∣0⟩−i∣1⟩)\lvert{-}i\rangle = \tfrac1{\sqrt2}(\lvert0\rangle - i\lvert1\rangle)?

Solution

θ=π2\theta=\tfrac\pi2 (equal magnitudes), relative phase −i=e−iπ/2-i = e^{-i\pi/2} so φ=3π2\varphi = \tfrac{3\pi}2 (or −π2-\tfrac\pi2). r⃗=(cos⁡3π2, sin⁡3π2, 0)=(0,−1,0)\vec r = (\cos\tfrac{3\pi}2,\ \sin\tfrac{3\pi}2,\ 0) = (0,-1,0) — the −y-y axis.

E3 (medium). Show that orthogonal states map to antipodal Bloch vectors (r⃗⊥=−r⃗\vec r_\perp = -\vec r).

Solution

The orthogonal partner of ∣ψ(θ,φ)⟩\lvert\psi(\theta,\varphi)\rangle is ∣ψ(π−θ,φ+π)⟩\lvert\psi(\pi-\theta,\varphi+\pi)\rangle (check ⟨ψ⊥∣ψ⟩=0\langle\psi_\perp|\psi\rangle=0). Its Bloch vector: sin⁡(π−θ)=sin⁡θ\sin(\pi-\theta)=\sin\theta but cos⁡(φ+π)=−cos⁡φ\cos(\varphi+\pi)=-\cos\varphi, sin⁡(φ+π)=−sin⁡φ\sin(\varphi+\pi)=-\sin\varphi, and cos⁡(π−θ)=−cos⁡θ\cos(\pi-\theta)=-\cos\theta. So r⃗⊥=(−sin⁡θcos⁡φ,−sin⁡θsin⁡φ,−cos⁡θ)=−r⃗\vec r_\perp = (-\sin\theta\cos\varphi, -\sin\theta\sin\varphi, -\cos\theta) = -\vec r. ∎

E4 (medium). The gate S=diag⁡(1,i)S = \operatorname{diag}(1,i) acts on ∣+⟩\lvert+\rangle. Compute the new Bloch vector and describe the geometric action.

Solution

S∣+⟩=12(∣0⟩+i∣1⟩)=∣+i⟩S\lvert+\rangle = \tfrac1{\sqrt2}(\lvert0\rangle + i\lvert1\rangle) = \lvert{+}i\rangle, with r⃗=(0,1,0)\vec r = (0,1,0). So SS rotated the Bloch vector from +x+x to +y+y — a 90°90° rotation about the zz-axis (indeed S=eiπ/4Rz(π2)S = e^{i\pi/4}R_z(\tfrac\pi2), Appendix E).

Start at ∣+⟩\lvert+\rangle and press SS once to land on ∣+i⟩\lvert{+}i\rangle. Press it three more times and the state walks the equator a quarter-turn at a time, back to where it began:

Interactive demo: Bloch sphere. Apply gates to one qubit and follow its state on the sphere, or shrink it into the ball to see mixed states.

E5 (hard). Show that Rz(2π)=−IR_z(2\pi) = -I (not +I+I), and interpret: why does a "full rotation" return the Bloch vector to itself but multiply the state by −1-1?

Solution

Rz(θ)=e−iθZ/2=diag⁡(e−iθ/2,eiθ/2)R_z(\theta) = e^{-i\theta Z/2} = \operatorname{diag}(e^{-i\theta/2}, e^{i\theta/2}); at θ=2π\theta=2\pi this is diag⁡(e−iπ,eiπ)=diag⁡(−1,−1)=−I\operatorname{diag}(e^{-i\pi}, e^{i\pi}) = \operatorname{diag}(-1,-1) = -I. The Bloch vector is built from expectation values, which are invariant under the global phase −1-1, so it returns to itself after 2π2\pi. But the state vector picks up the global −1-1 and only returns to itself after 4π4\pi — the defining signature of spin-12\tfrac12 and the reason the parametrization uses the half-angle θ/2\theta/2. (This sign is unobservable for an isolated qubit but becomes a real relative phase in a controlled operation — Term 2.4.) ∎


Checkpoint

  1. Write the Bloch parametrization and explain the half-angle θ/2\theta/2.
  2. What are the three components of the Bloch vector in terms of observables?
  3. Give the Bloch vectors of ∣0⟩,∣1⟩,∣±⟩,∣±i⟩\lvert0\rangle,\lvert1\rangle,\lvert\pm\rangle,\lvert\pm i\rangle.
  4. How are orthogonality and antipodality related on the sphere?
  5. How do single-qubit unitaries act geometrically?
Answers
  1. ∣ψ⟩=cos⁡θ2∣0⟩+eiφsin⁡θ2∣1⟩\lvert\psi\rangle = \cos\tfrac\theta2\lvert0\rangle + e^{i\varphi}\sin\tfrac\theta2\lvert1\rangle; the half-angle makes the map to S2S^2 exact and reflects the 4π4\pi periodicity of spin-12\tfrac12.
  2. r⃗=(⟨X⟩,⟨Y⟩,⟨Z⟩)\vec r = (\langle X\rangle, \langle Y\rangle, \langle Z\rangle).
  3. ∣0⟩ ⁣:(0,0,1)\lvert0\rangle\!:(0,0,1), ∣1⟩ ⁣:(0,0,−1)\lvert1\rangle\!:(0,0,-1), ∣±⟩ ⁣:(±1,0,0)\lvert\pm\rangle\!:(\pm1,0,0), ∣±i⟩ ⁣:(0,±1,0)\lvert\pm i\rangle\!:(0,\pm1,0).
  4. Orthogonal states are exactly antipodal (r⃗⊥=−r⃗\vec r_\perp = -\vec r); a 90°90° axis angle = 180°180° on the sphere.
  5. As rotations in SO(3)SO(3): Rn^(θ)R_{\hat n}(\theta) rotates r⃗\vec r by θ\theta about axis n^\hat n.

Further Reading

  • [NC] Nielsen & Chuang, §1.2, §4.2 — the Bloch sphere and single-qubit rotations.
  • [Pre] Preskill, Ph219, Ch. 2 — qubit geometry.
  • [QuTiP] QuTiP Bloch class docs — for 3-D visualization.

← Prev: The Qubit · Up: Term 1 · Next: Bases & Expectation Values →

Ready to measure your state?

5 exercises · 10 checkpoint questions

Start the quiz