3D Qubit & Bloch Sphere Gates
Interactive 3D Bloch sphere driven by real 2x2 complex gate matrices: apply X, Y, Z, Hadamard or an arbitrary axis-angle rotation, watch the qubit state vector rotate, and run repeated projective measurements that collapse the state and converge to the true probabilities.
A single qubit's pure state |ψ⟩ = cos(θ/2)|0⟩ + eiφsin(θ/2)|1⟩ corresponds to exactly one point on the Bloch sphere. This simulation represents the state as two literal complex amplitudes and applies every gate — X, Y, Z, Hadamard, S, T, or a fully general axis-angle rotation you choose — as a real 2×2 complex matrix multiplication, then re-derives the Bloch vector and measurement probabilities from the result. A "Measure once" button performs an actual weighted-random projective measurement that collapses the state, while "Run N trials" repeatedly samples the current probabilities to show the outcome frequency converge toward P(|0⟩) = cos²(θ/2) and P(|1⟩) = sin²(θ/2).
Manipulate a single qubit's state on a 3D Bloch sphere with real-time matrix multiplications and observe measurement probabilities. Rotate, zoom, and apply various gates to see how they affect the quantum state vector.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install