Skip to main content

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: ZZZZ diagonal

For H∝XX+YY+ZZ−3ZZH\propto XX+YY+ZZ-3ZZ, the ∣00⟩|00\rangle diagonal entry of XX+YY+ZZ−3ZZXX+YY+ZZ-3ZZ equals −2-2 (from ZZ−3ZZ=−2ZZZZ-3ZZ=-2ZZ and XX,YYXX,YY zeros on that slot). Print that diagonal value with 10 decimals.

No input.

Write-ups​

0/3 solved
12.11b.W1

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/ 3 min

Meet the writing requirements, then you can open the model answer.

Next: back to Math & science intro.