One qubit, one sphere
A classical bit is 0 or 1. A qubit is a blend of both: α|0⟩ + β|1⟩, with |α|² + |β|² = 1. Drop the global phase and two angles remain, so every pure qubit state is a point on the surface of a sphere: the Bloch sphere. The north pole is |0⟩, the south pole |1⟩, the equator the even blends.
In this picture every single-qubit gate is a rotation. X is a half turn about the x axis; Z a half turn about z; H a half turn about the axis halfway between x and z. Measurement is not a rotation: it slams the vector to one of the poles, with a probability set by how close it was, and it cannot be undone.
Press H twice: you go to the equator and come back north, because H is its own inverse. Press T eight times: a full turn about z. Measure while on the equator and you get |0⟩ or |1⟩ half the time each; the sphere never tells you which, only the odds.
A watched qubit never boils
Picture a drive that keeps turning the qubit slowly from |0⟩ toward |1⟩. Left alone, it arrives at |1⟩ in a fixed time. Now measure it N times within that time. Each measurement catches the vector while it is still nearly north and most likely slams it back north; the rotation starts over every time.
The chance of staying north over each interval is cos²(π/2N). Staying through all N intervals is its N-th power, and it goes to 1 as N grows. This is the quantum Zeno effect: look often enough and the system never changes. The project takes its name from it. Slice time finely enough and the arrow never moves.
A three-qubit circuit
With more than one qubit the sphere is not enough: the state of n qubits is a vector of 2ⁿ complex amplitudes and gates are matrices that multiply it. That is the entire job of a simulator; zeno does it fast on Apple Silicon’s NEON vector units, fusing gates to cut memory traffic. The tiny simulator below does the same computation with eight amplitudes, in front of you.
Load Bell: two qubits become entangled and only |00⟩ and |11⟩ survive. Measuring one fixes the other. GHZ spreads the same to three qubits. In the even superposition all eight states are equally likely; Z and T gates turn only the phases without touching the probabilities, so the bars stay still but the dials spin.
- bloch
- A single qubit’s state space is a sphere; gates rotate, measurement collapses.
- zeno
- Frequent measurement freezes evolution: survival cos²ᴺ(π/2N) → 1.
- statevector
- 2ⁿ amplitudes for n qubits; simulation is multiplying that vector gate by gate.
- in the code
- github.com/cleoanka/zeno