Lesson plans for every experiment
π‘ 1. Classical Bits
Open experiment βLearning objective: Students understand that a bit has two states and that n bits have 2βΏ combinations, only one of which is stored at a time.
Required knowledge: Counting, powers of two.
Demonstration procedure
- Start with one bit and flip it.
- Add bits one at a time and ask students to predict the number of combinations.
- Press 'Count up' to step through all patterns.
- Relate binary patterns to decimal values.
Expected observation: Combinations: 2, 4, 8, 16β¦ The register always shows exactly one pattern.
Explanation: Each extra bit doubles the options because every existing pattern can be followed by a 0 or a 1.
β Common misconceptions
- A bit can be 'half on'. (No β a classical bit is always 0 or 1.)
- 8 bits store 8 numbers. (They store one of 256 numbers.)
π¬ Discussion questions
- Why do computers use binary rather than decimal?
- How many bits would you need to number every student in your school?
π¬ Research questions
- How does the number of bits needed grow with the number of items? Plot logβ(N).
β Assessment questions
- How many patterns do 5 bits have?
- Convert 1011 to decimal.
- How many bits are needed to label 100 items?
βοΈ 2. Qubits
Open experiment βLearning objective: Students can describe a qubit state with amplitudes and relate them to measurement probabilities.
Required knowledge: Experiment 1; basic probability; (advanced) complex numbers.
Demonstration procedure
- Start at ΞΈ=0 (|0β©).
- Slowly increase ΞΈ and watch the probability bars.
- Set ΞΈ=90Β° and vary Ο.
- Switch to Advanced to see complex amplitudes.
Expected observation: P(1) = sinΒ²(ΞΈ/2); P is unchanged by Ο.
Explanation: Probabilities are squared magnitudes of amplitudes; phase is the angle of the complex amplitude.
β Common misconceptions
- A qubit is secretly 0 or 1 and we just don't know which.
- Amplitudes are probabilities.
π¬ Discussion questions
- If phase doesn't change probabilities, why does it matter?
π¬ Research questions
- Measure P(1) at 10 values of ΞΈ and compare with sinΒ²(ΞΈ/2).
β Assessment questions
- If Ξ± = 0.6, what is the probability of measuring 1?
- Which slider changes only the phase?
π 3. Superposition
Open experiment βLearning objective: Students see that superposition differs from classical uncertainty because amplitudes interfere.
Required knowledge: Experiment 2.
Demonstration procedure
- Apply H once and measure several times.
- Reset, apply H twice, then measure.
- Ask students to explain the difference.
Expected observation: One H β β50/50 results. Two H β always 0.
Explanation: The two paths to |1β© carry opposite signs and cancel β destructive interference.
β Common misconceptions
- Superposition means 'both at once' in a way you can read out.
- Superposition is just a random coin.
π¬ Discussion questions
- Why can't a classical random coin 'un-randomise' itself?
π¬ Research questions
- Apply H, then Z, then H. What happens and why?
β Assessment questions
- What is HΒ·H|0β©?
- True/false: after H, the qubit is secretly 0 or 1.
π 4. Measurement
Open experiment βLearning objective: Students understand measurement collapse and statistical estimation of probabilities.
Required knowledge: Experiments 2β3.
Demonstration procedure
- Choose a state.
- Measure once, then 10, 100, 1000 times.
- Discuss the convergence chart.
Expected observation: Frequencies fluctuate for few shots and settle near the true probability for many shots.
Explanation: Each measurement is an independent random draw; averages converge with error β 1/βn.
β Common misconceptions
- Measuring again right after gives a fresh random result. (It gives the same result β the state collapsed.)
π¬ Discussion questions
- Why do quantum algorithms need to be run many times?
π¬ Research questions
- Plot |frequency β p| against the number of shots.
β Assessment questions
- After measuring 1, what is the state?
- Why isn't 7/10 heads evidence of a biased coin?
πͺ 5. Quantum Coin
Open experiment βLearning objective: Students compare classical and quantum randomness statistics and discover interference with a double flip.
Required knowledge: Experiment 3.
Demonstration procedure
- Run 10 flips of each coin.
- Run 1000 flips.
- Try the quantum 'double flip'.
Expected observation: Both near 50% for many flips; quantum double flip always gives heads (0).
Explanation: The statistics of single measurements match; quantum amplitudes can interfere, classical probabilities cannot.
β Common misconceptions
- Quantum randomness looks 'more random'. (Statistically it looks the same.)
π¬ Discussion questions
- What experiment could tell a quantum coin from a classical one?
π¬ Research questions
- Measure how the spread of heads-fraction shrinks as flips increase.
β Assessment questions
- Expected heads in 1000 fair flips?
- What does H then H do to |0β©?
π 6. Grover's Search β The Maze
Open experiment βLearning objective: Students understand the difference between classical sequential search and Grover's quantum search.
Required knowledge: Experiments 3β4 (superposition, measurement).
Demonstration procedure
- Run Classical mode and record the checks used.
- Run Quantum mode step by step, naming each stage.
- Compare using the split-screen view.
- Measure several times in quantum mode; discuss occasional wrong answers.
Expected observation: Classical: varies, avg β 50. Grover: 8 oracle queries, β 99.6% success β not 100%.
Explanation: The oracle flips the target's phase; diffusion reflects amplitudes about the mean, transferring amplitude to the target each iteration.
β Common misconceptions
- Grover checks all answers at once.
- Grover always gives the right answer.
- More iterations are always better.
- The maze corridors are quantum paths.
π¬ Discussion questions
- Why do we need 7 qubits for 100 items?
- What happens to states 100β127?
π¬ Research questions
- How does target probability change with the number of iterations?
β Assessment questions
- How many Grover iterations for N=128, M=1?
- Why is it O(βN) and not O(1)?
β¨ 7. Multiple-Solution Grover
Open experiment βLearning objective: Students see how the number of solutions changes the optimal iteration count.
Required knowledge: Experiment 6.
Demonstration procedure
- Choose M=1 and run to optimum.
- Repeat for 2, 4, 8.
- Over-rotate by adding iterations.
Expected observation: Optimal k: 6, 4, 3, 2 for N=64 with M=1,2,4,8.
Explanation: Each iteration rotates by 2ΞΈ, and ΞΈ grows with M.
β Common misconceptions
- More iterations always help.
π¬ Discussion questions
- How could you run Grover if you don't know M?
π¬ Research questions
- Plot optimal k vs M for fixed N.
β Assessment questions
- Optimal iterations for N=64, M=4?
π 8. Grover Scaling
Open experiment βLearning objective: Students interpret O(N) vs O(βN) scaling from data.
Required knowledge: Experiment 6.
Demonstration procedure
- Predict iterations for N=1024.
- Run the scaling experiment.
- Read the graphs; switch to log scale.
Expected observation: N=1024 β 25 iterations vs 1024 worst-case checks.
Explanation: Rotation angle ΞΈ β 1/βN, so ~ (Ο/2)/(2ΞΈ) iterations are needed.
β Common misconceptions
- Quadratic speedup = exponential speedup.
π¬ Discussion questions
- Is a square-root speedup enough to be useful in practice?
π¬ Research questions
- Fit a curve to the Grover iterations. What exponent do you get?
β Assessment questions
- If N quadruples, how do Grover iterations change?
ποΈ 9. Search Problems
Open experiment βLearning objective: Students connect a real question to an oracle predicate f(x).
Required knowledge: Experiment 6.
Demonstration procedure
- Choose a problem.
- Read the predicate.
- Run both searches.
Expected observation: Grover finds the solution with high probability after β (Ο/4)βN iterations.
Explanation: Any yes/no check can be an oracle, if it can be implemented reversibly.
β Common misconceptions
- Grover speeds up searching a sorted list. (Binary search already does better.)
π¬ Discussion questions
- Why would you not use Grover to search a phone book sorted by name?
π¬ Research questions
- Design a predicate for Sudoku; estimate N.
β Assessment questions
- Write f(x) for 'find the secret number 42'.
π‘ 10. Quantum Teleportation
Open experiment βLearning objective: Students trace the teleportation protocol and understand its limits.
Required knowledge: Superposition, measurement, CNOT/entanglement.
Demonstration procedure
- Pick a state.
- Step through the circuit.
- Repeat and note different outcomes but same fidelity.
Expected observation: Fidelity = 1 for all outcomes after correction.
Explanation: Entanglement plus classical communication reconstructs the state; Alice's copy is destroyed (no cloning).
β Common misconceptions
- Teleportation moves matter.
- It is faster than light.
π¬ Discussion questions
- Why does Bob need Alice's two bits?
π¬ Research questions
- What is Bob's state before corrections, averaged over outcomes?
β Assessment questions
- How many classical bits are sent?
π 11. Quantum Noise
Open experiment βLearning objective: Students observe how different noise channels degrade a quantum state.
Required knowledge: Measurement, Bell states helpful.
Demonstration procedure
- Show the ideal distribution.
- Add bit-flip noise at 10%, 25%, 50%.
- Switch to phase flip and compare.
Expected observation: Bit flip creates 01/10 outcomes; phase flip leaves Z-basis probabilities unchanged but lowers purity.
Explanation: Different errors affect different measurement bases.
β Common misconceptions
- Simulators include noise automatically.
- If the histogram looks right, the state is right.
π¬ Discussion questions
- Why is noise the main obstacle for today's quantum computers?
π¬ Research questions
- Plot the success probability of Grover vs noise level (use the Research Lab).
β Assessment questions
- Which noise leaves |0β©/|1β© probabilities unchanged?
π‘οΈ 12. Quantum Error Correction
Open experiment βLearning objective: Students understand the idea of syndrome-based quantum error correction.
Required knowledge: CNOT, measurement.
Demonstration procedure
- Run with no error.
- Inject one error on each qubit.
- Inject two errors.
- Run the Monte-Carlo curve.
Expected observation: Any single flip corrected; two flips produce a logical error.
Explanation: Parity checks locate the error without revealing Ξ± and Ξ².
β Common misconceptions
- QEC copies the qubit (it can't β no-cloning).
- The syndrome measurement collapses the data.
π¬ Discussion questions
- This code fixes bit flips only. What about phase flips?
π¬ Research questions
- Find the break-even p where encoding stops helping.
β Assessment questions
- Syndrome (1,1) means which qubit flipped?
π² 13. Quantum Randomness
Open experiment βLearning objective: Students distinguish pseudo-randomness from physical randomness.
Required knowledge: Measurement.
Demonstration procedure
- Generate with seed 42, twice.
- Generate quantum bits.
- Compare histograms and ΟΒ².
Expected observation: Seeded PRNG repeats exactly; both histograms look uniform.
Explanation: Good PRNGs pass statistical tests yet are predictable if the seed is known.
β Common misconceptions
- A simulator produces true quantum randomness.
π¬ Discussion questions
- Why do banks and cryptography care about the source of randomness?
π¬ Research questions
- How many samples until ΟΒ² detects a 55/45 biased coin?
β Assessment questions
- Why is a seeded PRNG called deterministic?
π§ 14. Quantum Machine Learning
Open experiment βLearning objective: Students describe the pipeline data β encoding β circuit β measurement β prediction.
Required knowledge: Qubits, rotations.
Demonstration procedure
- Show untrained predictions.
- Train step by step.
- Watch the decision map change.
Expected observation: Loss decreases; accuracy reaches ~100% on these tiny separable datasets.
Explanation: Gradient descent adjusts rotation angles to change measurement probabilities.
β Common misconceptions
- QML is already better than classical ML.
π¬ Discussion questions
- What would it take to show a quantum advantage in learning?
π¬ Research questions
- Compare with a classical logistic regression on the same data.
β Assessment questions
- What rule computes gradients on quantum hardware?
π€ 15. Quantum + AI Agent
Open experiment βLearning objective: Students evaluate when a quantum algorithm is appropriate.
Required knowledge: Experiments 6β9.
Demonstration procedure
- Run each preset problem.
- Read the agent's reasoning.
- Challenge students to predict its choice first.
Expected observation: Grover chosen only for unstructured search with large N.
Explanation: Structure (sorting, arithmetic) gives classical algorithms huge advantages.
β Common misconceptions
- Quantum computers are faster at everything.
π¬ Discussion questions
- What other problems might suit quantum computers?
π¬ Research questions
- Add a new rule to the agent (see ARCHITECTURE.md).
β Assessment questions
- Name a problem where Grover gives no benefit.