Instructor Guide › 7 Sessions › Teacher notes
Teacher notes — Session 4: Real hardware: compilation and noise
For instructorsFlipped format
The student page for Session 4 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 4 and Chapter 7.
- 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
- Logical versus physical circuit; native gates and connectivity.
- Live demo: star-shaped GHZ on a line doubles the two-qubit gates.
- Same state as a chain: no overhead. Design with the layout in mind.
Board example
Estimate how much routing costs. Suppose every two-qubit gate succeeds with probability 0.99, and ignore every other error.
- Logical circuit, 3 two-qubit gates: 0.99³ ≈ 0.970.
- Compiled circuit, 6 two-qubit gates: 0.99⁶ ≈ 0.941.
- Routing alone moved the estimate from about 97% to about 94%, before counting single-qubit gates, readout, or idle time.
This is a rough model, not a prediction for any particular device. Its use is to compare two versions of the same circuit before you spend hardware time.
Misconceptions to raise
- Reporting the depth of the circuit you drew instead of the circuit that ran.
- Assuming all qubits on a device are equally good and all pairs are connected.
- Blaming every difference from the ideal result on “noise” without separating sampling error, compilation, and device error.
Discussion prompts
- Who should adapt, the algorithm or the compiler? When is each the better choice?
- Which numbers would you insist on seeing before believing a hardware result?
Exit question
Ask: Two circuits prepare the same state. One compiles to 3 two-qubit gates and one to 6. Which do you run, and why?
Looking for: The one with 3. Every additional two-qubit gate adds error, so fewer gates means a result closer to ideal.
Assign
One project from this session, following the predict → baseline → one extension → analyze routine. Project solutions are deliberately not published on this site.