Launch the interactive walkthrough to discover each component, including the 3D Q-Sphere Lab & Python in Colab.
Understand the principle of linear superposition: how quantum systems exist in coherent combinations of states simultaneously.
Grasp complex quantum concepts visually with zero prior physics or math knowledge!
Definite Heads OR Tails
Classical certainty. No dynamic wave blur.
Simultaneous Waves in Superposition
Not 0 or 1, but a live spinning chord of both (|0⟩ + |1⟩)/√2!
Spin the coin into superposition, then slap down to measure.
Click "Snap & Spin Coin" to launch the quantum superposition!
Interactive 3D state vector exploration, unitary transformation gates, and Born rule collapse for Topic 5.9
| Symbol / Term | Meaning | Beginner Interpretation |
|---|---|---|
| Plus state (equal superposition) | Basis states and are in-phase with positive sign (+) | |
| Minus state (equal superposition) | Basis states and are 180° out-of-phase with negative sign (-) | |
| Normalization coefficient ≈ 0.7071 | Ensures total probability: |
Demonstrating destructive interference by combining |+⟩ and |-⟩:
Result: The states completely cancelled out (1 - 1 = 0), leaving only pure . Superposition enables selective path cancellation.
Start with qubit in deterministic classical state |0>.
Apply a pi/2 microwave rotation to tilt the state onto the equator.
Qubit maintains simultaneous superposition in sub-15-millikelvin cryostats.
Problem: Searching unsorted databases of N items in O(sqrt(N)) time.
Solution: Superposition evaluates all N entries simultaneously in a single computational step.
Interactive activity component
Construct an equal superposition state using the Hadamard gate and simulate stochastic measurement collapse over 1,000 shots.
For Google Colab or Jupyter notebooks, run this shell command to install the required dependencies:
!pip install qiskit qiskit-aer1 from qiskit import QuantumCircuit 2 from qiskit_aer import AerSimulator
from qiskit import QuantumCircuit → Quantum circuit builder
from qiskit_aer import AerSimulator → High-performance Aer simulator
1 # 1. Build circuit with Hadamard and Measurement 2 qc = QuantumCircuit(1, 1) 3 qc.h(0) # Put qubit into equal superposition |+> 4 qc.measure(0, 0) # Add measurement 5 print('Superposition Circuit Diagram:') 6 print(qc.draw('text')) 7 8 # 2. Simulate 1,000 shots using AerSimulator 9 sim = AerSimulator() 10 result = sim.run(qc, shots=1000).result() 11 counts = result.get_counts() 12 print('\nMeasurement Results across 1,000 runs:') 13 for bit, count in sorted(counts.items()): 14 pct = (count / 1000) * 100 15 print(f' Outcome |{bit}> : {count} times ({pct:.1f}%)') 16 print('\nConclusion: Superposition splits probabilities equally; each shot collapses randomly to 0 or 1.')
# 1. Build circuit with Hadamard and Measurement
Circuit setup
qc = QuantumCircuit(1, 1)
1 qubit and 1 classical readout bit
qc.h(0) # Put qubit into equal superposition |+>
Apply Hadamard
qc.measure(0, 0) # Add measurement
Measure
print('Superposition Circuit Diagram:')
Diagram header
print(qc.draw('text'))
Draw circuit
# 2. Simulate 1,000 shots using AerSimulator
Simulation
sim = AerSimulator()
Initialize simulator backend
result = sim.run(qc, shots=1000).result()
Execute 1000 shots
counts = result.get_counts()
Get outcome frequency dictionary
print('\nMeasurement Results across 1,000 runs:')
Print header
for bit, count in sorted(counts.items()):
Iterate outcomes
pct = (count / 1000) * 100
Calculate percentage
print(f' Outcome |{bit}> : {count} times ({pct:.1f}%)')
Print percentage
print('\nConclusion: Superposition splits probabilities equally; each shot collapses randomly to 0 or 1.')
Summary
Click "Copy for Colab", open Google Colab, paste into a single cell, and run.
1 # ========================================================= 2 # Creating and Measuring Superposition with Qiskit Aer 3 # Prepared for Google Colab (Run with Shift + Enter) 4 # ========================================================= 5 6 # Step 1: Install required packages 7 !pip install qiskit qiskit-aer 8 9 # Step 2: Import libraries 10 from qiskit import QuantumCircuit 11 from qiskit_aer import AerSimulator 12 13 # Step 3: Run Demonstration 14 # 1. Build circuit with Hadamard and Measurement 15 qc = QuantumCircuit(1, 1) 16 qc.h(0) # Put qubit into equal superposition |+> 17 qc.measure(0, 0) # Add measurement 18 print('Superposition Circuit Diagram:') 19 print(qc.draw('text')) 20 21 # 2. Simulate 1,000 shots using AerSimulator 22 sim = AerSimulator() 23 result = sim.run(qc, shots=1000).result() 24 counts = result.get_counts() 25 print('\nMeasurement Results across 1,000 runs:') 26 for bit, count in sorted(counts.items()): 27 pct = (count / 1000) * 100 28 print(f' Outcome |{bit}> : {count} times ({pct:.1f}%)') 29 print('\nConclusion: Superposition splits probabilities equally; each shot collapses randomly to 0 or 1.')
Apply Hadamard gate to put qubit into state (|0> + |1>)/sqrt(2).
Measure qubit onto classical readout register.
Run AerSimulator to observe stochastic 50/50 measurement distribution.
QuantumCircuit(1, 1) with H(0) and Measure(0, 0).
Outcome |0>: ~500 times (~50.0%) Outcome |1>: ~500 times (~50.0%)
Before measurement, the qubit exists simultaneously in both states. Measurement forces an irreversible collapse into either 0 or 1 with equal 50% probability.
Hadamard gates, quantum measurement, histogram analysis, and probability collapse.
Test your understanding with these questions. Remember, this is for learning, not examination!