Bloch sphere (qubit)
About this app
1-qubit states on the Bloch sphere — apply X/Y/Z/H/S/T gates, measure, follow the trace of rotations.
A qubit as a point on a sphere
A qubit can be in a superposition of the basis states |0⟩ and |1⟩: |ψ⟩ = cos(θ/2)|0⟩ + e^(iφ) sin(θ/2)|1⟩. The two angles θ and φ define a point on the surface of a sphere, the Bloch sphere. The north pole stands for |0⟩, the south pole for |1⟩, and equal superpositions such as |+⟩ = (|0⟩ + |1⟩)/√2 lie on the equator. Every single-qubit gate acts as a rotation of the sphere about some axis. A measurement gives 0 with probability P(0) = cos²(θ/2) = (1 + z)/2, after which the state sits on the measured pole.
What the app shows
The app shows a qubit’s state arrow in 3D. The Pauli gates X, Y and Z rotate it by 180° about their axes, the Hadamard gate H by 180° about the diagonal between X and Z, the S gate by 90° and the T gate by 45° about the Z axis. Each rotation is animated and can leave a trail. The state panel shows ψ, the Bloch angles and the measurement probabilities for 0 and 1.
Things to try
Start at |0⟩ and press H: the arrow tips onto the equator and both outcomes become equally likely. Then press T or S a few times and notice that only the phase φ changes while the probabilities stay the same. A second H turns |+⟩ back into |0⟩. “Measure” collapses the state randomly onto a pole; “Reset” returns it to |0⟩.
Frequently asked questions
- What is the Bloch sphere?
- The Bloch sphere is a geometric picture of the state of a single qubit. Every pure state corresponds to exactly one point on the surface, described by two angles θ and φ. The poles represent the basis states |0⟩ and |1⟩.
- What does the Hadamard gate do?
- The Hadamard gate H maps |0⟩ to (|0⟩ + |1⟩)/√2 and |1⟩ to (|0⟩ − |1⟩)/√2, turning a basis state into an equal superposition. On the Bloch sphere it is a 180° rotation about the axis halfway between X and Z. Applying it twice returns the original state.
- What happens when you measure a qubit?
- A measurement in the standard basis returns 0 or 1 at random, with probabilities |α|² and |β|² for the state α|0⟩ + β|1⟩. Afterwards the qubit is in the measured basis state and the superposition is gone. On the Bloch sphere the arrow jumps to the north or south pole.
- What can I try in this app?
- You apply the X, Y, Z, H, S and T gates to a qubit and see each rotation on the Bloch sphere, optionally with a trail. A panel shows the state, the Bloch angles and the measurement probabilities, and you can measure or reset the qubit.
Subject: Quantum computing
A VisuApp by heyprof: interactive, free in your browser, no sign-up. What is a VisuApp? · All apps