Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 39 ยท Qubits and Superposition

The Bloch Sphere

Visualize any single-qubit state as a point on the Bloch sphere. Convert between amplitudes, angles theta and phi, and Bloch vectors with NumPy, and see what gates do geometrically.

A qubit state [alpha, beta] has four real numbers inside it (two complex amplitudes). Normalization removes one and global phase removes another, leaving two real numbers. Two angles are exactly what you need to name a point on a sphere. That sphere is the Bloch sphere, and it is the single most useful picture of one qubit.

Every pure one-qubit state is a point on the surface of the sphere. Gates become rotations of the sphere. Many facts that look mysterious in algebra become obvious geometry.

The parametrization

Any single-qubit state can be written, up to a global phase, as

|psi> = cos(theta/2) |0> + e^(i*phi) sin(theta/2) |1>

with theta between 0 and pi, and phi between 0 and 2*pi.

  • theta is the polar angle, measured down from the north pole. It sets how the probability splits: P(0) = cos^2(theta/2).
  • phi is the azimuth, the angle around the vertical axis. It is the relative phase between the two amplitudes.

The half angles look strange at first. They appear because a rotation by a full turn of the sphere flips the sign of the state vector, and signs are global phases. We will return to this when we meet rotation gates.

Where the standard states live

State theta phi Bloch point (x, y, z)
|0> 0 any (0, 0, +1) north pole
|1> pi any (0, 0, -1) south pole
|+> pi/2 0 (+1, 0, 0)
|-> pi/2 pi (-1, 0, 0)
|i> pi/2 pi/2 (0, +1, 0)
|-i> pi/2 3*pi/2 (0, -1, 0)

Opposite points on the sphere (north and south, +x and -x, +y and -y) are orthogonal states. The three axes are the Z, X and Y bases from the previous lesson. States on the equator are all equal mixes of 0 and 1 with different phases.

Poles and equator

North pole |0>, always reads 0
South pole |1>, always reads 1
Equator Equal mixes, any phase

The height of a point sets the 0/1 probabilities.

1 / 2

The Bloch vector

You can find the point from amplitudes by averaging the three Pauli matrices. The three coordinates are

  • x = <psi| X |psi>
  • y = <psi| Y |psi>
  • z = <psi| Z |psi>

where X, Y, Z are the Pauli matrices (defined fully in Single-Qubit Gates):

X = [[0, 1], [1, 0]], Y = [[0, -i], [i, 0]], Z = [[1, 0], [0, -1]].

For a pure state the length of (x, y, z) is exactly 1. The point lies on the surface of the sphere.

Python State to Bloch vector and back

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Recovering the angles

From a Bloch vector (x, y, z) you can read the angles back: theta = arccos(z) and phi = atan2(y, x). This is ordinary spherical coordinates. The vector length is 1 for pure states.

Python Angles from amplitudes

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Gates are rotations

A single-qubit gate is a unitary matrix, and every one-qubit unitary acts on the Bloch sphere as a rotation (up to global phase). Some examples you will use soon:

  • X rotates by 180 degrees around the x axis: north pole to south pole. This is the quantum NOT.
  • Z rotates 180 degrees around the z axis: |+> goes to |->, while |0> stays put.
  • H rotates 180 degrees around the axis halfway between x and z: north pole to the +x point.

This picture explains why some gate sequences do nothing, and why a gate that changes only phase can still matter: it moves a point around the equator, changing which later gates move it where.

Mixed states live inside the ball

The surface of the sphere holds pure states. States with classical uncertainty (a coin chosen between |0> and |1>) lie inside the ball, and the completely mixed state sits at the center. Noise, explored in the chapter on error correction, moves states from the surface toward the center, which is why noise "shrinks" the Bloch vector.

The Bloch sphere works for one qubit only. Two qubits need a 15-dimensional description, so no simple picture exists. For multiple qubits we reason with algebra and circuits instead.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which point on the Bloch sphere is |1>?

    theta = pi gives cos(theta/2) = 0, so the state is certain to read 1: the south pole.
  2. 2. Where does the state |+> sit?

    theta = pi/2 and phi = 0 give the equal mix with positive relative sign, the +x point.
  3. 3. The two angles of the Bloch sphere correspond to:

    theta controls P(0) = cos^2(theta/2), and phi is the relative phase.
  4. 4. What geometric action does a single-qubit gate have on the Bloch sphere?

    Every one-qubit unitary is a rotation of the sphere, up to global phase.

Summary

  • Up to global phase, a qubit is two real numbers: theta and phi.
  • |psi> = cos(theta/2)|0> + e^(i*phi) sin(theta/2)|1>.
  • Poles are |0> and |1>, equator holds equal mixes, and opposite points are orthogonal.
  • The Bloch vector is the expectation of X, Y, Z; its length is 1 for pure states.
  • Gates are rotations; noise pulls states toward the center.

Next: Measurement and the Born Rule