First time studying this topic?

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

Topic 5.11

Probability Amplitudes: Complex Numbers in Quantum Mechanics

Understand the secret weapon of quantum computation: complex numbers, magnitudes, phases, and how amplitudes cancel out.

Learning Objectives

  • ✓Define probability amplitudes as complex numbers c = a + bi = r * e^(i*phi)
  • ✓Understand why classical probabilities (p >= 0) can only add, while quantum amplitudes can subtract
  • ✓Calculate complex conjugates and magnitudes: |c|^2 = c * c*

📖Let's Begin with a Story

In classical probability, numbers can never be negative. If there is a 30% chance of rain on Tuesday and a 20% chance of rain on Wednesday, you can never say there is a "negative 50% chance" of rain. Probabilities are always between 0 and 1. Because classical probabilities are always positive, they can only accumulate. If you add more paths to a destination, the classical probability of reaching that destination can only increase. Quantum mechanics does not track probabilities; it tracks Probability Amplitudes, which are Complex Numbers! Complex numbers have directions (angles). Two complex numbers can point in opposite directions and cancel each other out to exactly ZERO: 0.5+(−0.5)=0.00.5 + (-0.5) = 0.0 This is the secret weapon of quantum algorithms: we design circuits where wrong answers cancel each other out to zero probability, while the right answer reinforces itself!

Why Should You Learn Probability Amplitudes: Complex Numbers in Quantum Mechanics?

🎯 Practical & Engineering Stakes

The mathematical differentiator

Quantum computing achieves computational speedups over classical computing solely because complex amplitudes can interfere destructively. Without complex amplitudes, quantum computing collapses into classical randomized computing.

🎮 Fun Learning Zone

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

Zero Prerequisites
Visual Concept Storyboard

The Two Dropped Pebbles & The Clock Hand Phasor

Crest Meets Crest (Constructive)
🌊 ➕ 🌊 🟰 🏔️

Double Height Monster Wave (+1 + +1 = +2)

Probability surges to 400%!

Crest Meets Trough (Destructive)
🌊 ➕ 🕳️ 🟰 🪞

Pure Flat Water (+1 - 1 = 0)

Two real possibilities cancel each other into impossibility!

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

Everyday Analogy: The Two Dropped Pebbles & The Clock Hand Phasor

In classical probability, odds can only add up. If there is a 40% chance of rain from the north and a 30% chance of rain from the west, the chance of rain can never drop to 0%. Probabilities are always positive real numbers between 0 and 1. But in quantum physics, nature doesn’t track probabilities—it tracks Probability Amplitudes, which are 2D complex numbers with an arrow length and an arrow angle (a clock hand)! Two arrows pointing in opposite directions (+1+1 and −1-1) add up to EXACTLY ZERO! In quantum mechanics, two real possibilities can cancel each other into impossibility!
🧪

Interactive Mental Sandbox

Try It Yourself
Two Dropped Pebbles Ripple Collision

See two real possibilities cancel into absolute 0% flat water.

Phase Difference: 0°
🌊 🏔️ 2.0

CONSTRUCTIVE INTERFERENCE: DOUBLE HEIGHT CREST!

Crest (+1) meets Crest (+1). Amplitude doubles to 2, so measurement probability quadruples (|2|² = 400%)!

📖 The Thought Experiment Prompt:“Imagine standing on a dock above calm water and dropping two pebbles simultaneously. Where the ripple crest from Pebble 1 meets the ripple crest from Pebble 2, the water leaps twice as high (constructive interference). But where a ripple crest meets a ripple trough, the water goes completely dead flat (destructive interference)! That flat water is quantum destructive cancellation: probability amplitudes canceling each other out to zero.”

✨ The "Aha!" Moment

Probabilities are positive numbers that only add (p1+p2p_1 + p_2). Probability amplitudes are complex numbers (reiϕr e^{i\phi}) that interfere, enabling quantum algorithms to cancel wrong answers to 0% and boost correct answers to 100%!

What Is It?

Simple Explanation

Classical probability is like pouring buckets of water: every bucket adds more water. Quantum amplitudes are like ocean waves: - When the crest of one wave meets the crest of another, they combine to make a monster wave (Constructive Interference). - When the crest of one wave meets the trough of another wave, they cancel each other out and the water becomes completely flat (Destructive Interference)!

Technical Explanation

A probability amplitude ψ(x)∈C\psi(x) \in \mathbb{C} is a complex scalar expressed in polar form as reiϕr e^{i\phi}. While the Born probability P(x)=∣ψ(x)∣2=r2P(x) = |\psi(x)|^2 = r^2 is non-negative real, the linear superposition of paths ψtotal=ψ1+ψ2\psi_{total} = \psi_1 + \psi_2 allows destructive cancellation when eiϕ1=−eiϕ2e^{i\phi_1} = -e^{i\phi_2}, yielding ∣ψ1+ψ2∣2=0|\psi_1 + \psi_2|^2 = 0 even though ∣ψ1∣2>0|\psi_1|^2 > 0 and ∣ψ2∣2>0|\psi_2|^2 > 0.

📚 Key Terms

Probability Amplitude

Simple: A complex number whose squared size gives the probability of an outcome.
Technical: A complex-valued scalar coefficient in a state vector expansion whose absolute square represents probability density.

Complex Conjugate (c∗c^*)

Simple: Flipping the sign of the imaginary part: (a + bi) becomes (a - bi).
Technical: Reflection across the real axis mapping z=x+iyz = x + iy to zˉ=x−iy\bar{z} = x - iy.

Relative Phase (ϕ\phi)

Simple: The angle of the complex amplitude that determines whether it will add or cancel with other waves.
Technical: The argument arg⁡(c)=ϕ\arg(c) = \phi in polar representation c=∣c∣eiϕc = |c|e^{i\phi}.

Q-Sphere Lab: Probability Amplitudes: Complex Numbers in Quantum Mechanics

IBM Q-Sphere Model

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

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
∣c∣2=c⋅c∗=(a+bi)(a−bi)=a2+b2|c|^2 = c \cdot c^* = (a + bi)(a - bi) = a^2 + b^2

What does it mean?

Modulus Squared of Complex Probability Amplitudes: Quantum mechanics calculates probabilities using 2D complex numbers c = a + bi. Multiplying by the complex conjugate mirror c* = a - bi cancels out all imaginary terms (since i² = -1), yielding the Pythagorean squared distance a² + b² as physical probability.

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
c=a+bic = a + biComplex probability amplitudeA 2D arrow with horizontal coordinate a (real) and vertical coordinate b (imaginary)
c∗=a−bic^* = a - biComplex conjugateThe exact mirror reflection across the real horizontal axis
i=−1i = \sqrt{-1}Imaginary unitA 90-degree rotation operator satisfying i² = -1
∣c∣2=a2+b2|c|^2 = a^2 + b^2Modulus squared (Physical Probability)Pythagorean length-squared: real-world observable percentage

📊 Numerical Example

Calculating the real probability from complex amplitude c = 1/2 + (√3/2)i:

Step 1: Identify real and imaginary components: a = 1/2 = 0.5, b = √3/2 ≈ 0.866 Step 2: Method 1 (Conjugate Multiplication): c × c* = (0.5 + 0.866i) × (0.5 - 0.866i) = (0.5)^2 - (0.5)(0.866i) + (0.866i)(0.5) - (0.866)^2(i^2) = 0.25 - 0 + 0 - 0.75(-1) = 0.25 + 0.75 = 1.00 ✓ Step 3: Method 2 (Pythagorean Shortcut): |c|^2 = a^2 + b^2 = (0.5)^2 + (0.866)^2 = 0.25 + 0.75 = 1.00 ✓

Result: The physical observable probability is exactly 1.00 (100%).

⚙️ How Does It Work?

1

Amplitude Assignment

Quantum gates distribute complex amplitudes across 2^n computational paths.

2

Phase Rotation

Phase gates rotate angles of specific computational branches.

3

Interference Synthesis

Amplitudes add linearly: sum(c_i); opposite phases cancel out.

4

Born Readout

Measure magnitude-squared: P = |sum(c_i)|^2.

🌍 Where Is It Used?

Quantum Fourier Transform (QFT)

Problem: Finding periodicity in secret cryptographic keys.

Solution: QFT uses phase rotations to destructively cancel non-periodic frequencies, exposing the secret key period.

🎯 Try It Yourself

Path A delivers amplitude +0.5 to outcome |0>. Path B delivers amplitude -0.5 to outcome |0>. When both paths are open simultaneously, what is the final probability of measuring |0>?

Interactive activity component

🐍 Python Hands-On: Repeated Quantum Measurement & Histogram Analysis in Qiskit

Construct a 1-qubit circuit with Hadamard gate, execute 1,024 shots on the Aer simulator, and visualize the empirical 50/50 measurement histogram.

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 qiskit-aer matplotlib
Packages:
qiskitqiskit-aermatplotlib

2Import Libraries

Import Statementspython
1from qiskit import QuantumCircuit
2from qiskit_aer import Aer
3from qiskit.visualization import plot_histogram
4import matplotlib.pyplot as plt

from qiskit import QuantumCircuit → Circuit constructor

from qiskit_aer import Aer → Qiskit Aer simulator provider

from qiskit.visualization import plot_histogram → Histogram visualization utility

import matplotlib.pyplot as plt → Matplotlib for rendering plots

3Demonstration Code & Logic

Python Execution Codepython
1# Create a Quantum Circuit with 1 Qubit and 1 Classical Bit
2qc = QuantumCircuit(1, 1)
3
4# Apply Hadamard gate to create superposition (|0> + |1>)/sqrt(2)
5qc.h(0)
6
7# Measure the qubit into classical bit 0
8qc.measure(0, 0)
9
10# Use Qiskit's Aer simulator backend
11simulator = Aer.get_backend('aer_simulator')
12
13# Execute the circuit for 1,024 repeated measurement shots
14job = simulator.run(qc, shots=1024)
15
16# Retrieve measurement counts
17result = job.result()
18counts = result.get_counts(qc)
19
20# Print measurement outcomes
21print("Measurement Results:", counts)
22
23# Plot histogram of sampled results
24plot_histogram(counts)
25plt.show()
Step-by-Step Code Breakdown:

# Create a Quantum Circuit with 1 Qubit and 1 Classical Bit

Circuit initialization

qc = QuantumCircuit(1, 1)

1 quantum wire, 1 classical wire

# Apply Hadamard gate to create superposition (|0> + |1>)/sqrt(2)

Superposition creation

qc.h(0)

H gate on qubit 0

# Measure the qubit into classical bit 0

Measurement

qc.measure(0, 0)

Collapse qubit state

# Use Qiskit's Aer simulator backend

Simulator setup

simulator = Aer.get_backend('aer_simulator')

Instantiate Aer backend

# Execute the circuit for 1,024 repeated measurement shots

Execution

job = simulator.run(qc, shots=1024)

Run 1024 trials

# Retrieve measurement counts

Result extraction

result = job.result()

Get execution result

counts = result.get_counts(qc)

Extract dictionary of bitstring counts

# Print measurement outcomes

Display text counts

print("Measurement Results:", counts)

Show outcome counts

# Plot histogram of sampled results

Visualization

plot_histogram(counts)

Generate bar chart

plt.show()

Display plot window

📋 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# Repeated Quantum Measurement & Histogram Analysis in Qiskit
3# Prepared for Google Colab (Run with Shift + Enter)
4# =========================================================
5
6# Step 1: Install required packages
7!pip install qiskit qiskit-aer matplotlib
8
9# Step 2: Import libraries
10from qiskit import QuantumCircuit
11from qiskit_aer import Aer
12from qiskit.visualization import plot_histogram
13import matplotlib.pyplot as plt
14
15# Step 3: Run Demonstration
16# Create a Quantum Circuit with 1 Qubit and 1 Classical Bit
17qc = QuantumCircuit(1, 1)
18
19# Apply Hadamard gate to create superposition (|0> + |1>)/sqrt(2)
20qc.h(0)
21
22# Measure the qubit into classical bit 0
23qc.measure(0, 0)
24
25# Use Qiskit's Aer simulator backend
26simulator = Aer.get_backend('aer_simulator')
27
28# Execute the circuit for 1,024 repeated measurement shots
29job = simulator.run(qc, shots=1024)
30
31# Retrieve measurement counts
32result = job.result()
33counts = result.get_counts(qc)
34
35# Print measurement outcomes
36print("Measurement Results:", counts)
37
38# Plot histogram of sampled results
39plot_histogram(counts)
40plt.show()
⚡ 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
Superposition Generation

Hadamard gate transforms |0> into equal superposition (|0> + |1>)/sqrt(2) with probability 50% for each state.

→
2
Aer Simulation

Simulates 1,024 independent shots, each causing state collapse into either 0 or 1.

→
3
Histogram Visualization

Plots the resulting binomial distribution (~512 for '0' and ~512 for '1'), confirming the Born rule.

📥 Input / Initial State
1-qubit circuit with H gate and 1,024 simulator shots
📤 Expected Output
Measurement Results: {'0': 518, '1': 506}
💡 What Does This Demonstration Show?

In individual shots, the outcome is completely non-deterministic. Across 1,024 repeated trials, the law of large numbers accurately reveals the underlying 50/50 probability amplitude distribution.

Course Learning Resource • Slide DeckLesson 79 Slides

Lesson 7: Repeated Measurement and Probability

Superposition, repeated measurement sampling distributions, and histogram interpretation in Qiskit.

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

📝 Learning Check

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

Question 1: Why can two computational paths in a quantum computer produce a ZERO percent probability of an outcome, even if both paths individually had non-zero probability?

Question 2: What is the geometric interpretation of a probability amplitude in the complex plane?

Question 3: Why can probability amplitudes be negative or even complex, while probabilities must be real and non-negative?

Question 4: What is the global phase of a quantum state |ψ⟩ = e^(iφ)|ψ'⟩?

Question 5: In quantum interference, what causes certain outcomes to have zero probability?