The Bloch Sphere
Every pure state of a single qubit can be visualized as a point on the surface of a unit sphere — the Bloch sphere. The state |psi> = cos(theta/2)|0> + e^(i phi)sin(theta/2)|1> maps to spherical coordinates (theta, phi), where theta is the polar angle from the north pole and phi is the azimuthal angle in the equatorial plane. This elegant representation transforms abstract quantum states into geometric intuition.
Key States
The north pole (theta=0) is |0>, the south pole (theta=180) is |1>. The equator (theta=90) contains all equal superpositions: |+> = (|0>+|1>)/sqrt(2) at phi=0, |-> = (|0>-|1>)/sqrt(2) at phi=180, and |i> = (|0>+i|1>)/sqrt(2) at phi=90. The polar angle theta determines the measurement probabilities: P(|0>) = cos^2(theta/2) and P(|1>) = sin^2(theta/2).
Quantum Gates as Rotations
Every single-qubit quantum gate corresponds to a rotation of the Bloch sphere. This simulator lets you apply four fundamental gates:
- Hadamard (H): Rotates by pi around (X+Z)/sqrt(2). Maps |0> to |+> and |1> to |->.
- Pauli-X: Rotates by pi around X axis. Bit flip: swaps |0> and |1>.
- Pauli-Z: Rotates by pi around Z axis. Phase flip: |1> acquires a minus sign.
- T-gate: Rotates by pi/4 around Z axis. Adds a phase of e^(i pi/4) to |1>.
Probability Bars
The probability bars on the right show |alpha|^2 (probability of measuring |0>) and |beta|^2 (probability of measuring |1>) in real time. These always sum to 1. When the state is at the equator, both probabilities are 50%. As the state moves toward a pole, one probability approaches 1.
From One Qubit to Quantum Computing
While the Bloch sphere describes only a single qubit, it provides the foundation for understanding quantum computing. Multi-qubit systems exhibit entanglement — correlations that cannot be captured by individual Bloch spheres — but the single-qubit rotations visualized here remain the building blocks of all quantum circuits. The gate set {H, T, CNOT} is universal for quantum computation.