cleoanka

an interactive page · quantum

A watched qubit never boils

Rotate a qubit, measure it, measure it again. From the Bloch sphere to the quantum Zeno effect and a small circuit simulator.

canvas & code, no dependencies · zeno on GitHub


1

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.

FIG. 1 — Press gates and watch the vector turn. Drag the sphere to spin the view. “Measure” collapses the state; “measure ×1000” prepares a thousand copies of the same state and counts the outcomes.

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.

2

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.

FIG. 2 — Left, a single run: the vector turns and every red flash is a measurement. Right, the probability that all N measurements find |0⟩, i.e. that it never leaves: the line is cos²ᴺ(π/2N), the dots are counts from the runs you launch.
3

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.

FIG. 3 — Pick a gate, then click a cell on the grid. For CX click the control first, then the target in the same column. Click a gate again to remove it. Bars are the probability of each basis state; the small dial is the amplitude’s phase.

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.