Click a gate to apply it to the qubit. The arrow turns about the gate's rotation axis on the sphere, and the panel shows the exact amplitudes, angles and probabilities. Drag the sphere to change the view.

Pauli
Clifford
T
Rotation
Start state
Actions
x y z state rotation axis
Drag to rotate · keys X Y Z H S T, R reset

State

Amplitudes

Measurement probability

P(|0⟩)
P(|1⟩)

Position on the sphere

Last gate

Circuit

How to use the Bloch sphere explorer

  1. Pick a start state (|0⟩ by default). The orange arrow shows where the qubit sits on the sphere.
  2. Click a gate, or press its letter key. The arrow turns about the gate's rotation axis, drawn in purple while it moves.
  3. Read the exact state, amplitudes, measurement probabilities and θ/φ angles on the right. Use Undo to step back or Reset to start again.
  4. Drag the sphere to look at it from another angle; Reset view restores the default camera.

What is the Bloch sphere?

Any pure state of one qubit can be written as |ψ⟩ = cos(θ/2)|0⟩ + eiφ sin(θ/2)|1⟩, up to a global phase. The two angles θ and φ place the state on the surface of a unit sphere: |0⟩ is the north pole, |1⟩ the south pole, and the equal superpositions |+⟩, |−⟩, |+i⟩ and |−i⟩ sit on the equator. Every single-qubit gate is a rotation of this sphere.

What each gate does

  • X, Y, Z (Pauli): half turn (180°) about the x, y or z axis. X is the quantum NOT gate.
  • H (Hadamard): half turn about the diagonal axis between x and z. It swaps |0⟩ with |+⟩ and |1⟩ with |−⟩.
  • S and S†: quarter turn (±90°) about z.
  • T and T†: eighth turn (±45°) about z. The T-count shown under Circuit is the number of T and T† gates used.
  • Rx, Ry, Rz: rotation by any angle from −720° to 720° about x, y or z.

Frequently asked questions

Why didn't the arrow move when I applied Z to |0⟩?

|0⟩ lies on the z axis, and a rotation never moves a point on its own axis. The gate only changed the phase of the amplitudes, which the panel explains under Last gate.

What is the global phase shown under Amplitudes?

Multiplying the whole state by eiγ has no measurable effect, so it does not appear on the sphere. The explorer still shows it: for example, applying Y and then X to |0⟩ gives i|0⟩, the same point on the sphere as |0⟩ with a global phase of π/2.

Are the numbers exact?

Values are computed in double precision. When a value matches a common exact form such as 1/√2, cos(π/8) or 3π/4, the exact form is shown next to the decimal.

Can I simulate two or more qubits?

No. The Bloch sphere describes a single qubit in a pure state. Entangled or mixed states need a different picture, so this tool is limited to one qubit.

Is anything uploaded?

No. All calculations and drawing run in your browser.