QUASAR: Quantum Assembly Code Generation Using Tool-Augmented LLMs via Agentic RL
- URL: http://arxiv.org/abs/2510.00967v1
- Date: Wed, 01 Oct 2025 14:40:04 GMT
- Title: QUASAR: Quantum Assembly Code Generation Using Tool-Augmented LLMs via Agentic RL
- Authors: Cong Yu, Valter Uotila, Shilong Deng, Qingyuan Wu, Tuo Shi, Songlin Jiang, Lei You, Bo Zhao,
- Abstract summary: Large language model (LLM)-based quantum circuit generation has emerged as a promising automatic solution.<n>We propose QUASAR, an agentic reinforcement learning framework for quantum circuits generation and optimization.
- Score: 8.823588193058727
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: Designing and optimizing task-specific quantum circuits are crucial to leverage the advantage of quantum computing. Recent large language model (LLM)-based quantum circuit generation has emerged as a promising automatic solution. However, the fundamental challenges remain unaddressed: (i) parameterized quantum gates require precise numerical values for optimal performance, which also depend on multiple aspects, including the number of quantum gates, their parameters, and the layout/depth of the circuits. (ii) LLMs often generate low-quality or incorrect quantum circuits due to the lack of quantum domain-specific knowledge. We propose QUASAR, an agentic reinforcement learning (RL) framework for quantum circuits generation and optimization based on tool-augmented LLMs. To align the LLM with quantum-specific knowledge and improve the generated quantum circuits, QUASAR designs (i) a quantum circuit verification approach with external quantum simulators and (ii) a sophisticated hierarchical reward mechanism in RL training. Extensive evaluation shows improvements in both syntax and semantic performance of the generated quantum circuits. When augmenting a 4B LLM, QUASAR has achieved the validity of 99.31% in Pass@1 and 100% in Pass@10, outperforming industrial LLMs of GPT-4o, GPT-5 and DeepSeek-V3 and several supervised-fine-tuning (SFT)-only and RL-only baselines.
Related papers
- VQC-MLPNet: An Unconventional Hybrid Quantum-Classical Architecture for Scalable and Robust Quantum Machine Learning [60.996803677584424]
Variational Quantum Circuits (VQCs) offer a novel pathway for quantum machine learning.<n>Their practical application is hindered by inherent limitations such as constrained linear expressivity, optimization challenges, and acute sensitivity to quantum hardware noise.<n>This work introduces VQC-MLPNet, a scalable and robust hybrid quantum-classical architecture designed to overcome these obstacles.
arXiv Detail & Related papers (2025-06-12T01:38:15Z) - Provably Robust Training of Quantum Circuit Classifiers Against Parameter Noise [49.97673761305336]
Noise remains a major obstacle to achieving reliable quantum algorithms.<n>We present a provably noise-resilient training theory and algorithm to enhance the robustness of parameterized quantum circuit classifiers.
arXiv Detail & Related papers (2025-05-24T02:51:34Z) - Circuit Partitioning Using Large Language Models for Quantum Compilation and Simulations [6.180118431476265]
Quantum computers are limited by noisy gates, some of which are more error-prone than others and can render the final incomprehensible.<n>Quantum circuit compilation algorithms attempt to minimize these noisy gates when mapping quantum algorithms onto quantum hardware.<n>Large language models (LLMs) have the potential to change this and help improve quantum circuit partitions.
arXiv Detail & Related papers (2025-05-12T16:18:48Z) - Q-Fusion: Diffusing Quantum Circuits [2.348041867134616]
We propose a diffusion-based algorithm leveraging the LayerDAG framework to generate new quantum circuits.<n>Our results demonstrate that the proposed model consistently generates 100% valid quantum circuit outputs.
arXiv Detail & Related papers (2025-04-29T14:10:10Z) - Agent-Q: Fine-Tuning Large Language Models for Quantum Circuit Generation and Optimization [5.2374261493530065]
Large language models (LLMs) have achieved remarkable outcomes in complex problems, including math, coding, and analyzing scientific reports.<n>We describe Agent-Q, an LLM fine-tuning system to generate and optimize quantum circuits.
arXiv Detail & Related papers (2025-04-15T11:56:54Z) - QCircuitBench: A Large-Scale Dataset for Benchmarking Quantum Algorithm Design [63.02824918725805]
Quantum computing is recognized for the significant speedup it offers over classical computing through quantum algorithms.<n>QCircuitBench is the first benchmark dataset designed to evaluate AI's capability in designing and implementing quantum algorithms.
arXiv Detail & Related papers (2024-10-10T14:24:30Z) - QuantumSEA: In-Time Sparse Exploration for Noise Adaptive Quantum
Circuits [82.50620782471485]
QuantumSEA is an in-time sparse exploration for noise-adaptive quantum circuits.
It aims to achieve two key objectives: (1) implicit circuits capacity during training and (2) noise robustness.
Our method establishes state-of-the-art results with only half the number of quantum gates and 2x time saving of circuit executions.
arXiv Detail & Related papers (2024-01-10T22:33:00Z) - Synergy Between Quantum Circuits and Tensor Networks: Short-cutting the
Race to Practical Quantum Advantage [43.3054117987806]
We introduce a scalable procedure for harnessing classical computing resources to provide pre-optimized initializations for quantum circuits.
We show this method significantly improves the trainability and performance of PQCs on a variety of problems.
By demonstrating a means of boosting limited quantum resources using classical computers, our approach illustrates the promise of this synergy between quantum and quantum-inspired models in quantum computing.
arXiv Detail & Related papers (2022-08-29T15:24:03Z) - Variational Quantum Reinforcement Learning via Evolutionary Optimization [0.0]
We present two frameworks of deep quantum RL tasks using a gradient-free evolution optimization.
We propose a hybrid framework where the quantum RL agents are equipped with hybrid tensor network-variational quantum circuit (TN-VQC) architecture.
This allows us to perform quantum RL on the MiniGrid environment with 147-dimensional inputs.
arXiv Detail & Related papers (2021-09-01T16:36:04Z) - Quantum Architecture Search via Deep Reinforcement Learning [0.0]
It is non-trivial to design a quantum gate sequence for generating a particular quantum state with as fewer gates as possible.
We propose a quantum architecture search framework with the power of deep reinforcement learning (DRL) to address this challenge.
We demonstrate a successful generation of quantum gate sequences for multi-qubit GHZ states without encoding any knowledge of quantum physics in the agent.
arXiv Detail & Related papers (2021-04-15T18:53:26Z) - Quantum circuit architecture search for variational quantum algorithms [88.71725630554758]
We propose a resource and runtime efficient scheme termed quantum architecture search (QAS)
QAS automatically seeks a near-optimal ansatz to balance benefits and side-effects brought by adding more noisy quantum gates.
We implement QAS on both the numerical simulator and real quantum hardware, via the IBM cloud, to accomplish data classification and quantum chemistry tasks.
arXiv Detail & Related papers (2020-10-20T12:06:27Z) - QUANTIFY: A framework for resource analysis and design verification of
quantum circuits [69.43216268165402]
QUANTIFY is an open-source framework for the quantitative analysis of quantum circuits.
It is based on Google Cirq and is developed with Clifford+T circuits in mind.
For benchmarking purposes QUANTIFY includes quantum memory and quantum arithmetic circuits.
arXiv Detail & Related papers (2020-07-21T15:36:25Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.