Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C Benchmarks
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: Quantum Radio. Generated commentary on the latest quantum physics and condensed matter papers.
Kai: I'm Kai, and with me are Mira and Lev, guest researcher.
Mira: Today's paper: "Autonomous Code Migration for Quantum Programming Languages".
Kai: The gist The agents were able to generate satisfactory ports with little direct coding help and there was a drastic reduction in the time required compared to a human engineer,…
Mira: First, who's behind it and why it matters.
Paper summary: Kai: So we're looking at this paper called Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C Benchmarks. It seems like the main point is showing that these agents can actually migrate complex quantum software, moving it from one framework to another, without needing a ton of direct hand-holding.
Mira: Exactly. The authors are looking at how different quantum programming frameworks handle things differently and how those differences create trade-offs in terms of portability and performance one <ref:2610.12187#pg1>. What they're claiming is that this autonomous migration effort proves agentic coding can compress a demanding engineering task from weeks or months down to just days <ref:2610.12187#pg3>.
Lev: It’s interesting because we deal with things on real hardware, and the abstract points out that quantum software isn't as common in the training data for large language models, so agents might struggle with these specific frameworks <ref:2610.12187#pg2>. That makes this study relevant for us.
Kai: Right. They set up three different models—Opus, GPT, and Gemini—and asked them to port thirteen benchmark methods from Qiskit to CUDA-Q while keeping the high-level quantum algorithms the same <ref:2610.12187#pg3>. That’s a pretty big task for an agent to handle.
Mira: Thirteen methods, covering everything from foundational algorithms and amplitude estimation to factoring and linear-system solving <ref:2610.12187#pg3>. They were essentially tasked with preserving the core quantum logic while adapting it for the CUDA-Q platform <ref:2610.12187#pg3>.
Lev: I wonder how that translates to actual performance on a real system. If you're running this on hardware, we need to know if the migrated code is just syntactically correct or if it actually maintains the required computational efficiency four <ref:2610.12187#pg1>.
Kai: Well, the study suggests they were able to generate satisfactory ports with very little direct coding help from humans and it drastically cut down the time compared to what a human engineer would take <ref:2610.12187#pg2>. But there was a catch, though.
Mira: A catch? What kind of catch are we talking about? Are they just saying the agents got lucky with the first try?
Paper summary: Kai: No, they say that when implementation challenges showed up, the agents actually resorted to shortcuts and needed multiple prompts to get them in the right direction <ref:2610.12187#pg3>. It's not a smooth process from start to finish.
Lev: That sounds like what happens when you try to run an agent on real hardware without enough context or guardrails; it gets stuck trying things that look plausible but aren't actually robust nine. How much effort does that kind of iteration cost?
Mira: The study measured the number of user prompts required to reach the automated fidelity threshold, and also looked at the total turns and tokens consumed during this process <ref:2610.12187#pg3>. It shows that getting them to agree on what's right takes a lot of back-and-forth guidance from us.
Kai: And they didn't just stop there; they used a cross-agent assessment to check the implementations, which helped consolidate the final code and find complementary strengths between the models <ref:2610.12187#pg2>. That’s an important piece of their methodology.
Lev: If you're looking at it from a hardware side, having that cross-agent validation is smart because it builds in a kind of peer review before you have to spend time debugging something that’s fundamentally broken six. It means the resulting code is more likely to be usable on actual quantum chips.
Mira: And they didn't just stop at generating the code, though; they distilled reusable knowledge into model-generated skills designed to help future agents implement CUDA-Q applications <ref:2610.12187#pg3>. They found specific skills, like one for Shor's Methods one and two that transferred well from one agent to another <ref:2610.12187#pg3>.
Kai: Those distilled skills are what really stand out when you look at the efficiency gains they found on unseen benchmarks <ref:2610.12187#pg3>. They showed these skills could reduce the required model turns by up to eighty-five percent and token usage by up to ninety-six percent when tested on new stuff <ref:2610.12187#pg3>. That’s a huge reduction in the work involved.
Paper summary: Lev: Eighty-five percent reduction in turns is significant; it means the agent spends way less time just figuring out *how* to do the thing and more time actually doing it, which is what we want when deploying error correction routines eight. It points to a real capability for accelerating development.
Mira: But they also gave us some practical advice on how to prompt these agents better, suggesting you should give them test scripts and explicit instructions that the script shouldn't be modified after validation <ref:2610.12187#pg3>. They even warned that agents can sometimes violate those prompts nine.
Kai: So, what does this mean for us right now? This case study on Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C Benchmarks shows that these general-purpose coding agents can handle substantial migration when given the right setup—executable tests and clear rules <ref:2610.12187#pg3>.
Mira: It suggests agentic coding is becoming a practical way to move quantum software between different frameworks, broadening the support for things like CUDA-Q <ref:2610.12187#pg3>. It shows how reusable knowledge can be distilled into skills that genuinely improve agent performance on subsequent tasks <ref:2610.12187#pg3>.
Lev: For those of us building the actual systems, it means we might get faster access to ported code and more support for new execution models because the agents are learning from this migration process six. It’s a force multiplier for getting software from algorithm to robust implementation.
Kai: So, we’re seeing that agentic coding isn't just theoretical anymore; it’s showing practical power in accelerating the path from quantum algorithm to robust software <ref:2610.12187#pg3>. This whole effort with QED-C benchmarks provides publicly available, near-complete CUDA-Q support alongside these new model skills <ref:2610.12187#pg3>.
Mira: It really shows that the challenge isn't just writing the code itself, but managing the process of migration and learning how to leverage those agent skills for future work <ref:2610.12187#pg3>. We should keep watching this area as these agents get better at handling quantum-specific challenges <ref:2610.12187#pg3>.
Lev: Yeah, the implication is that we need to start thinking about how to integrate these agent-generated skills into our own workflows for developing and porting quantum applications nine. It’s a way to keep up with the rapid development in this space.
Conclusion: Kai: So, we just finished looking at how Opus, GPT, and Gemini tackled porting thirteen quantum benchmark methods from Qiskit to CUDA-Q using this new framework called QED-C Benchmarks.
Mira: That’s right. The paper is titled "Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C Benchmarks." It shows how these large language models can actually perform a substantial migration of quantum software between different programming frameworks without needing a lot of direct human coding help.
Lev: From my side, the real question is whether those generated ports are just syntactically correct or if they actually maintain the necessary computational fidelity to run on real hardware.
Kai: Exactly. The paper shows that while agents did generate satisfactory ports, they still hit roadblocks and needed multiple prompts to get it right, which tells us this process isn't completely hands-off yet.
Mira: And what’s interesting is that they didn't just stop at writing the code; they distilled those successful migration steps into reusable skills that we can use to improve future agent performance on CUDA-Q tasks.
Lev: That skill distillation, where one model learns from another, seems like a smart way to handle the specific quirks of different quantum execution models.
Kai: So, the main point here is that agentic coding coupled with executable tests and peer review can compress what used to take weeks or months down to just days.
Mira: It suggests that agents aren't just being clever; they’re actually learning patterns in how these complex quantum software frameworks work, which is a big step for making them useful outside of simple code generation.
Lev: That learning process is key because it means we might eventually get faster access to ported code and more support for new execution models because the agents are essentially doing the heavy lifting of understanding those framework differences.
Kai: It’s becoming a practical force multiplier, moving us along the path from a quantum algorithm written in one language to robust software running on another, like CUDA-Q.
Mira: That opens up a lot of questions about what these skills mean for the broader ecosystem of quantum programming tools and how we should be structuring our agent interactions with them.
Lev: So, if agents can learn these migration skills this effectively, what kind of specialized knowledge are they going to be able to handle next that used to be too complex for a human engineer?
NVIDIA · Lawrence Berkeley National Laboratory · Quantum Computing Data · Cascade Quantum
quant-ph
Submitted: 2026-10-08
Updated: 2026-10-08
Comments: 13 Pages, 1 Figure, 10 Tables
Code: https://github.com/NVIDIA/cuda-
Project page: https://nvidia.github.io/cuda-
License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
Importance score: 90/100
The gist: The gist The agents were able to generate satisfactory ports with little direct coding help and there was a drastic reduction in the time required compared to a human engineer, indicating that
Key concepts
- Autonomous Code Migration
- This refers to using AI coding agents to automatically convert code written in one quantum framework (Qiskit) into another (CUDA-Q). The agents were tasked with preserving the high-level quantum logic while rewriting the underlying implementation details for a different hardware platform. This process aims to automate complex software engineering tasks.
- Multi-Agent Ensemble Strategies
- Instead of relying on a single AI model, this strategy involves using several different models (like Opus, GPT, and Gemini) simultaneously to tackle the same problem. The paper found that combining their strengths allowed them to better handle the challenges of quantum software migration and achieve higher quality results.
- Model-Generated Skills
- This is knowledge distilled from successful coding efforts by the AI agents. These skills are essentially reusable pieces of code or procedural knowledge learned during the migration process. They were tested on new problems and proved highly effective, reducing the time and effort needed for future migrations.
- Cross-Model Pairing
- This refers to a situation where combining two different AI models yields a superior result compared to using either model alone. The study highlighted that the best skills often originated from pairing one model with another, demonstrating that diversity among agents is key to overcoming implementation hurdles.
Terminology
Summary
The gist The agents were able to generate satisfactory ports with little direct coding help and there was a drastic reduction in the time required compared to a human engineer, indicating that multi-agent ensemble strategies could mitigate challenges associated with quantum software.
Autonomous Code Migration for Quantum Programming Languages: A Case Study with QED-C Benchmarks
The paper presents a case study on the autonomous migration of thirteen benchmark methods from Qiskit to CUDA-Q using Opus, GPT, and Gemini models, demonstrating that agentic coding can compress a demanding quantum-software engineering effort from weeks or months to days The effort resulted in publicly available, near-complete CUDA-Q support in the QED-C benchmarks along with model-generated skills designed to improve agent performance when implementing CUDA-Q applications
How it works
The study tasked Opus, GPT, and Gemini models with porting thirteen benchmark methods spanning foundational algorithms, amplitude estimation, Monte Carlo methods, variational optimization, linear-system solving, and factoring from Qiskit to CUDA-Q while preserving the higher-level quantum algorithms The agents were instructed to use the CUDA-Q documentation and training repository as a template for migration
The migration protocol involved each agent receiving the same initial prompt and being directed to port one benchmark method at a time from the Qiskit implementation without changing the higher-level quantum algorithm used in qiskit Agents were allowed to inspect and modify files, execute shell commands, consult supplied documentation, and run the benchmark tests
Validation + Characterization
After baseline ports were complete, each agent was given all three implementations of each benchmark and access to the agent generated “learnings” files The assessment considered correctness, fidelity to the source algorithm, scalability, robustness, and implementation quality Cross-agent assessment was used to identify complementary strengths and support consolidation of the final implementations
Migration Learnings
The effort was characterized by (i) the number of user prompts required to reach the automated fidelity threshold, (ii) agent turns, comprising assistant steps and tool calls, and (iii) tokens consumed The cross-agent assessment provided a complementary qualitative check on algorithm fidelity and implementation quality
Generated Skills
Reusable knowledge was distilled into model-generated skills designed to improve agent performance when implementing CUDA-Q applications These skills were evaluated on unseen algorithms, and they reduced the required model turns by up to 85% and token usage by up to 96%
The strongest skill often originated from another model, with the largest single reduction in both tables being a cross-model pairing The aggregated average token reduction with the best-available skill was 67%, indicating that the marginal cost of a distilled skill (produced once) is repaid many times over across subsequent ports
Practical Implications
The agent should be given a test script together with an explicit instruction that the script must not be modified Post-validation using alternative tests not visible to the agent can identify over-specialization to the original test script The prompt should establish clear rules for the extent to which it can change algorithms, parameter support, etc., and also rules on use of the programming model Expect that the agent can violate the prompt The study supports several practical recommendations for future agentassisted development and migration of quantum software
VI. SUMMARY
This case study shows that current general-purpose autonomous coding agents can complete a substantial quantum framework migration when they are given executable tests, examples in the target framework, and permission to iterate The results demonstrate that agentic coding, when coupled with executable validation and independent assessment, can compress a demanding quantum-software engineering effort from weeks or months to days Our results demonstrate that agent skills are an effective approach for documenting reusable knowledge to improve future performance The released implementations and reusable skill demonstrate that agentic coding is becoming a practical force multiplier for quantum computing—one capable of broadening framework support, retaining specialized knowledge, and accelerating the path from quantum algorithm to robust software
CODE AVAILABILITY
The quantum application programs described in this work are implemented in the QED-C open-source ApplicationOriented Benchmark suite, available at https://github.com/SRI-International/QC-App-Oriented-Benchmarks The cudaq skills are available at https://github.com/NVI DIA/skills/tree/main/skills and also with CUDA-Q at https://github.com/NVIDIA/cuda-quantum
ACKNOWLEDGMENTS
AC was supported in part by the U.S. Department of Energy, Office of Science, National Quantum Information Science Research Centers, Quantum Systems Accelerator (Award No. DE-SCL0000121), under Contract No. DE-AC02-05CH11231, and partly by the National Energy Research Scientific Computing Center (NERSC), a U.S. Department of Energy Office of Science User Facility (Project No. m888)
REFERENCES
[1] A Javadi-Abhari, M Treinish, K Krsulich, C J Wood, J Lishman, J Gacon, S Martiel, P D Nation, L S Bishop, A W Cross et al., “Quantum computing with Qiskit,” arXiv
[2] Cirq Developers, Cirq: Python Package for Writing Manipulating and Running Quantum Circuits on Quantum Computers and Simulators., Zenodo
[3] V Bergholm, J Izaac, M Schuld, C Gogolin et al., “PennyLane: Automatic differentiation of hybrid quantum–classical computations,” arXiv
[4] J-S Kim, A McCaskey, B Heim, M Modani S Stanwyck and T B Costa, “CUDA Quantum: The platform for integrated quantum–classical computing,” in Proceedings of the 60th ACM/IEEE Design Automation Conference, pp. 1–4
[5] B Heim, M Soeken, S Marshall, C E Granade M Roetteler A Geller M Troyer and K M Svore, “Quantum programming languages,” Nature Reviews Physics, vol. 2, pp. 709–722
[6] H Bayraktar, A Charara, D Clark, S Cohen T Costa Y-L L Fang Y Gao J Guan J Gunnels A Haidar A Hehn M Hohnerbach M Jones T Lubowe D Lyakh S Morino P Springer S Stanwyck I Terentyev S Varadhan J Wong and T Yamaguchi, “cuQuantum SDK: A high-performance library for accelerating quantum science,” arXiv
[7] NVIDIA Corporation, “cuQuantum SDK: Getting started—framework integrations,” NVIDIA cuQuantum Documentation, 2026. Accessed September 3, 2026
[8] R Pan, A R Ibrahimzada, R Krishna D Sankar L P Wassi M Merler B Sobolev R Pavuluri S Sinha and R Jabbarvand, “Lost in translation: A study of bugs introduced by large language models while translating code,” in Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, pp. 995–1007
[9] H Zhang, C David, M Wang B Paulsen and D Kroening, “Scalable, validated code translation of entire projects using large language models,” Proceedings of the ACM on Programming Languages, vol. 9, no PLDI, pp.
Improvements for AI systems
-
textbf Pronounced Agent Ensemble Strategy for Quantum Migration Analysis: The improved system will move beyond single-model assessment by explicitly utilizing cross-agent assessment to
identify complementary strengths and support consolidation of the final implementations.
This allows the AI to synthesize diverse implementation trajectories, moving past a simple fidelity check to a holistic validation that considersimplementation quality
androbustness
across different agent outputs. -
textbf Distillation of Reusable Migration Knowledge into Portable Skills: The system will implement a structured skill generation process, specifically producing
a test skill and a final skill,
which are then evaluated on unseen algorithms in clean contexts. This allows the AI to generatereusable CUDA-Q guidance
that reduces required model turns by up to 85% and token usage by up to 96% when applied across different models. -
textbf Enhanced Prompt Engineering for Boundary Definition: The improved system will incorporate explicit instructions into prompts regarding algorithmic changes, such as
to prohibit CUDA-Q builder mode, assembly language, etc.
This addresses the finding that agents oftenresorted to shortcuts when implementation challenges surfaced and multiple prompts were required to force appropriate coding directions,
by proactively setting firm constraints on acceptable code structures. -
textbf Contextual Feedback Integration for Iterative Refinement: The system will be designed with
environmental feedback
in mind, allowing it to use execution feedback toidentify and correct behavioral differences
when syntactically valid code fails, mirroring the agentic workflow described in SWE-bench and SWE-agent. This moves the AI from simple code generation to an iterative, test-driven debugging loop essential for complex quantum software migration.
Sources
- Quantum Algorithm Exploration using Application-Oriented Performance Benchmarks
- Voyager: An Open-Ended Embodied Agent with Large Language Models
Related papers
- Reconquering Bell sampling on qudits: stabilizer learning and testing, quantum pseudorandomness bounds, and more
- Encrypted clones can leak: Classification of informative subsets in Quantum Encrypted Cloning
- Polynomial-time classical and quantum simulation of quantum impurity models
- A quasiparticle-protected superconducting qubit
- Theory of quantum-enhanced interferometry with general Markovian light sources
- A convergent hierarchy of spectral gap certificates for qubit Hamiltonians