Exercises: Quantum Chemistry with VQE
Difficulty: ★ warm-up · ★★ standard · ★★★ extended · ★★★★ open-ended.
Exercises marked [measure] require you to run something and report a number. Exercises marked [refuse] ask you to identify a claim that should not be made — Part V's habit, applied to chemistry.
Molecules to qubits (§36.1–36.2)
36.1 ★ For a molecule with 9 spatial orbitals in a minimal basis, how many qubits does a Jordan–Wigner encoding need? State the rule you used.
36.2 ★ Chemical accuracy is 1 kcal/mol. Convert it to Hartree and confirm §36.1's $1.6\times10^{-3}$. Then explain in one sentence why the threshold is a chemistry fact rather than a numerical-analysis one.
36.3 ★★ [measure] Build the Hamiltonian for HF (hydrogen fluoride) in STO-3G at a bond length of 1.7328 Bohr. Report qubits and term count, and place it in §36.2's table.
36.4 ★★ §36.2 measured 631 terms at 12 qubits and 1,086 at 14. Fit an exponent to those two points alone. How far is it from 4, and what does that tell you about fitting exponents to two points?
36.5 ★★ [refuse] A colleague says "our device has 14 qubits, so we can do BeH₂ or H₂O — same size." Identify the error, quote the measurement from §36.2 that refutes it, and give the one-sentence correction.
36.6 ★★★ [measure] Extend hamiltonian_terms() to take an electron count as well as a qubit
count, fit it against the four measured molecules, and report how much of the BeH₂/H₂O discrepancy your
fit explains. Then say honestly whether four points justify the extra parameter.
Mappings (§36.3)
36.7 ★ In Jordan–Wigner, why does a single excitation operator $a^\dagger_p a_q$ become a Pauli string of length $\mathcal{O}(n)$ rather than weight 2?
36.8 ★★ [measure] Reproduce §36.3's weight comparison for BeH₂. Do Jordan–Wigner and Bravyi–Kitaev give the same term count there too? Report both weight distributions.
36.9 ★★ §36.3 found JW's weight distribution has a long tail to weight 12 while BK caps at 10, on a 12-qubit problem. Predict what the same comparison looks like at 30 qubits and say what measurement would confirm your prediction.
36.10 ★★ [refuse] "Bravyi–Kitaev reduces the number of Hamiltonian terms, so it reduces the shot budget." Both halves are wrong in different ways. Separate them.
36.11 ★★★ Pauli weight sets measurement-circuit depth per term. Using Chapter 12's depth costs and Chapter 29's error rates, estimate the fidelity difference between measuring a weight-12 and a weight-6 term on heavy-hex hardware. State every assumption.
36.12 ★★★ [measure] Compare JW and BK on parity mapping as well, for LiH. Where does parity sit on the occupation/parity trade-off §36.3 describes?
The active space (§36.4)
36.13 ★ Why is ActiveSpace(n_electrons=10, n_orbitals=2) rejected? Name the physical principle.
36.14 ★★ [measure] Reproduce §36.4's active-space table for LiH. Then add (4e,5o) and report where it falls between (4e,4o) and the full space.
36.15 ★★ Explain why ActiveSpace refuses an error_ha without a validated_against. Construct
the specific misreading that field prevents.
36.16 ★★ [refuse] A paper reports a VQE energy for a (6e,6o) active space and does not mention the active-space error. What is the strongest claim you can make from the paper as written? Write it out.
36.17 ★★★ [measure] Take LiH's (2e,2o) space and vary the bond length from 1.5 to 6.0 Bohr. Does the active-space error stay at 0.0201 Ha? Plot it. What does the shape tell you about where truncation is dangerous?
36.18 ★★★ §36.4 says the active-space decision "is not gated on hardware at all." Find the step in validating an active space that is gated on classical compute, and give the orbital count where it binds.
The central result (§36.5)
36.19 ★★ [measure] Reproduce the 9,870,104× ratio. Then re-run VQE with 20 optimizer steps instead of 120 and report how the ratio changes. Does a worse optimizer change the conclusion?
36.20 ★★ VQE reached $2.04\times10^{-9}$ Ha with three parameters. Explain why three parameters suffice for (2e,2o), from the excitation structure.
36.21 ★★ [refuse] Write the one-sentence claim that the §36.5 measurement does support, in a form you would be willing to defend in review.
36.22 ★★★ Suppose someone argues: "the active-space error is systematic, so it cancels in binding differences even if it is large in absolute energies." Evaluate that argument. Under what conditions is it right, and how would you test it for LiH? [measure] if you can.
36.23 ★★★ Modify total_error to accept a basis-set incompleteness error as a third contribution.
What reference would you measure it against, and why does that make the module's design harder?
The baseline and the crossover (§36.6–36.7)
36.24 ★ Why does classical_baseline(6) return full_ci while classical_baseline(50) returns
ccsd_t?
36.25 ★★ §36.6 measured exact diagonalization at 22.996 s for 12 qubits. Estimate the time at 16, 20, and 24 qubits and state the scaling you assumed. At which point does your estimate stop being believable, and why?
36.26 ★★ [measure] Reproduce §36.7's crossover table. Then find the orbital count at which the budget first exceeds one QPU-year.
36.27 ★★ The mitigation table stacks to 6 × 10⁵×. Recompute it assuming grouping and shadows do not compose (take the better of the two rather than the product). How much does the conclusion change?
36.28 ★★★ [refuse] A proposal states: "Our 200-qubit device exceeds the 100 qubits needed for a 50-orbital active space, placing this calculation within reach." Write the two-paragraph technical rebuttal, with numbers.
36.29 ★★★ §36.6 lists DFT as reaching thousands of atoms at $\mathcal{O}(n^3)$. DFT is also approximate in a way that is hard to bound. Does that make it a stronger or weaker baseline for a quantum comparison than CCSD(T)? Argue both sides, then commit.
36.30 ★★★★ The chapter prices VQE at the crossover and finds it 10⁸ short. Price phase estimation on error-corrected hardware for the same 50-orbital problem, using Chapter 22 §22.4's phase-estimation cost and Chapter 25's overhead figures. Report the physical-qubit count and say what your estimate is most sensitive to.
Integration
36.31 ★★ [measure] Run project-checkpoint.py. Then add a test asserting that
chemical_accuracy_claim returns UNVALIDATED in preference to MISSED when both conditions hold,
and say why that precedence is the right one.
36.32 ★★★ Chapter 27's assert_distribution refuses tolerances below the shot-noise floor;
Chapter 30's quoted_fidelity requires an explicit statistic; this chapter's total_error refuses an
unvalidated space. State the single design principle all three share in one sentence, then find a place
in your own code where it applies.
36.33 ★★★ Case Study 36.1 calls the failure "structural rather than dishonest" and locates it in the seam between two correct pieces of work. Describe a process change — not a code change — that would catch it, and say what it costs.
36.34 ★★★★ [open] Pick a published VQE chemistry result. Determine, from the paper alone, whether its active-space error was measured. Report what you found, including "the paper does not say" if that is the answer — which it often is, and which is itself the finding.
36.35 ★★★★ [open] §36.6 narrows the honest target to strongly-correlated systems where CCSD(T) breaks down and DMRG's assumptions fail. Estimate how large that set is: find three concrete systems in it and three that are commonly claimed to be in it but are not. Defend each placement.