First time studying this topic?

Launch the interactive walkthrough to discover each component, including the 3D Q-Sphere Lab & Python in Colab.

Topic 5.8

The Quantum State: Pure States, Mixed States & Bloch Sphere

Visualize quantum states on the Bloch Sphere and differentiate between coherent pure states and statistical mixed density matrices.

Learning Objectives

  • ✓Map single-qubit pure states to geometric coordinates (theta, phi) on the 3D Bloch Sphere
  • ✓Differentiate Pure States (|psi>) from Mixed States (Density Matrix rho)
  • ✓Calculate Bloch vector coordinates: x = sin(theta)cos(phi), y = sin(theta)sin(phi), z = cos(theta)

📖Let's Begin with a Story

Imagine standing at the exact North Pole of planet Earth. You represent the state ∣0⟩|0\rangle. If you fly to the South Pole, you represent the state ∣1⟩|1\rangle. Classical bits are like a magic elevator that can only exist at the North Pole or the South Pole. It can never exist anywhere in between. A qubit, however, is free to roam anywhere on the entire surface of the globe! It can bask on the equator in the Galapagos Islands (∣+⟩|+\rangle), swim off the coast of Kenya (∣i⟩|i\rangle), or hike in the Himalayas. This geometric globe is called the Bloch Sphere, invented by Swiss physicist Felix Bloch. It gives us a visual map of the quantum world.

Why Should You Learn The Quantum State: Pure States, Mixed States & Bloch Sphere?

🎯 Practical & Engineering Stakes

The mental model of quantum computing

Every single-qubit quantum gate (X, Y, Z, Hadamard, Phase) is nothing more than rotating this sphere around different axes. Mastering the Bloch sphere gives you visual intuition for quantum algorithms.

🎮 Fun Learning Zone

Grasp complex quantum concepts visually with zero prior physics or math knowledge!

Zero Prerequisites
Visual Concept Storyboard

The World Globe & Global Airplane Navigation

The Bloch Sphere Globe & Airplane Navigation|ψ⟩ = cos(θ/2)|0⟩ + e^(iϕ)sin(θ/2)|1⟩
🏔️ |0⟩

North Pole (θ=0)

100% chance of measuring 0

✈️ |+⟩

Equator (θ=π/2)

50/50 odds, ϕ rotates phase

🌋 |1⟩

South Pole (θ=π)

100% chance of measuring 1

Classical: Serial / ConstrainedQuantum: Coherent Wave Parallelism
Visual takeaway: Understand in 5 seconds

Everyday Analogy: The World Globe & Global Airplane Navigation

If someone asks for your location on Earth, they don’t just say "Are you at the North Pole or South Pole?" They give you two coordinates: your Latitude (how far down from the North Pole) and your Longitude (how far around from the Prime Meridian). The Bloch Sphere is the globe of quantum mechanics! The North Pole is state ∣0⟩|0\rangle, the South Pole is state ∣1⟩|1\rangle, and every vibrant, sunlit city along the Equator is a perfect 50/50 superposition with a unique quantum phase!
🧪

Interactive Mental Sandbox

Try It Yourself
Bloch Sphere Airplane Flight Navigator

Fly the quantum airplane around Latitude (θ) and Longitude (ϕ).

P(0) = 50% | P(1) = 50%
0° = North (|0⟩) | 90° = Equator (|+⟩) | 180° = South (|1⟩)
Notice: Rotating Longitude never changes P(0) or P(1)!

✈️ Plane Location: Latitude θ = 90°, Longitude ϕ = 0°

State Vector: |ψ⟩ = cos(45°)|0⟩ + e^(i·0°)sin(45°)|1⟩

💡 Quantum Secret: Algorithms spin longitude phase ϕ around the globe to perform magic interference without changing raw probabilities until final readout!

📖 The Thought Experiment Prompt:“Imagine you are pilot flying an airplane over the globe. If you are parked at the North Pole (Latitude $\theta = 0$), you are 100% in state $|0\rangle$. If you fly down to Quito, Ecuador (Latitude $\theta = \pi/2$), you have a 50% chance of landing at either pole upon measurement. Now, fly all the way around the equator: your probabilities never change (still 50/50), but your phase angle $\phi$ rotates through $360^\circ$! This phase is the secret weapon used in quantum algorithms.”

✨ The "Aha!" Moment

Every single-qubit quantum state is an exact point on the surface of the unit Bloch Sphere, uniquely defined by polar angle θ\theta (controlling probability) and azimuthal angle ϕ\phi (controlling phase)!

What Is It?

Simple Explanation

The Bloch Sphere is a 3D globe for a qubit: - North Pole: ∣0⟩|0\rangle (100% chance of measuring 0). - South Pole: ∣1⟩|1\rangle (100% chance of measuring 1). - Equator: 50/50 superpositions! - Pure States: Live right on the outer surface of the ball. - Mixed States: Live inside the interior of the ball (because noise made them blurry).

Technical Explanation

Any arbitrary pure single-qubit state can be parameterized on the unit 2-sphere S2\mathbb{S}^2 up to unobservable global phase: ∣ψ⟩=cos⁡(θ2)∣0⟩+eiϕsin⁡(θ2)∣1⟩|\psi\rangle = \cos\left(\frac{\theta}{2}\right)|0\rangle + e^{i\phi}\sin\left(\frac{\theta}{2}\right)|1\rangle where θ∈[0,π]\theta \in [0, \pi] is the polar angle and ϕ∈[0,2π)\phi \in [0, 2\pi) is the azimuthal phase angle. The corresponding Bloch vector r=(⟨X⟩,⟨Y⟩,⟨Z⟩)=(sin⁡θcos⁡ϕ,sin⁡θsin⁡ϕ,cos⁡θ)\mathbf{r} = (\langle X \rangle, \langle Y \rangle, \langle Z \rangle) = (\sin\theta\cos\phi, \sin\theta\sin\phi, \cos\theta) has unit length ∥r∥=1\|\mathbf{r}\| = 1 for pure states, and ∥r∥<1\|\mathbf{r}\| < 1 for mixed density matrices ρ=12(I+r⋅σ)\rho = \frac{1}{2}(I + \mathbf{r} \cdot \boldsymbol{\sigma}).

📚 Key Terms

Bloch Sphere

Simple: The 3D ball used to visualize the state of a single qubit.
Technical: Geometrical representation of the pure state space of a 2-level quantum mechanical system (qubit) as the surface of a unit sphere.

Pure State

Simple: A clean, 100% quantum state with no noise or uncertainty.
Technical: A state that can be described by a single state vector ∣ψ⟩|\psi\rangle with density matrix idempotence ρ2=ρ\rho^2 = \rho and purity Tr(ρ2)=1\text{Tr}(\rho^2) = 1.

Mixed State

Simple: A noisy blend of different quantum states.
Technical: A statistical ensemble of pure states ρ=∑pi∣ψi⟩⟨ψi∣\rho = \sum p_i |\psi_i\rangle\langle\psi_i| with purity Tr(ρ2)<1\text{Tr}(\rho^2) < 1.

Q-Sphere Lab: The Quantum State: Pure States, Mixed States & Bloch Sphere

IBM Q-Sphere Model

Interactive 3D state vector exploration, unitary transformation gates, and Born rule collapse for Topic 5.8

Azimuth: 45°Elevation: 25°
+Z |0⟩-Z |1⟩+X |+⟩+Y |+i⟩01|ψ⟩
Q-Sphere Phase Color:
0 π/2 π 3π/2

Quantum Statevector

dim(H) = 2
|ψ⟩ = (1.000 + 0.000i)|0⟩
     + (0.000 + 0.000i)|1⟩
Polar Angle (θ):0.0° (0.000π rad)
Phase Angle (ϕ):0.0° (0.000π rad)

Born Rule Probabilities: P(x) = |⟨x|ψ⟩|²Σ P = 1.00

P(|0⟩) = |α|²100.0%
P(|1⟩) = |β|²0.0%
Quantum Measurement

Apply Single-Qubit Unitary Gates

Presets:
Continuous Polar Angle θ (0° = |0⟩, 180° = |1⟩):0.0°
Continuous Phase Angle ϕ (0° to 360°):0.0°
Recent Operations Log:
#1Initial state: |0⟩

📐 Mathematical Foundation

LaTeX KaTeX
∣ψ⟩=cos⁡(θ2)∣0⟩+eiϕsin⁡(θ2)∣1⟩|\psi\rangle = \cos\left(\frac{\theta}{2}\right)|0\rangle + e^{i\phi}\sin\left(\frac{\theta}{2}\right)|1\rangle

What does it mean?

The Bloch Sphere Parameterization: Every single pure qubit state in nature maps directly to a unique coordinate on a 3D unit sphere, governed by polar latitude angle θ and azimuthal longitude phase angle ϕ.

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
θ\thetaPolar angle (0 to π radians)Latitude: θ=0\theta = 0 is North Pole (∣0⟩|0\rangle), θ=π\theta = \pi is South Pole (∣1⟩|1\rangle), θ=π/2\theta = \pi/2 is the Equator
ϕ\phiAzimuthal phase angle (0 to 2π radians)Longitude: relative quantum phase rotating around the equator
cos⁡(θ/2)\cos(\theta/2)Amplitude of basis state ∣0⟩|0\rangleProbability of measuring 0: P(0)=cos⁡2(θ/2)P(0) = \cos^2(\theta/2)
eiϕsin⁡(θ/2)e^{i\phi}\sin(\theta/2)Amplitude of basis state ∣1⟩|1\rangleProbability of measuring 1: P(1)=sin⁡2(θ/2)P(1) = \sin^2(\theta/2), carrying relative phase ϕ\phi

📊 Numerical Example

Evaluating a qubit on the Equator pointing along the +X axis (θ = π/2 = 90°, ϕ = 0°):

Step 1: Calculate Half-Angle: θ / 2 = (π/2) / 2 = π/4 = 45° Step 2: Evaluate Trigonometric Amplitudes: cos(45°) = 1/√2 ≈ 0.7071 sin(45°) = 1/√2 ≈ 0.7071 Step 3: Evaluate Phase Factor: e^(i × 0) = 1 Step 4: Form State Vector: ∣ψ⟩|\psi\rangle = (1/√2)∣0⟩|0\rangle + 1 × (1/√2)∣1⟩|1\rangle = (∣0⟩|0\rangle + ∣1⟩|1\rangle)/√2 = ∣+⟩|+\rangle Step 5: Probabilities: P(0) = (1/√2)^2 = 0.50 (50%), P(1) = (1/√2)^2 = 0.50 (50%)

Result: The state lies precisely on the Equator at (+X), representing an equal 50/50 superposition state ∣+⟩|+\rangle.

⚙️ How Does It Work?

1

Polar Angle (theta)

Controls the probability ratio between measuring 0 and 1.

2

Azimuthal Angle (phi)

Controls the quantum phase (critical for quantum interference).

3

Gate Rotations

Quantum gates rotate the vector around X, Y, or Z axes.

🌍 Where Is It Used?

Qubit Calibration & Tomography

Problem: Calibrating physical microwave control pulses on IBM Quantum superconducting chips.

Solution: Quantum State Tomography measures X, Y, and Z projections to reconstruct the exact Bloch vector.

🎯 Try It Yourself

Where is the ground state |0> located on the Bloch Sphere?

Interactive activity component

🐍 Python Hands-On: Mapping Quantum States to Bloch Sphere Coordinates in Qiskit

Parameterize an arbitrary qubit state using rotation angles theta and phi, and extract its 3D Bloch sphere vector.

Open Colab

1Install Required Packages

For Google Colab or Jupyter notebooks, run this shell command to install the required dependencies:

Terminal / Notebook Install Commandbash
!pip install qiskit numpy
Packages:
qiskitnumpy

2Import Libraries

Import Statementspython
1from qiskit import QuantumCircuit
2from qiskit.quantum_info import Statevector
3import numpy as np

from qiskit import QuantumCircuit → Qiskit circuit constructor

from qiskit.quantum_info import Statevector → Statevector representation

import numpy as np → Trigonometric and mathematical functions

3Demonstration Code & Logic

Python Execution Codepython
1# Define Bloch sphere spherical coordinates: theta (latitude), phi (longitude)
2theta = np.pi / 3 # 60 degrees from north pole
3phi = np.pi / 4 # 45 degrees azimuth
4
5# Construct state using Qiskit U gate: U(theta, phi, lambda)
6qc = QuantumCircuit(1)
7qc.u(theta, phi, 0, 0)
8sv = Statevector.from_instruction(qc)
9alpha, beta = sv.data[0], sv.data[1]
10print(f'State Amplitudes: alpha = {alpha:.4f}, beta = {beta:.4f}')
11
12# Calculate 3D Bloch Vector (x, y, z)
13x = 2 * np.real(np.conj(alpha) * beta)
14y = 2 * np.imag(np.conj(alpha) * beta)
15z = np.abs(alpha)**2 - np.abs(beta)**2
16print(f'\nBloch Sphere Coordinates (x, y, z):')
17print(f' x = {x:.4f} (expected: {np.sin(theta)*np.cos(phi):.4f})')
18print(f' y = {y:.4f} (expected: {np.sin(theta)*np.sin(phi):.4f})')
19print(f' z = {z:.4f} (expected: {np.cos(theta):.4f})')
20print(f'Vector length: {np.sqrt(x**2 + y**2 + z**2):.4f} (Pure state on unit sphere surface)')
Step-by-Step Code Breakdown:

# Define Bloch sphere spherical coordinates: theta (latitude), phi (longitude)

Angles

theta = np.pi / 3 # 60 degrees from north pole

Polar angle

phi = np.pi / 4 # 45 degrees azimuth

Azimuthal angle

# Construct state using Qiskit U gate: U(theta, phi, lambda)

Gate application

qc = QuantumCircuit(1)

Single qubit

qc.u(theta, phi, 0, 0)

Apply U(theta, phi, 0) gate to |0>

sv = Statevector.from_instruction(qc)

Extract statevector

alpha, beta = sv.data[0], sv.data[1]

Unpack amplitudes

print(f'State Amplitudes: alpha = {alpha:.4f}, beta = {beta:.4f}')

Amplitudes

# Calculate 3D Bloch Vector (x, y, z)

Bloch coordinates

x = 2 * np.real(np.conj(alpha) * beta)

Bloch x coordinate

y = 2 * np.imag(np.conj(alpha) * beta)

Bloch y coordinate

z = np.abs(alpha)**2 - np.abs(beta)**2

Bloch z coordinate

print(f'\nBloch Sphere Coordinates (x, y, z):')

Header

print(f' x = {x:.4f} (expected: {np.sin(theta)*np.cos(phi):.4f})')

X coord

print(f' y = {y:.4f} (expected: {np.sin(theta)*np.sin(phi):.4f})')

Y coord

print(f' z = {z:.4f} (expected: {np.cos(theta):.4f})')

Z coord

print(f'Vector length: {np.sqrt(x**2 + y**2 + z**2):.4f} (Pure state on unit sphere surface)')

Check purity

📋 Complete Script (All-in-One)

Click "Copy for Colab", open Google Colab, paste into a single cell, and run.

Google Colab Notebook Scriptpython
1# =========================================================
2# Mapping Quantum States to Bloch Sphere Coordinates in Qiskit
3# Prepared for Google Colab (Run with Shift + Enter)
4# =========================================================
5
6# Step 1: Install required packages
7!pip install qiskit numpy
8
9# Step 2: Import libraries
10from qiskit import QuantumCircuit
11from qiskit.quantum_info import Statevector
12import numpy as np
13
14# Step 3: Run Demonstration
15# Define Bloch sphere spherical coordinates: theta (latitude), phi (longitude)
16theta = np.pi / 3 # 60 degrees from north pole
17phi = np.pi / 4 # 45 degrees azimuth
18
19# Construct state using Qiskit U gate: U(theta, phi, lambda)
20qc = QuantumCircuit(1)
21qc.u(theta, phi, 0, 0)
22sv = Statevector.from_instruction(qc)
23alpha, beta = sv.data[0], sv.data[1]
24print(f'State Amplitudes: alpha = {alpha:.4f}, beta = {beta:.4f}')
25
26# Calculate 3D Bloch Vector (x, y, z)
27x = 2 * np.real(np.conj(alpha) * beta)
28y = 2 * np.imag(np.conj(alpha) * beta)
29z = np.abs(alpha)**2 - np.abs(beta)**2
30print(f'\nBloch Sphere Coordinates (x, y, z):')
31print(f' x = {x:.4f} (expected: {np.sin(theta)*np.cos(phi):.4f})')
32print(f' y = {y:.4f} (expected: {np.sin(theta)*np.sin(phi):.4f})')
33print(f' z = {z:.4f} (expected: {np.cos(theta):.4f})')
34print(f'Vector length: {np.sqrt(x**2 + y**2 + z**2):.4f} (Pure state on unit sphere surface)')
⚡ How to Run in Google Colab (3 Quick Steps)
  1. Click "Copy for Google Colab" above.
  2. Click Open New Google Colab Notebook (opens in a new tab).
  3. Click on the first empty code cell, press Ctrl + V (or Cmd + V) to paste, then press Shift + Enter to execute!

🔄 Algorithmic Execution Flow

1
Define Polar & Azimuthal Angles

Set theta = pi/3 and phi = pi/4 on the unit sphere.

→
2
Rotate State via U-Gate

Use Qiskit U(theta, phi, 0) gate to position the qubit on the Bloch sphere.

→
3
Compute Bloch Coordinates

Calculate Cartesian coordinates (x, y, z) and verify that vector length equals 1.

📥 Input / Initial State
Theta = pi/3, Phi = pi/4 on 1-qubit circuit.
📤 Expected Output
Amplitudes: alpha = 0.8660, beta = 0.3536 + 0.3536j
Bloch Vector: x = 0.6124, y = 0.6124, z = 0.5000
Vector length: 1.0000
💡 What Does This Demonstration Show?

Every single-qubit pure state corresponds to a unique point on the surface of the 3D unit Bloch sphere, providing an intuitive geometric representation of quantum states.

Course Learning Resource • Slide DeckLesson 311 Slides

Lesson 3: Quantum Measurement with a One-Qubit Circuit

Hadamard gates, quantum measurement, histogram analysis, and probability collapse.

Author: Dr. Syed Muzamil Basha• FDP Approved Curriculum
Open in New Tab
Available Slide Decks:

📝 Learning Check

Test your understanding with these questions. Remember, this is for learning, not examination!

Question 1: What is the length of the Bloch vector for a completely pure quantum state?

Question 2: What is the dimension of the Hilbert space for a single qubit?

Question 3: What geometric surface represents all possible pure single-qubit states?

Question 4: For a valid quantum state |ψ⟩ = α|0⟩ + β|1⟩, what constraint must α and β satisfy?

Question 5: What is a density matrix used for in quantum mechanics?