12.11b QC code-sketch labs
Source: Lab ideas tied to Computational Physics §12.11 listing topics. Pure Python — no Qiskit in the sandbox. Continues 12.11.
Explorer
Spot the math the sketches must get right (including common off-by-one bugs in iteration counts).
Formula refresh
Warm up: pick the matching equation among lookalikes (same walk as the theory lesson).
Activity: diagonal
For , the diagonal entry of equals (from and zeros on that slot). Print that diagonal value with 10 decimals.
No input.
Write-ups
Using “sqrt”, “N”, and “qubits”, explain:
In a Grover driver, should π√·/4 use the number of qubits n or the search space size N=2ⁿ?
Minimum 3 words. Your answer must include: “sqrt”, “N”, “qubits”.
0 words
Meet the writing requirements, then you can open the model answer.
Next: back to Math & science intro.