arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.00967cs.AIquant-ph
收藏

QUASAR:基于智能体强化学习的工具增强大语言模型量子汇编代码生成方法

QUASAR: Quantum Assembly Code Generation Using Tool-Augmented LLMs via Agentic RL

Aalto University(阿alto大学);University of Helsinki(赫尔辛基大学);University of Liverpool(利物浦大学);University of Southampton(南安普顿大学);Technical University of Denmark(丹麦技术大学)

Cong Yu, Valter Uotila, Shilong Deng, Qingyuan Wu, Tuo Shi, Songlin Jiang, Lei You, Bo Zhao

AI总结:

针对大语言模型生成量子电路存在的参数精度不足、质量偏低等问题,提出融合外部量子模拟器验证与分层奖励机制的工具增强智能体强化学习框架 QUASAR,显著提升量子电路生成的语法与语义性能,效果超越多款主流工业级大模型。

摘要:

设计并优化面向特定任务的量子电路是发挥量子计算优势的关键。近期,基于大语言模型(LLM)的量子电路生成已成为一种颇具前景的自动化解决方案,但根本挑战仍未得到解决:(i)参数化量子门需要精确的数值才能实现最优性能,而这些数值又取决于量子门数量、门参数以及电路布局/深度等多个方面;(ii)由于缺乏量子领域的专属知识,LLM 往往会生成质量低下或存在错误的量子电路。我们提出 QUASAR——一个基于工具增强 LLM 的智能体强化学习(RL)框架,用于量子电路的生成与优化。为了让 LLM 掌握量子专属知识并提升生成量子电路的质量,QUASAR 设计了两大机制:(i)借助外部量子模拟器的量子电路验证方法;(ii)RL 训练中精巧的分层奖励机制。大量评估结果表明,该方法在生成量子电路的语法和语义性能上均有提升。当对参数量为 4B 的 LLM 进行增强时,QUASAR 的 Pass@1 正确率达到 99.31%,Pass@10 正确率达到 100%,性能优于 GPT-4o、GPT-5、DeepSeek-V3 等工业级 LLM,以及若干仅采用监督微调(SFT)和仅采用 RL 的基线模型。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑