kevinferron.comKevin Ferron

Tutorial 2 of 12 · Simulated in your browser

The Bloch sphere

Every single-qubit state is a point on a sphere. Drag one, and read what a measurement can and cannot see.

  • Bloch sphere
  • Shots

The state

|0⟩|1⟩|+⟩|−⟩|+i⟩|−i⟩

Drag the arrow, or focus the sphere and use the arrow keys (Shift for fine steps). Drag the background to turn the view.

60°
90°
0°
29°

Amplitudes and probabilities

100%75.0%|0⟩25.0%|1⟩
α
0.866
β
0.5i
Chance of 1
sin²(θ/2) = 25.0%

Bar height is the probability; the colour is the amplitude’s phase, the same wheel as the hydrogen orbitals. The dashed outline is the amplitude’s length.

Measure it

Basis
01
0 shots

Dashed outlines are the exact probabilities. Shots are random but seeded, so the same presses give the same bars. Only the polar angle shows in the Z basis; try X or Y with the arrow on the equator.

A qubit’s state is a pair of complex numbers: an amplitude α for the outcome 0 and an amplitude β for the outcome 1, with |α|² + |β|² = 1. Written out that is four real numbers. The length rule removes one. An overall phase, multiplying both amplitudes by the same e^{iγ}, changes nothing you can ever measure, and that removes another. Two real numbers are left, and a point on a sphere has exactly two coordinates.

So the page draws the state as an arrow. The north pole is |0⟩ and the south pole is |1⟩. The equator holds the equal superpositions, and the angle φ round it is the relative phase between the two amplitudes. The polar angle θ sets the odds: the chance of reading 1 is sin²(θ/2). Drag the arrow, or use the sliders or the arrow keys, and the amplitudes and the two probability bars follow.

The colour of each amplitude bar is its phase, on the same wheel the hydrogen page uses: green for a phase of 0, blue for a quarter turn, magenta for a half turn, gold for three quarters. Turn the global-phase slider and both bars change colour together while the arrow stays exactly where it is, which is the whole meaning of “global”.

The same phase colours on the hydrogen orbitals →

A measurement in the standard basis returns 0 or 1 and sees only θ. Two states at the same height on the sphere but different φ give identical histograms in that basis, and a different basis tells them apart. Switch the measurement to X or Y and the histogram changes with φ even though the state has not moved. Each press runs more shots on the same state; the bars approach the ghost outline of the exact probabilities, and the spread shrinks like one over the square root of the number of shots.

Two cautions. A single qubit is the only case where this picture is complete: with two or more qubits the states do not fit on spheres, and entangled qubits make the arrow shrink inside the ball. And the page’s shots come from a seeded random generator, so reloading gives the same histogram for the same state; real hardware would not. Quirk is the place to see Bloch-sphere displays inside circuits you build yourself.

Qubit order: bit strings are written with qubit 0 on the left, as in Nielsen and Chuang’s book. (Qiskit puts it on the right.)

Sources

  1. Preskill, Ch. 2 Foundations I: States and Ensembles. John Preskill, Caltech lecture notes, July 2015.

    • Foundations I: states of a qubit (chapter title; the notes are the free reference for the sphere picture)
    • Foundations I: pure states of one qubit
  2. IBM, Basics of Quantum Information Basics of Quantum Information (IBM Quantum Learning). IBM. Live course: single systems, multiple systems, circuits, entanglement in action.

    • The single-systems lesson: a qubit state as a pair of complex amplitudes
  3. Aaronson, lecture notes Introduction to Quantum Information Science, lecture notes. Scott Aaronson. PDF; the outline lists the Bloch sphere, Grover and Shor lectures.

    • The Bloch sphere lecture (listed in the notes’ outline)
  4. Preskill, Ch. 3 Foundations II: Measurement and Evolution. John Preskill, Caltech lecture notes, July 2015.

    • Foundations II: measurement
  5. Quirk Quirk, a drag-and-drop quantum circuit simulator. Craig Gidney, v2.3, 2016. Apache-2.0. Prior art; nothing is copied from it.

    • Inline state displays, including Bloch sphere displays

Everything here is paraphrased from the sources, not quoted, and every figure that is not plain arithmetic is attributed. The simulator is this site’s own and is tested against the formulas on the page. Where a source is silent the page says so.