|q⟩ Bad Qubits

beginner · Programming · The Bloch Sphere

Poles: |0⟩ and |1⟩

Every single-qubit pure state lives somewhere on the surface of a unit sphere called the Bloch sphere. The two computational basis states 0|0\rangle and 1|1\rangle are not scattered randomly across that surface — they occupy opposite ends of the vertical axis, the north pole and south pole.

The north and south poles

A general single-qubit state can be written as

ψ=cos ⁣θ20+eiφsin ⁣θ21,|\psi\rangle = \cos\!\tfrac{\theta}{2}\,|0\rangle + e^{i\varphi}\sin\!\tfrac{\theta}{2}\,|1\rangle,

where θ[0,π]\theta \in [0, \pi] is the polar angle from the +z+z axis and φ[0,2π)\varphi \in [0, 2\pi) is the azimuthal angle in the xyxy plane. Setting θ=0\theta = 0 gives

ψ=cos00+eiφsin01=0,|\psi\rangle = \cos 0\,|0\rangle + e^{i\varphi}\sin 0\,|1\rangle = |0\rangle,

so 0|0\rangle sits at the north pole (θ=0)(\theta = 0), regardless of φ\varphi. Setting θ=π\theta = \pi gives

ψ=cosπ20+eiφsinπ21=eiφ1,|\psi\rangle = \cos\tfrac{\pi}{2}\,|0\rangle + e^{i\varphi}\sin\tfrac{\pi}{2}\,|1\rangle = e^{i\varphi}|1\rangle,

which equals 1|1\rangle up to a physically irrelevant global phase, placing 1|1\rangle at the south pole (θ=π)(\theta = \pi).

The +z+z axis therefore points from the south pole toward the north pole, and a measurement in the computational basis is a test of whether the Bloch vector points up (0|0\rangle) or down (1|1\rangle).

From north pole to south pole

The only way to move from one pole to the other while staying on the sphere is to rotate by π\pi radians (180°). The Pauli-X gate does exactly that — it rotates by π\pi around the xx axis, sending the north pole (0|0\rangle) to the south pole (1|1\rangle) and vice versa:

X0=1,X1=0.X|0\rangle = |1\rangle, \qquad X|1\rangle = |0\rangle.

This is why XX is called the quantum NOT gate.

Try it

Flip the qubit to the south pole — prepare 1|1\rangle starting from the default 0|0\rangle state. The grader checks your full statevector, so leaving the circuit empty will not pass.

Run your code to see the quantum state.

After running, the Bloch sphere in the visualizer should show a vector pointing straight down — the south pole, the home of 1|1\rangle.

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