The Bloch Sphere

3.5 hours ~4 min read

The Bloch Sphere

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θ20+eiφsinθ21\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θ20+eiφsinθ21  \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. 01\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(θ)=eiθ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).

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π60+eiπ/2sinπ61=320+i21. \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=3414=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θ21+eiφsinθ20X\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(0i1)\lvert{-}i\rangle = \tfrac1{\sqrt2}(\lvert0\rangle - i\lvert1\rangle)?

Solution

θ=π2\theta=\tfrac\pi2 (equal magnitudes), relative phase i=eiπ/2-i = e^{-i\pi/2} so φ=3π2\varphi = \tfrac{3\pi}2 (or π2-\tfrac\pi2). r=(cos3π2, sin3π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+i1)=+iS\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).

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(θ)=eiθZ/2=diag(eiθ/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(eiπ,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θ20+eiφsinθ21\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