Foundations

Single-Qubit Explorer

Explore quantum states, gates and Bloch-sphere transformations.

Bloch sphere

θ = 0° · φ = 0°

Drag to orbit the visualization. The orientation does not change the quantum state.

Circuit

Input |0⟩ · no gates yet
History

    Select any step to inspect it; the sphere, state and probabilities show the state after that step. New gates and measurements are always added at the end.

    Gate inspector

    Try it

    Short guided experiments. Make a prediction first, then check it against the simulation.

    Global phase and relative phase

    Global phase: not observable

    eiγ|ψ⟩ ≃ |ψ⟩

    Multiplying the whole state by eiγ changes nothing physical. Every probability is |eiγα|² = |α|², and the Bloch coordinates depend only on α*β and |α|², |β|², in which the factor cancels. So eiγ|ψ⟩ and |ψ⟩ are the same physical state, even though they are different vectors. We write “≃” for this equivalence and keep “=” for exact equality.

    Relative phase: observable

    α|0⟩ + eiφβ|1⟩

    A phase on one amplitude only is different. It leaves P(0) and P(1) unchanged, but it is the Bloch azimuth φ and it changes interference. For example H(|0⟩ + eiφ|1⟩)/√2 gives P(0) = cos²(φ/2): 100% for φ = 0, 50% for φ = 90°, 0% for φ = 180°.

    Rz separates the two

    Rz(φ) = e−iφ/2 · diag(1, eiφ)

    Rz(φ)(α|0⟩ + β|1⟩) = e−iφ/2 (α|0⟩ + eiφβ|1⟩). The factor e−iφ/2 in front is a global phase and is invisible; the factor eiφ on |1⟩ is a relative phase and turns the Bloch vector by φ about Z.

    Why Rz(φ)|0⟩ does not move the Bloch vector

    Rz(φ)|0⟩ = e−iφ/2|0⟩. The state vector really does change (its amplitude acquires the phase e−iφ/2), but β = 0, so there is no second amplitude for a relative phase to act on: the only change is a global phase. Geometrically, |0⟩ is the north pole, which lies on the Z axis, and a rotation never moves points on its own axis. Compare Rz(φ)|+⟩, where the vector moves around the equator.

    Why a 2π rotation gives −|ψ⟩

    The rotation matrices depend on θ/2: Rn(θ) = cos(θ/2) I − i sin(θ/2) n·σ. At θ = 2π this is cos(π) I − i sin(π) n·σ = −I, so Rn(2π)|ψ⟩ = −|ψ⟩ = eiπ|ψ⟩. That is a global phase π: the probabilities and the Bloch vector are exactly as before, so it is the same physical state, but not the same vector. The state vector itself returns to +|ψ⟩ only after 4π. (Within this single-qubit lab the sign is unobservable; it can become observable when a rotation is applied conditionally, controlled by another qubit.)

    Each demonstration replaces the current circuit. Watch the state vector, the global phase γ and the relative phase φ in the State vector panel.

    Gate reference

    Each gate is a 2×2 unitary matrix acting on (α, β), and a rotation of the Bloch sphere (up to an unobservable global phase). Rx, Ry and Rz take an angle θ in radians.

    GateMatrixBloch rotationBloch coordinatesAmplitudesWhat it does

    What are you seeing?

    Every pure single-qubit state maps to a point on the Bloch sphere. The north pole is |0⟩, the south pole is |1⟩, and equatorial states are equal-probability superpositions. The vector encodes the relative phase as well as the measurement probabilities.

    Try H → S and observe the rotation from the +X direction to the +Y direction. Try H → T → T for the same effect. You can also change θ and φ directly using the sliders.

    For the parameterized rotations, try Ry(90°) from |0⟩ (the same state as H|0⟩), then Rz(90°), and finally Rx(360°): the Bloch vector returns, while the state vector picks up a factor −1.

    Then try Y from |0⟩: the gate inspector shows Y|0⟩ = i|1⟩. The factor i is a global phase. It appears in the state vector, but the Bloch vector and probabilities are exactly those of |1⟩. Compare with H → Z, where the minus sign is a relative phase that moves the Bloch vector from +X to −X.