The Bloch Sphere

Visualize any single-qubit state as a point on a 3D sphere

Every Qubit Lives on a Sphere

The Bloch sphere is a beautiful geometric representation of a single qubit. Every pure state |ψ⟩ = cos(θ/2)|0⟩ + esin(θ/2)|1⟩ maps to a unique point on the surface of a unit sphere, where θ is the polar angle and φ is the azimuthal angle.

|0⟩ sits at the north pole, |1⟩ at the south pole, and every other state lives somewhere on the surface. Quantum gates are simply rotations of this sphere.

The Bloch Sphere

Drag to orbit the sphere. Use the sliders to move the state vector (the glowing point) anywhere on the surface. Watch how the state equation, probabilities, and Bloch coordinates update in real time.

State
0.866|0⟩ + (0.35+0.35i)|1⟩
Probabilities
P(0)=75.0% P(1)=25.0%
Bloch Vector
(0.61, 0.61, 0.50)
Angles
θ=60° φ=45°
|0⟩ (north)equator|1⟩ (south)
|+⟩|−⟩|+⟩
States:

North Pole

θ = 0 → |0⟩ with 100% probability of measuring 0

South Pole

θ = π → |1⟩ with 100% probability of measuring 1

Equator

θ = π/2 → Equal superposition, 50/50 outcomes. Phase φ varies around the equator

Gates as Rotations

Every single-qubit gate corresponds to a rotation of the Bloch sphere. The X gate (NOT) is a 180° rotation around the X-axis — it flips |0⟩ to |1⟩. The Hadamard gate rotates 180° around an axis between X and Z, mapping |0⟩ to |+⟩. Click gates to see the state vector rotate in real time.

P(0) = 100.0%θ = 0°φ = 0°

Gate Quick Reference

X — 180° around X (bit flip)
Y — 180° around Y
Z — 180° around Z (phase flip)
H — 180° around (X+Z)/√2
S — 90° around Z (√Z)
T — 45° around Z (⁴√Z)

Trajectory Trails

Apply sequences of gates and watch the state trace colored arcs on the Bloch sphere. Each gate's rotation leaves a visible trail, building up a geometric record of the computation. Try the preset sequences to see famous gate identities visualized as paths that return to the same point.

Try this: Apply H → Z → H and watch it trace three arcs that end up at the same place as a single X gate. This is the identity HZH = X, visualized geometrically. The Hadamard gate "conjugates" Z into X by changing the rotation axis.

The Six Cardinal States

Six special states sit at the endpoints of the three axes. They form three mutually unbiased bases — measuring a state from one basis gives completely random results in the other two bases. Click each state to highlight it on the sphere.

|0⟩= |0⟩

North pole — ground state

θ = 0°φ = 0°P(0) = 100%P(1) = 0%

Eigenstates of the Z gate / measurement

Eigenstates of the X gate — created by H from Z basis

Eigenstates of the Y gate — related to circular polarization

Key Takeaways

  • Bloch sphere — Every single-qubit pure state is a point on a unit sphere, parameterized by θ and φ
  • Gates = rotations — Single-qubit gates are rotations of the Bloch sphere around specific axes
  • Composition — Gate sequences trace arcs; gate identities correspond to paths that return to the same point
  • Three bases — Z (computational), X (Hadamard), and Y (circular) bases correspond to the three sphere axes