After learning what the Bloch sphere represents mathematically, the next step is reading it as a
live display while you run circuits. The simulator renders the Bloch sphere in real time and reports
three numbers: the x, y, z components of the Bloch vector. Knowing how to decode those numbers
back into the qubit state is the skill this lesson develops.
The Bloch vector and what it shows
Every single-qubit pure state ∣ψ⟩=cos2θ∣0⟩+eiϕsin2θ∣1⟩
maps to a point on the unit sphere with Cartesian coordinates
x=sinθcosϕ,y=sinθsinϕ,z=cosθ.
These three numbers are what the Bloch display shows. You can read the state back from them:
z tells you about vertical position — z=+1 is ∣0⟩, z=−1 is ∣1⟩,
z=0 means the qubit is on the equator (equal probability of each outcome).
x and y describe the azimuthal position on the equator. If z=0, then
x=cosϕ and y=sinϕ, so you can recover the relative phase directly from the
angle ϕ=arctan(y/x).
Reading specific states
Checking your Bloch display after a circuit is a quick sanity test:
The last row shows a state halfway between the +x and +y axes. Its Bloch vector is exactly
n^=(21,21,0), with x=y≈0.707 and z=0.
You can derive this from θ=π/2, ϕ=π/4:
Prepare the state 21(∣0⟩+eiπ/4∣1⟩) — the equator
point midway between the +x and +y axes. After running, your Bloch display should show
x≈0.707, y≈0.707, z=0.
Run your code to see the quantum state.
Inspect all three Bloch components. If the display shows x=y≈0.707 and z=0, you
have correctly placed the Bloch vector at azimuthal angle ϕ=π/4 on the equator — and you
know how to read the display.
Sign in on the full site to ask questions and join the discussion.