|q⟩ Bad Qubits

beginner · Programming · The Bloch Sphere

Pure vs Mixed (Preview)

Every state we have worked with so far — 0|0\rangle, 1|1\rangle, +|+\rangle and their rotations — sits on the surface of the Bloch sphere. That surface is reserved for pure states: states that are fully described by a single ket ψ|\psi\rangle and carry the maximum amount of quantum information a single qubit can hold.

What makes a state pure?

A pure state has two features. First, it satisfies α2+β2=1|\alpha|^2 + |\beta|^2 = 1 with a definite pair of amplitudes; no randomness in the state specification itself. Second, its Bloch vector has unit length — it lands exactly on the sphere's surface. The north pole 0|0\rangle, the south pole 1|1\rangle, and every equatorial superposition like +|+\rangle are all pure.

Formally, the density operator of a pure state is ρ=ψψ\rho = |\psi\rangle\langle\psi|, a rank-one projector. One useful test is Tr(ρ2)=1\operatorname{Tr}(\rho^2) = 1: squaring a rank-one projector gives back itself, so the trace of the square is one.

Interior points: mixed states

The Bloch sphere's interior is populated by mixed states. A mixed state arises when there is genuine classical uncertainty about which pure state the qubit is in — for example, a preparation device that flips a coin and produces either 0|0\rangle or 1|1\rangle with equal probability.

Such a situation cannot be captured by any single ket. Instead it is described by a weighted mixture of pure-state projectors:

ρ=p000+p111,p0+p1=1,  p0,p10.\rho = p_0\,|0\rangle\langle 0| + p_1\,|1\rangle\langle 1|, \qquad p_0 + p_1 = 1,\; p_0,p_1 \ge 0.

For the equal-coin flip, p0=p1=12p_0 = p_1 = \tfrac{1}{2}, giving

ρ=12(1001)=I2.\rho = \frac{1}{2}\begin{pmatrix}1&0\\0&1\end{pmatrix} = \frac{I}{2}.

This is the maximally mixed state — its Bloch vector has zero length and sits at the origin. Measuring it in any basis still gives 00 or 11 with probability 12\tfrac{1}{2}, but that is now a result of classical ignorance rather than quantum superposition. The purity test confirms: Tr(ρ2)=Tr(I4)=12<1\operatorname{Tr}(\rho^2) = \operatorname{Tr}(\tfrac{I}{4}) = \tfrac{1}{2} < 1.

Where the Bloch vector lands

For any state described by a 2×22\times 2 density operator ρ\rho, the Bloch vector (rx,ry,rz)(r_x, r_y, r_z) is defined by

ρ=I+rxX+ryY+rzZ2,\rho = \frac{I + r_x X + r_y Y + r_z Z}{2},

where XX, YY, ZZ are the Pauli matrices. The Bloch vector has length r=rx2+ry2+rz2r = \sqrt{r_x^2 + r_y^2 + r_z^2}. Physical states require r1r \le 1:

This geometric picture is why the Bloch sphere is so powerful: the formal purity Tr(ρ2)=(1+r2)/2\operatorname{Tr}(\rho^2) = (1+r^2)/2 increases monotonically with the Bloch vector length rr, so a greater distance from the center always means a less mixed, more pure state — with r=1r=1 (surface) corresponding to purity 1 and r=0r=0 (center) corresponding to purity 12\tfrac{1}{2}.

A preview of why this matters

In the beginner track we work almost exclusively with pure states, because they are the ones our gates and state-vector simulator act on directly. Mixed states appear naturally when a qubit is entangled with another system and we look at only one half of the pair, or whenever the qubit interacts with an environment it cannot control. Intermediate lessons will return to density operators and quantum channels in full detail; for now, keep in mind that the Bloch sphere's surface and interior are two genuinely different physical regimes.

Sign in on the full site to ask questions and join the discussion.