Instructor Guide › 7 Sessions › Teacher notes
Teacher notes — Session 5: Algorithms: search and phase estimation
For instructorsFlipped format
The student page for Session 5 is written for self-study: students can read, work the example, run both experiments, and check their own answers without you. These notes are for the class time you do have.
Before class (students, on their own)
- Read Chapter 5 and Chapter 6.
- Do the worked example and the first experiment on the student page.
- Bring one written prediction and one question.
If you have 20 minutes
| Minutes | What to do |
|---|---|
| 0–3 | Ask the exit question below cold, and take a show of hands. Do not give the answer yet. |
| 3–10 | Board: the worked example from the student page, with students supplying each step. |
| 10–16 | Live demo: run the second experiment. Collect predictions first, then run it. |
| 16–20 | Return to the exit question, settle it, and assign the project. |
If you have a full 75-minute class
| Minutes | Activity |
|---|---|
| 0–10 | Motivating question and show of hands. |
| 10–30 | The three points below, with the mathematics on the board. |
| 30–45 | Worked example at the board, students supplying steps. |
| 45–55 | Misconceptions: put each “common mistake” to the class as a true/false statement. |
| 55–65 | Live demo of both experiments, predictions first. |
| 65–75 | Project briefing and exit question. |
Three points to make
- Oracle flips a sign: nothing visible yet.
- Diffusion as “reflect about the average”, worked on the board for four states.
- One round too many spoils it: run the second experiment live.
Board example
Grover on four states, by hand. Suppose the marked state is |11⟩.
- After the first H gates, all four amplitudes are ½.
- Oracle: the marked amplitude becomes −½. The amplitudes are (½, ½, ½, −½).
- Average: (½ + ½ + ½ − ½)/4 = ¼.
- Diffusion replaces each amplitude a by 2 × average − a. Unmarked: 2 × ¼ − ½ = 0. Marked: 2 × ¼ − (−½) = 1.
The final amplitudes are (0, 0, 0, 1), so the marked state is measured with certainty after one round.
Misconceptions to raise
- Saying Grover “tries all answers at once”. It rotates amplitude toward the answer step by step.
- Running more rounds to be safe. Too many rounds rotate the state past the answer and the success probability falls.
- Forgetting that the oracle changes only a sign. On its own it changes no probability.
Discussion prompts
- Where exactly does the speed-up come from, if the oracle is called one item at a time?
- Why is a quadratic speed-up for unstructured search less dramatic than it sounds for real databases?
Exit question
Ask: After the oracle, what is the probability of measuring the marked state among four?
Looking for: Still ¼. The oracle changes only the sign of the amplitude.
Assign
One project from this session, following the predict → baseline → one extension → analyze routine. Project solutions are deliberately not published on this site.