Interactive lab › A quantum computer in the loop
Interactive lab · 44/66 · Hybrid computing · real-world deployment
A quantum computer in the loop
Today's quantum computers are used together with classical ones: the classical computer proposes parameters, the quantum processor estimates an energy from a finite number of shots, and the loop repeats. Here the molecule is H₂, reduced to two qubits; the energy landscape of the circuit is drawn underneath the optimiser's path. What decides whether this is useful is less the physics than the engineering: how many shots, how long each shot takes, and how long each job waits in a queue. Try the same run on atoms in the next room and on a cloud processor.
What you are seeing
- The map is the energy E(a, b) of the two-parameter circuit; the ground state (star) lies on b = ±π. Starting points elsewhere can fall into a local minimum at b = 0, a real hazard of variational methods.
- Every energy estimate needs two circuits, one measured in the Z basis and one in the X basis. Shot noise makes the path wander; more shots smooth it but cost time.
- The parameter-shift rule needs four estimates per step, SPSA only two whatever the number of parameters; with two parameters the difference is small, with hundreds it is decisive.
- Atoms take about a second per shot but sit next door; a cloud processor shoots thousands of times faster but each job may wait half a minute. Sending each step as one job is often the biggest saving.
The numbers in the model
| Hamiltonian (Ha) | −1.0524 I + 0.3979 Z₀ − 0.3979 Z₁ − 0.0113 Z₀Z₁ + 0.1809 X₀X₁ |
|---|---|
| Exact ground state | −1.8573 Ha electronic, −1.1373 Ha with the nuclei (0.735 Å) |
| Ansatz | CNOT · (Ry(a) ⊗ Ry(b)) |00⟩ |
| Chemical accuracy | 1.6 mHa ≈ 1 kcal/mol |
| Clock | overhead per job + shots / shot rate per circuit + 50 ms classical per step |
Go further
- Glossary: variational quantum eigensolver
- Glossary: hybrid algorithm
- Lab: QAOA, another variational loop
- CEQT: engineering for quantum technologies