Visualise a qubit state on the Bloch sphere and apply quantum gates in real time. Pauli X, Y, Z, Hadamard, S and T gates rotate the state vector, showing how quantum computation manipulates superposition and phase.
Every single-qubit state |ψ⟩ = α|0⟩ + β|1⟩ maps to a unique point on the Bloch sphere. Quantum gates are rotations: X rotates 180° around the x-axis (bit flip), Z around z (phase flip), H maps |0⟩ to an equal superposition on the equator.
Click gate buttons to apply them sequentially. Watch the state vector rotate smoothly on the sphere. The probability display shows |α|² and |β|² updating live. The gate log records your sequence.
The Bloch sphere is named after Felix Bloch, who developed it to visualise nuclear magnetic resonance states. IBM's quantum processors let anyone run real qubit gates on the cloud using the same Bloch-sphere visualisation.
This simulation places a single qubit on the Bloch sphere, a unit sphere where every pure single-qubit state |ψ⟩ = α|0⟩ + β|1⟩ corresponds to one surface point. The state is stored as the complex amplitudes α and β, and applying a gate multiplies that two-component vector by the gate's 2×2 unitary matrix. The Bloch coordinates are computed directly from the amplitudes, so each quantum gate appears on screen as a precise rotation of the state arrow.
It shows how single-qubit gates act on a quantum state. Internally the state is a vector [α, β] of complex amplitudes, and each gate (X, Y, Z, H, S, T) is its standard 2×2 unitary matrix. The Bloch vector is derived as x = 2Re(α*β), y = |α|²−|β|², z = 2Im(α*β), with |α|² and |β|² giving the measurement probabilities of |0⟩ and |1⟩.
Click the X, Y, Z, H, S or T buttons to apply each gate in sequence; the purple arrow rotates smoothly to the new state. The Reset button returns the qubit to |0⟩. Drag with the mouse to orbit the 3D view, and scroll to zoom. Live panels report θ, φ, the α and β amplitudes, the P(|0⟩)/P(|1⟩) bars and a running gate history.
The Hadamard gate turns |0⟩ into an equal superposition (|0⟩ + |1⟩)/√2, the building block of quantum parallelism. Applying H twice returns the qubit exactly to |0⟩, because the Hadamard matrix is its own inverse.
A qubit is the basic unit of quantum information, written |ψ⟩ = α|0⟩ + β|1⟩ where α and β are complex amplitudes with |α|² + |β|² = 1. The Bloch sphere is a geometric picture in which every such pure state is a single point on a unit sphere, with |0⟩ at the north pole and |1⟩ at the south pole.
The qubit is held as the amplitude pair [α, β], and each gate is its standard 2×2 unitary matrix. Pressing a button multiplies the current state by that matrix, producing the new α and β. The Bloch coordinates and the |α|² and |β|² probabilities are then recomputed and the arrow animates to its new orientation.
X, Y and Z are the Pauli gates: X is a bit flip (180° rotation about the x-axis), Z is a phase flip about z, and Y combines both. H (Hadamard) maps |0⟩ to an equal superposition on the equator. S adds a 90° phase and T a 45° phase, both rotations about the z-axis.
Yes. It uses the exact unitary matrices for the X, Y, Z, H, S and T gates and the standard formulas for the Bloch vector, so the displayed rotations and probabilities match real single-qubit quantum mechanics. The model omits measurement collapse and noise, focusing instead on the unitary evolution of an idealised, perfectly isolated qubit.
Between gates a qubit exists in superposition, a weighted complex combination of |0⟩ and |1⟩ described by α and β. The square magnitudes |α|² and |β|² are the probabilities of reading 0 or 1 if you measure. Only at measurement does the state collapse to a definite bit, which is why the sphere can show intermediate orientations.