AI
LLM-Powered Multi-Agent Framework Automates Quantum Circuit Programming
QAgent, a new autonomous system using multiple AI agents, dramatically improves the generation of low-level quantum code for near-term quantum devices.
Programming quantum computers at the OpenQASM level — the low-level language that directly instructs quantum hardware — has long been a bottleneck. It demands specialized expertise in hardware constraints, iterative refinement, and calibration to work reliably on today's noisy quantum devices. Researchers have now introduced QAgent, an autonomous framework that tackles this challenge by orchestrating multiple AI agents to generate, test, and optimize quantum code end-to-end.
How QAgent Works#
The system combines three key capabilities into a unified pipeline:
- Task planning: QAgent uses schema-aware reasoning to break down quantum programming requirements into structured subtasks
- Code synthesis: It draws on examples and tools via retrieval-augmented generation (RAG) to draft OpenQASM code, leveraging stored kernel knowledge and backend constraints
- Hardware calibration: The framework automatically adjusts code to account for real-world hardware drift and imperfections
Multiple AI agents coordinate throughout the workflow, with each iteration feeding execution results back into the planning loop to catch and fix errors.
Performance Gains Across Models#
Testing on 12 representative quantum kernels and their combinations, QAgent showed consistent improvements:
- For single-kernel tasks, the system improved Pass@1 accuracy by 47–70% across five different large language models
- On multi-kernel workflows, it achieved over 88% accuracy with larger models
- These results substantially exceeded existing baseline approaches
Robustness Under Real-World Conditions#
A critical strength emerged when researchers simulated realistic hardware drift — a common problem in quantum devices. While traditional SDK-based LLM methods saw significant performance drops under these conditions, QAgent maintained near-perfect execution fidelity through its automated calibration layer. This difference underscores how tightly integrating planning, synthesis, and calibration is essential for generating quantum programs that actually work reliably on real hardware.
The researchers have open-sourced their implementation, making the framework available to the quantum computing community.

