From published paper to working simulation — autonomously.
An AI Agent Replicated a QuTech Quantum Paper
Claude Opus 4.6 wrote 300 lines of molecular energy simulation code from a paper reference alone
One of the most powerful tests of AI scientific capability is paper replication: given a published paper, can an AI agent reproduce the experiment from scratch? We tested this with a quantum computing paper from our own institution.
The Paper
"Error Mitigation by Symmetry Verification on a Variational Quantum Eigensolver"
Sagastizabal et al., Physical Review A 100, 010302 (2019)
arxiv:1902.11258
This paper from QuTech / TU Delft demonstrates a key technique: using physical symmetries to detect and mitigate errors in variational quantum eigensolvers (VQE). They find the ground-state energy of H₂ — the hydrogen molecule — using a 2-qubit circuit with Z-parity symmetry verification.
What the AI Built
Claude Opus 4.6 produced ~300 lines of production Qiskit code covering:
1. Hamiltonian Construction
The H₂ molecular Hamiltonian in the STO-3G basis, transformed via Bravyi-Kitaev reduction to a 2-qubit operator:
H = g₀II + g₁ZI + g₂IZ + g₃ZZ + g₄XX + g₅YY
The agent correctly identified that the coefficients (g₀ through g₅) are functions of the bond distance, and tabulated them from the O'Malley et al. reference data for 12 bond distances from 0.3 to 2.5 Angstroms.
2. Ansatz Circuit
A single-parameter exchange rotation in the {|01⟩, |10⟩} subspace — a parity-preserving ansatz that keeps the state within the correct symmetry sector. The agent decomposed this into RXX(θ) and RYY(θ) rotations, matching the paper's approach.
3. Noise Model
Realistic noise parameters matching the paper's device characterization:
- T₁ = 30μs, T₂ = 60μs (thermal relaxation)
- Depolarizing noise on single-qubit gates (0.1%) and two-qubit gates (1%)
- Measurement error (1%)
4. Symmetry Verification
The key innovation of the paper: post-selecting measurement results on states where the qubit parity matches the ground-state sector (even parity for H₂). This filters out a significant fraction of errors without additional circuit overhead.
5. Measurement Protocol
Three measurement bases (Z, X, Y) with 8192 shots each. The XX expectation value requires Hadamard-rotated measurements; YY requires Sdg-Hadamard-rotated measurements. The agent correctly implemented all three basis rotations.
What This Demonstrates
This experiment shows that AI agents can:
- Read and understand quantum physics papers — extracting the Hamiltonian, ansatz structure, noise parameters, and measurement protocol
- Translate physics to code — implementing the Bravyi-Kitaev transformation, noise channels, and symmetry verification in Qiskit
- Handle domain-specific details — correctly managing complex numbers, basis rotations, and expectation value calculations
The entire replication was done in a single session with Claude Opus 4.6 acting as a coding agent through Claude Code. The human role was to provide the paper reference and review the output — the agent handled the physics, mathematics, and implementation.
Limitations
To be clear about what this doesn't show:
- We haven't yet run this on actual quantum hardware (only Qiskit Aer simulation)
- We haven't done a quantitative comparison of our curves against the paper's published figures
- The noise model is approximate — real device noise is more complex
- A human physicist reviewed the code, which matters for trust
These are next steps, not fundamental limitations. The point is that the AI produced a reasonable starting point — 300 lines of domain-specific simulation code — from a paper reference alone.
Sources & References
- Sagastizabal et al. (2019) — original paperhttps://arxiv.org/abs/1902.11258
- Our replication code (GitHub)https://github.com/JDerekLomas/quantuminspire/blob/main/replicate_sagastizabal.py
- O'Malley et al. — H2 coefficient datahttps://arxiv.org/abs/1512.06860
- Bravyi-Kitaev transformationhttps://arxiv.org/abs/1208.5986