Open this lesson in your favourite AI. It'll walk you through the why, explain the demo, and quiz you on the try-it list.
Superposition is the most-misquoted idea in popular science. 'A qubit is in both states at once' is wrong — a qubit is in one state, which happens to be a complex linear combination of two basis states. The Bloch sphere is the picture that lets you stop saying the wrong thing: every pure single-qubit state corresponds to exactly one point on the surface of a unit sphere in , and the geometry of unitary evolution becomes literal rotation of that point. For post-quantum cryptography this matters because the only states that exist in a quantum computer are points on (and inside) Bloch spheres — and the security of every PQC primitive depends on what cannot be reached or distinguished using rotations of those points and tensor products of them. If you cannot draw the state, you cannot reason about what an adversary can do to it.
Up to a global phase, any pure qubit state can be written as where and . This is a point on the unit 2-sphere in with Cartesian coordinates . The north pole is , the south pole is , and the equator hosts the equal-superposition states .
Use these three in order. Each builds on the one before.
In one paragraph, explain what 'superposition' actually means using the Bloch sphere picture. Why is the slogan 'a qubit is 0 and 1 at the same time' technically wrong, and what's the right replacement?
Walk me through the parameterisation $|\psi\rangle = \cos(\theta/2)|0\rangle + e^{i\varphi}\sin(\theta/2)|1\rangle$ step by step. Why is the angle $\theta/2$ in the amplitudes but $\theta$ in the Bloch-sphere geometry? Where does the factor of 2 come from?
Given a Bloch vector $\vec{r} = (x, y, z)$ with $|\vec{r}| < 1$, this represents a *mixed* state, not a pure one. How do mixed states arise in real quantum computers, and why does this matter when we talk about 'noise' affecting cryptographic protocols built on quantum hardware?
bloch_coords — they map to the same point. Why does this not lose information?// main.go
package main
import (
"fmt"
"math"
"math/cmplx"
)
func blochCoords(alpha, beta complex128) (x, y, z float64) {
// Strip global phase by rotating alpha to be real and non-negative.
phase := cmplx.Phase(alpha)
rot := cmplx.Exp(complex(0, -phase))
a := alpha * rot
b := beta * rot
aReal := real(a)
aReal = math.Max(-1, math.Min(1, aReal)) // clip to [-1, 1]
theta := 2 * math.Acos(aReal)
phi := 0.0
if cmplx.Abs(b) > 1e-12 {
phi = cmplx.Phase(b)
}
x = math.Sin(theta) * math.Cos(phi)
y = math.Sin(theta) * math.Sin(phi)
z = math.Cos(theta)
return
}
func main() {
s := 1 / math.Sqrt2
states := []struct {
name string
alpha complex128
beta complex128
}{
{"|0>", complex(1, 0), complex(0, 0)},
{"|1>", complex(0, 0), complex(1, 0)},
{"|+>", complex(s, 0), complex(s, 0)},
{"|->", complex(s, 0), complex(-s, 0)},
{"|+i>", complex(s, 0), complex(0, s)},
}
for _, st := range states {
x, y, z := blochCoords(st.alpha, st.beta)
fmt.Printf("%-5s (%+.3f, %+.3f, %+.3f)\n", st.name, x, y, z)
}
}
go run main.go