Exercises: Quantum Cloud Platforms
Difficulty: ★ warm-up · ★★ standard · ★★★ extended · ★★★★ open-ended.
[measure] — run something and report a number. [price] — the answer is in dollars. [refuse] — identify a claim that should not be made.
Exercises marked [credentials] need a real provider account. Everything else runs against fake backends and local simulation.
What a circuit costs (§39.2)
39.1 ★ A device has dt = 4e-09, cz at 68–184 ns, and measure at 1,560 ns. Which dominates a
2-qubit circuit with one entangling gate?
39.2 ★ Why does rz cost zero nanoseconds? (Chapter 31 has the answer.)
39.3 ★★ [measure] Reproduce §39.2's duration table. Then add a 20-qubit GHZ and say whether duration grows linearly in qubit count.
39.4 ★★ [measure] Time local simulation of the same four circuits five times each. Report the spread, and say what it means that the spread is comparable to the difference between circuits.
39.5 ★★★ [measure] Find the circuit width at which local state-vector simulation stops being competitive with hardware execution time. State your machine's specs.
39.6 ★★★ QFT-8 has 137 two-qubit gates and takes 10.55 µs; EfficientSU2-12 has 33 and takes 3.22 µs. Is duration proportional to two-qubit gate count? Check, and explain the residual.
The queue (§39.3)
39.7 ★ Compute utilization for a 43.20 ms job at a 2-minute queue.
39.8 ★★ At what queue length does a 4,096-shot Bell job reach 1% utilization?
39.9 ★★ [measure] Compute the batching speedup for 10, 100, and 1,000 circuits at a 5-minute queue. Why does the benefit saturate?
39.10 ★★ §39.3 says Part V's optimizations "make the 7 milliseconds better and none of them touch the five minutes." Is that a criticism of Part V? Answer in two sentences.
39.11 ★★★ [credentials] Measure real queue times on a public device across a week. Report the distribution, not the mean, and say what a scheduler that produced it is optimizing for.
39.12 ★★★ Design a workflow for a 120-iteration variational loop that minimizes wall clock under a per-job queue with no session support. What is the best you can do, and what does it cost in convergence quality?
Pricing (§39.4–39.5)
39.13 ★ Why does job_cost raise without a circuit duration?
39.14 ★ Why does PriceBook require an as_of date?
39.15 ★★ [price] Price 1,000,000 shots of QFT-8 under all three models. Which is cheapest, and does the answer change for 1,000,000 shots of Bell?
39.16 ★★ [price] At what circuit duration do the per-minute and per-shot superconducting models cost the same? Derive it algebraically, then check numerically.
39.17 ★★ [refuse] "Provider A charges $0.00035 per shot and Provider B charges $96 per minute, so A is cheaper." What is missing?
39.18 ★★★ [price] Price all four of the book's experiments under a per-minute model. Why is the ordering different from the per-shot ordering?
39.19 ★★★ [price] The trapped-ion premium is 28× per shot. Estimate what it buys in effective computation — using Chapter 29's connectivity costs and Chapter 30's fidelity figures — and say whether 28× is a good deal for a QAOA workload.
39.20 ★★★★ [open] Look up current published rates for three providers. How much have they moved
since this chapter's as_of date, and did the structure change or only the numbers?
Calibration and layout (§39.6)
39.21 ★ Why does a cz error of 1.00 mean the link is dead?
39.22 ★★ [measure] Reproduce the calibration spread table. How many links exceed 10× the median error?
39.23 ★★ [measure] Reproduce the 14-qubit layout sweep. Do you get a 2.03× error ratio? Then run the 4-qubit version and confirm zero variation.
39.24 ★★ Explain why layout_variance_is_measurable(4) returns False. What would a team conclude
if it did not?
39.25 ★★★ The 14-qubit sweep showed 49 to 112 two-qubit gates. Is that routing or link selection? Design the measurement that separates them, then run it.
39.26 ★★★ [measure] Sweep optimization_level 0–3 on the 14-qubit circuit at 24 seeds each.
Does a higher level reduce the variance as well as the mean? (Chapter 28 measured the mean.)
39.27 ★★★ MIN_QUBITS_FOR_ROUTING = 8 is a judgement call. Derive a better threshold from the
device's coupling map, and say what it depends on.
Reproducibility (§39.8)
39.28 ★ Name the four provider-side fields and say why none of them is in your source code.
39.29 ★★ Why is is_reproducible False for a record with a pinned environment and a fixed seed?
39.30 ★★ [refuse] A repository has requirements.txt, a fixed seed, and a notebook that
regenerates every plot. What can you honestly say about reproducibility?
39.31 ★★★ Case Study 39.2's group fixed their transpiler seed and still got a different layout. Explain the mechanism, then propose a way to pin the layout that actually works.
39.32 ★★★ Design a reproducibility standard a journal could enforce for hardware results. Separate what you would require from what you would like.
39.33 ★★★ [credentials] Run the same circuit on the same backend on three different days. Report the spread in your observable, and say whether you could have distinguished a real 10% effect.
Integration
39.34 ★★★ Chapters 27, 28, 33, 34, 37, 38, and 39 all made a measurement that was too small. §39.6's is different in kind. Explain how, in two sentences.
39.35 ★★★★ [open] [price] Take a published quantum result you find interesting. Reconstruct its shot count and circuit duration from the paper, price it under all three models, and report what the experiment cost. Note anything you had to guess — that list is the finding.