HomeQuantum PhysicsQubit State Explorer: 2D Visualization

Qubit Gates: Polar Projections & Measurement Histogram

Two 2D projections of a qubit's Bloch vector plus a live measurement-probability histogram, driven by real 2x2 complex gate matrices: apply X, Y, Z, Hadamard or a general rotation and watch repeated projective measurements converge to cos^2(theta/2) and sin^2(theta/2).

Quantum Physics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
qubits-overview ↗ Open standalone

A single qubit's pure state |ψ⟩ = cos(θ/2)|0⟩ + esin(θ/2)|1⟩ lives on the Bloch sphere, but a sphere is awkward to read exactly on a flat screen. This 2D companion draws the same state as two honest projections — a top-down disc showing the phase φ and equatorial radius sinθ, and a side-on disc showing the height cosθ — both updated by real 2×2 complex gate matrices (X, Y, Z, Hadamard, S, T, or a general axis-angle rotation you set yourself). A live probability bar shows P(|0⟩) = cos²(θ/2) and P(|1⟩) = sin²(θ/2), and the measurement panel runs an actual weighted-random projective measurement — a single collapsing shot, or a batch of up to 1000 repeated trials whose outcome histogram converges to those exact probabilities.

⚙ Under the hood

Explore a single qubit's pure state |ψ⟩ = cos(θ/2)|0⟩ + e^(iφ)sin(θ/2)|1⟩ in 2D, with real matrix multiplications for gates and rotations. Measure probabilities and run trials to see convergence towards true measurement outcomes.

quantum computingqubitBloch spherequantum gatesmeasurement

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)