⭐ Starlight Tools

Quantum computing · Visualization · Private, in-browser

Quantum Superposition State Visualizer

Enter complex amplitudes or adjust Bloch angles θ, φ to see a live qubit on the Bloch sphere. Share the state, explore presets, and watch probabilities update as you drag.

Describe your qubit

Amplitudes are complex numbers: |ψ⟩ = α|0⟩ + β|1⟩. We normalize automatically.

Real
Imag
Real
Imag

Prefer Bloch angles? θ sets latitude (0→north pole). φ is phase around the equator.

Latitude of the Bloch vector
Azimuthal phase; |0⟩, |1⟩ share global phase.

Bloch sphere

Measurement P(0)
1.00
|α|²
Measurement P(1)
0.00
|β|²
Bloch vector (x,y,z)
(0, 0, 1)
Re(α*β), Im(α*β), |α|² − |β|²
Angles (θ, φ)
0°, 0°
θ = 2 arccos(|α|); φ = arg(β)−arg(α)

State vector (normalized):

|ψ⟩ = 1·|0⟩ + 0·|1⟩

Shareable URL encodes θ, φ, and amplitudes so others see the same point on the sphere.

Superposition notes

Global phase vanishes

Multiplying both amplitudes by e leaves measurement probabilities unchanged. Only relative phase (φ) shows up on the Bloch sphere.

Relative phase

Poles vs equator

North pole is |0⟩, south is |1⟩. Equal superpositions lie on the equator; φ spins you around it.

Geometry

Axes match Pauli observables

x, y, z components are expectation values of X, Y, Z. Rotations about each axis correspond to phase shifts in the complex amplitudes.

Pauli view

Pure states are surface points

Only pure states reach the sphere. Mixed states shrink toward the center; noise drags the tip inward.

Purity

Hadamard spins about X+Z

H maps |0⟩ to |+⟩ by a π rotation about the X+Z axis. The Bloch arrow swings from the pole to the equator in one gate.

Gate intuition

How this visualizer works

  • Normalization: Inputs are normalized so |α|²+|β|²=1. If both are 0, we ask for a nonzero amplitude.
  • Bloch mapping: For pure states, θ=2 arccos(|α|) and φ = arg(β)−arg(α). The Bloch vector is (x,y,z) = (2Re(α*β), 2Im(α*β), |α|²−|β|²).
  • Rendering: We render an orthographic sphere with axis guides and a head-on state arrow. Front arcs are bolder than back arcs for depth.
  • Sharing: θ, φ, and amplitudes are written to the URL so you can paste it to collaborators. Everything stays client-side.

Great for quick sanity checks, teaching Bloch geometry, or sharing a state picked from a circuit simulator.

Why a Bloch sphere matters

The Bloch sphere is the fastest way to build intuition for qubits. Instead of staring at complex amplitudes, you see a single arrow on a sphere: the tip tells you measurement probabilities (up for |0⟩, down for |1⟩) and the azimuthal angle encodes relative phase. Students often struggle with “global vs relative phase” or with why a Hadamard gate is more than “50/50.” By scrubbing θ and φ here, they immediately see that only φ rotates the arrow around the equator and only θ changes the z-bias—one slider for amplitude balance, one for phase. That direct mapping beats reading equations because it gives a geometric handle on interference: two states with the same |α|,|β| but different φ will interfere differently after an X-basis measurement, and you can visualize that difference as a rotated arrow.

Instructors can also use the presets to ground abstract gates. Selecting |+⟩ or |−⟩ shows the equator positions that maximize X-basis visibility; selecting |+i⟩ shows the Y-axis eigenstate that carries +π/2 phase relative to |0⟩. The angle readouts expose the standard parameterization |ψ⟩ = cos(θ/2)|0⟩ + e^{iφ} sin(θ/2)|1⟩, which is foundational for describing single-qubit rotations Rn(θ) or for writing the Bloch equation in NMR and ESR contexts. Moving the sliders demonstrates how any SU(2) rotation corresponds to a 3D rotation of this arrow; learners can connect Rx, Ry, Rz gates to literal rotations instead of opaque matrices.

Researchers and hobbyists gain quick sanity checks too. Exporting a PNG and copying a share link lets you pass around target states for calibration or documentation. If your simulator outputs amplitudes with small imaginary parts, normalizing them here shows whether they truly sit on the surface (pure state) or if numerical noise pulled them slightly inward; the hinted “pure states are surface points” fact above reinforces that intuition. Because everything runs in-browser, educators can assign this as homework without installs, and students on locked-down machines still get a faithful Bloch picture. The interactive visualization shortens the gap between algebraic definitions and physical understanding, which is why the Bloch sphere remains the go-to teaching tool from quantum information lectures to lab onboarding sessions.

Explore more tools