Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

QCQI – Chapter 2 Detailed Summary: Qubits, States & the Bloch Sphere

Learning Objectives

  • Parametrize a single-qubit pure state and map to the Bloch sphere.

  • Interpret single-qubit unitaries as rotations; use ZYZ decomposition.

  • Measure along X,Y,ZX,Y,Z (basis change) and estimate expectation values.

  • Perform linear-inversion tomography: ρ=12(I+rσ)\rho=\frac12(I+\vec r\cdot \vec\sigma).

States and Bloch Vectors

ψ(θ,ϕ)=cosθ20+eiϕsinθ21|\psi(\theta,\phi)\rangle=\cos\frac{\theta}{2}|0\rangle+e^{i\phi}\sin\frac{\theta}{2}|1\rangle, r=(sinθcosϕ,sinθsinϕ,cosθ)\vec r=(\sin\theta\cos\phi,\sin\theta\sin\phi,\cos\theta), and ρ=12(I+rσ)\rho=\frac12(I+\vec r\cdot \vec\sigma).

Eureka! Pure states lie on the Bloch surface (r=1\|\vec r\|=1); noise shrinks r<1\|\vec r\|<1.

Unitaries as Rotations

U=Rz(α)Ry(β)Rz(γ)U=R_z(\alpha)R_y(\beta)R_z(\gamma), with Rn(ϑ)=ei(ϑ/2)nσR_{\vec n}(\vartheta)=e^{-i(\vartheta/2)\vec n\cdot\vec\sigma}.

Eureka! SU(2)\mathrm{SU}(2) double-covers SO(3)\mathrm{SO}(3): global phases vanish at the density level.

Measurements via Basis Change

σx=Z\langle \sigma_x\rangle = \langle Z\rangle after HH;   σy=Z\langle \sigma_y\rangle = \langle Z\rangle after SHS^\dagger H;   σz=Z\langle \sigma_z\rangle = \langle Z\rangle directly.

Tomography

Estimate X,Y,Z\langle X\rangle,\langle Y\rangle,\langle Z\rangle from repeated shots, then set ρ^=12(I+m^xX+m^yY+m^zZ)\hat\rho=\frac12(I+\hat m_x X+\hat m_y Y+\hat m_z Z).

Purity: Tr(ρ2)=1+r22\operatorname{Tr}(\rho^2)=\tfrac{1+\|\vec r\|^2}{2}.

Worked Examples

State preparation. Apply Ry(θ)R_y(\theta) then Rz(ϕ)R_z(\phi) to 0|0\rangle.

Expectations from counts. Z=(N0N1)/(N0+N1)\langle Z\rangle=(N_0-N_1)/(N_0+N_1); for X(Y)X(Y) prepend H(SH)H(S^\dagger H).

Global vs relative phase. eiγψe^{i\gamma}|\psi\rangle unchanged; relative phases impact interference after basis rotations.

Pseudo-code Aids

Pseudocode — Prepare ψ(θ,ϕ)|\psi(\theta,\phi)\rangle from 0|0\rangle

Input: angles (θ,ϕ)(\theta,\phi) Steps: apply Ry(θ)R_y(\theta); then Rz(ϕ)R_z(\phi) Output: state ψ(θ,ϕ)|\psi(\theta,\phi)\rangle

Pseudocode — Measure σk\langle \sigma_k\rangle

Input: axis k{x,y,z}k\in\{x,y,z\}, shots SS if k=xk=x: prepend HH; if k=yk=y: prepend SS^\dagger then HH measure ZZ for SS shots; return (N0N1)/(N0+N1)(N_0-N_1)/(N_0+N_1)

Pseudocode — Single-qubit tomography (linear inversion)

Input: unknown state, shots per basis SS estimate m^x,m^y,m^z\hat m_x,\hat m_y,\hat m_z as above set ρ^=12(I+m^xX+m^yY+m^zZ)\hat\rho=\frac12(I+\hat m_x X+\hat m_y Y+\hat m_z Z)

Schematics

Bloch Sphere (axes only)

Basis-change circuits

Hands-on Notebook (Multi-Backend)

Run: L02_QCQI_Ch02_Qubits_States_and_Bloch_Sphere

Set backend to cirq, pennylane, braket, pyquil, or qiskit.