Lab
Small experiments that run in the browser, with the equations behind them.
The Bloch sphere
one qubit|ψ⟩ = 1|0⟩
θ = 0 · φ = 0
Any pure state of one qubit can be written, up to an unobservable global phase, with two angles:
Read as polar and azimuthal angles and every state becomes a point on a unit sphere: at the north pole, at the south, and equal superpositions around the equator.
The useful fact is that every single-qubit gate is a rotation of that sphere. Up to global phase,
rotates the Bloch vector by angle about the axis . That is all the simulator above does — it never stores amplitudes, only the arrow, and turns it with Rodrigues' formula:
| Gate | Axis | Angle |
|---|---|---|
| X, Y, Z | x, y, z | π |
| H | (x + z)/√2 | π |
| S | z | π/2 |
| T | z | π/4 |
The probability of measuring 0 is the height of the arrow: . Try H then T repeatedly: the state walks around the equator and the probabilities never change — the information is all in the phase.
Limits: one qubit, pure states only. Entanglement has no picture here — two entangled qubits don't each have their own arrow. For that, see qsim-rs.
Next
planned- exp. 002Decoherence: T₁ and T₂ on the Bloch sphere.
- exp. 003Grover's search, step by step.
- on the home pageChaos: Lorenz, Yu-Wang and Thomas attractors.