Designing more efficient quantum circuits with Claude
TL;DR Highlight
With a verifier loop, Claude designed quantum circuits that beat the best published ones
Who Should Read
An LLM app developer wondering how to attach an automated scorer to an agent for iterative improvement
Core Mechanics
- A closed loop with an evaluator is the key
- Claude writes circuits in Python and the evaluator returns correctness and a score.
- It used that feedback to improve each next attempt with no human input between rounds.
- The score is qubits times gates
- It was used as a proxy for how long the circuit would run.
- Each input gives one definite output, so an ordinary computer could verify correctness.
- All eight circuits beat the published best
- Eight primitives from chemistry, optimization, physics simulation and number theory used fewer qubits and fewer gates.
- Some improvements were an order of magnitude or more.
- Point addition took 53 hours
- Humans supplied only a one-paragraph brief and occasional prompts to think more broadly.
- Claude built the first reversible divsteps that stores no branch history by decoding it from the number pair.
- A family of store-versus-decode designs
- Versus the smallest prior design, one circuit uses 12% more qubits but 17x fewer gates.
- It added new qubit and runtime trade-off options.
- DQI decoder gates cut 12x
- Replacing the extended Euclidean algorithm with Berlekamp-Massey cut gates 12x versus Google's previous construction.
- After 403 million sample decodings, it reserved 19 qubits instead of 665 for the worst case, failing about 1 run in 10,000.
Community Reactions
- Opinion that this is code golf on an assembly language
- A commenter said this builds on Google's Kickmix, where a verification loop lets an LLM test and discard ideas quickly.
- Another example of Kickmix circuit optimization cited was ecdsa.fail.
- Objection that it is not the same computation
- A commenter pointed out that dropping costly components for rare inputs means the circuit is not computing the same thing.
- Skepticism about the blog's credit framing
- One commenter compared the arXiv acknowledgments to the blog's attribution and questioned it.
- The claim that the whole blog is hallucinated is that commenter's assertion.
- Opinion that this resembles SIMD programming
- A commenter noted that having no branching at the lowest level looks like SIMD, suggesting classical and quantum high-performance programming are converging.
How to Apply
- Write an automated scorer for your task
- Today, pick a task you can check by code, such as code optimization or SQL tuning.
- First write a script that checks correctness and prints a score such as speed or memory.
- Paste the prompt below so Claude improves the design against that score.
- Feed scores back into your agent loop
- After the agent produces a result, put the evaluator's pass/fail and score into the next prompt.
- Set a cap on how many rounds run without human input.
- Keep the brief short and ask for parallel exploration
- Write the problem and scoring in one paragraph.
- Tell the model to explore several approaches in parallel.
- If it stalls, add only a prompt to think more broadly.
Try It
# Paste into Claude Code or Claude (simplified version of the paper's method: closed evaluator loop)
You are an engineer improving {{code/function to optimize}}. The evaluation script below prints correctness and a score. The score is {{score definition, e.g. runtime x memory}}; lower is better.
Evaluation script: {{path or contents of evaluate.py}}
Rules: 1) Propose one design at a time and run it to check the score. 2) If it is incorrect, the score is invalid. 3) Do not ask me questions; iterate for {{N}} rounds. 4) Explore 3 different approaches in parallel. 5) Look for structural properties of the problem rather than simple tuning.
Next step: ask for a table of scores per attempt and an explanation of why the best design works.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques