Qubit Manipulation: Bloch-Vector Gates & Decoherence (2D)
2D single-qubit lab: apply X/Y/Z/H gates to a Bloch vector, watch depolarizing decoherence shrink it over a tunable coherence time, inject noisy-gate errors, and collapse the state with a real projective Z-basis measurement.
This 2D companion models a single qubit as a real Bloch vector rather than a decorative scene: X/Y/Z/H gate buttons apply the exact Bloch-sphere rotation matrices, a coherence-time slider drives genuine exponential depolarizing decay toward the mixed state, a gate-error-rate slider injects stochastic Pauli noise into each operation, and the measure button performs an honest projective Z-basis collapse with probabilities read straight off the current vector — so every number on the readout panel follows directly from the physics, not from a cosmetic animation.
2D single-qubit lab with Bloch-vector gate rotations (X/Y/Z/H), an exponential depolarizing-decoherence model, stochastic gate-error injection, and a real projective Z-basis measurement that collapses the state.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install
It is the standard geometric picture of a single qubit's state: a point (x, y, z) inside a unit sphere, where the north pole (0,0,1) is |0⟩ and the south pole (0,0,-1) is |1⟩. Points on the surface are pure states; points inside represent mixed (partially decohered) states.
As a depolarizing channel: the Bloch vector shrinks exponentially toward the origin (the maximally mixed state) with a time constant set by the coherence-time slider, r(t) = r0 · exp(-t/T).
Each time you apply a gate, there is a chance — set by this slider — that a random extra Pauli operation (X, Y or Z) is applied alongside it, modelling the imperfect fidelity of a real quantum gate.