Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Paper page - QUASAR: Quantum Assembly Code Generation Using Tool-Augmented LLMs via Agentic RL
[go: Go Back, main page]

arXiv:2510.00967
👉 Model: Benyucong/rl_quantum_4b
👉 Code: github.com/benyucong/QUASAR

\n
\n

🧠 Technical & Insightful

\n

We introduce QUASAR, an agentic RL framework that equips LLMs with quantum-aware reasoning via external simulators and hierarchical rewards.
Unlike prior SFT-only or RL-only methods, QUASAR combines supervised fine-tuning with reinforcement learning guided by:

\n
    \n
  • Syntax reward (valid OpenQASM 3.0 circuits)
  • \n
  • Distributional alignment (Jensen–Shannon distance)
  • \n
  • Expectation-value reward (Hamiltonian alignment)
  • \n
  • Optimization-progress reward (fewer optimization steps to convergence)
  • \n
\n

📊 Results:

\n
    \n
  • 99.31% Pass@1 validity, 100% Pass@10
  • \n
  • +12.95% higher Successful Rate of Expectation Value vs. RL-only GRPO
  • \n
  • 1.65× better High Quality Circuit Ratio than GPT-4o, 1.50× over GPT-5
  • \n
\n

QUASAR shows LLMs can internalize useful ansatz patterns & parameter initializations for QAOA/VQE—bridging the gap between general LLMs and domain-specific quantum code generation.

\n","updatedAt":"2025-10-02T14:18:54.360Z","author":{"_id":"64d476faf41bdb1e2f88416e","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/64d476faf41bdb1e2f88416e/60Ax_bkHK8aF7bhS3kfDY.jpeg","fullname":"Cong Yu","name":"Benyucong","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":7,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.6887702345848083},"editors":["Benyucong"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/64d476faf41bdb1e2f88416e/60Ax_bkHK8aF7bhS3kfDY.jpeg"],"reactions":[],"isReport":false}},{"id":"68df284cfa2f2d62f27d6e76","author":{"_id":"63d3e0e8ff1384ce6c5dd17d","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1674830754237-63d3e0e8ff1384ce6c5dd17d.jpeg","fullname":"Librarian Bot (Bot)","name":"librarian-bot","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":318,"isUserFollowing":false},"createdAt":"2025-10-03T01:35:08.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"This is an automated message from the [Librarian Bot](https://huggingface.co/librarian-bots). I found the following papers similar to this paper. \n\nThe following papers were recommended by the Semantic Scholar API \n\n* [Quantum Verifiable Rewards for Post-Training Qiskit Code Assistant](https://huggingface.co/papers/2508.20907) (2025)\n* [LLM-Guided Ans\\\"atze Design for Quantum Circuit Born Machines in Financial Generative Modeling](https://huggingface.co/papers/2509.08385) (2025)\n* [Vectorized Attention with Learnable Encoding for Quantum Transformer](https://huggingface.co/papers/2508.18464) (2025)\n* [Bridging Classical and Quantum Computing for Next-Generation Language Models](https://huggingface.co/papers/2508.07026) (2025)\n* [Quantum Architecture Search for Solving Quantum Machine Learning Tasks](https://huggingface.co/papers/2509.11198) (2025)\n* [QMill: Representative Quantum Data Generation for Quantum Machine Learning Utility](https://huggingface.co/papers/2509.21622) (2025)\n* [Quantum Machine Learning for Optimizing Entanglement Distribution in Quantum Sensor Circuits](https://huggingface.co/papers/2508.21252) (2025)\n\n\n Please give a thumbs up to this comment if you found it helpful!\n\n If you want recommendations for any Paper on Hugging Face checkout [this](https://huggingface.co/spaces/librarian-bots/recommend_similar_papers) Space\n\n You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: `@librarian-bot recommend`","html":"

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

\n

The following papers were recommended by the Semantic Scholar API

\n\n

Please give a thumbs up to this comment if you found it helpful!

\n

If you want recommendations for any Paper on Hugging Face checkout this Space

\n

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: \n\n@librarian-bot\n\t recommend

\n","updatedAt":"2025-10-03T01:35:08.138Z","author":{"_id":"63d3e0e8ff1384ce6c5dd17d","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1674830754237-63d3e0e8ff1384ce6c5dd17d.jpeg","fullname":"Librarian Bot (Bot)","name":"librarian-bot","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":318,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.6975790858268738},"editors":["librarian-bot"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/1674830754237-63d3e0e8ff1384ce6c5dd17d.jpeg"],"reactions":[{"reaction":"👍","users":["Benyucong","clementinegjx","zczlsde"],"count":3}],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2510.00967","authors":[{"_id":"68de29c1a9129e507bf4a427","user":{"_id":"64d476faf41bdb1e2f88416e","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/64d476faf41bdb1e2f88416e/60Ax_bkHK8aF7bhS3kfDY.jpeg","isPro":false,"fullname":"Cong Yu","user":"Benyucong","type":"user"},"name":"Cong Yu","status":"claimed_verified","statusLastChangedAt":"2025-10-02T13:54:35.852Z","hidden":false},{"_id":"68de29c1a9129e507bf4a428","name":"Valter Uotila","hidden":false},{"_id":"68de29c1a9129e507bf4a429","user":{"_id":"63dd3f4ea8877129a15a66d1","avatarUrl":"/avatars/5410233517f4bcfae827094dc1fb7bcf.svg","isPro":false,"fullname":"SHILONG DENG","user":"zczlsde","type":"user"},"name":"Shilong Deng","status":"claimed_verified","statusLastChangedAt":"2025-10-02T13:54:30.080Z","hidden":false},{"_id":"68de29c1a9129e507bf4a42a","user":{"_id":"65d61e7888196f05410f3aa3","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/65d61e7888196f05410f3aa3/E7COFUfyzVo37aOJ_18pR.jpeg","isPro":false,"fullname":"qy","user":"qingyuanwu","type":"user"},"name":"Qingyuan Wu","status":"claimed_verified","statusLastChangedAt":"2025-10-03T12:54:19.541Z","hidden":false},{"_id":"68de29c1a9129e507bf4a42b","name":"Tuo Shi","hidden":false},{"_id":"68de29c1a9129e507bf4a42c","user":{"_id":"661d8018ba7a3d451862aff2","avatarUrl":"/avatars/572c757e18dc11437ca1ffd0d1a9e9d1.svg","isPro":false,"fullname":"Songlin Jiang","user":"HollowMan6","type":"user"},"name":"Songlin Jiang","status":"claimed_verified","statusLastChangedAt":"2025-10-02T13:54:32.885Z","hidden":false},{"_id":"68de29c1a9129e507bf4a42d","name":"Lei You","hidden":false},{"_id":"68de29c1a9129e507bf4a42e","name":"Bo Zhao","hidden":false}],"publishedAt":"2025-10-01T14:40:04.000Z","submittedOnDailyAt":"2025-10-02T12:48:54.353Z","title":"QUASAR: Quantum Assembly Code Generation Using Tool-Augmented LLMs via\n Agentic RL","submittedOnDailyBy":{"_id":"64d476faf41bdb1e2f88416e","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/64d476faf41bdb1e2f88416e/60Ax_bkHK8aF7bhS3kfDY.jpeg","isPro":false,"fullname":"Cong Yu","user":"Benyucong","type":"user"},"summary":"Designing and optimizing task-specific quantum circuits are crucial to\nleverage the advantage of quantum computing. Recent large language model\n(LLM)-based quantum circuit generation has emerged as a promising automatic\nsolution. However, the fundamental challenges remain unaddressed: (i)\nparameterized quantum gates require precise numerical values for optimal\nperformance, which also depend on multiple aspects, including the number of\nquantum gates, their parameters, and the layout/depth of the circuits. (ii)\nLLMs often generate low-quality or incorrect quantum circuits due to the lack\nof quantum domain-specific knowledge. We propose QUASAR, an agentic\nreinforcement learning (RL) framework for quantum circuits generation and\noptimization based on tool-augmented LLMs. To align the LLM with\nquantum-specific knowledge and improve the generated quantum circuits, QUASAR\ndesigns (i) a quantum circuit verification approach with external quantum\nsimulators and (ii) a sophisticated hierarchical reward mechanism in RL\ntraining. Extensive evaluation shows improvements in both syntax and semantic\nperformance of the generated quantum circuits. When augmenting a 4B LLM, QUASAR\nhas achieved the validity of 99.31% in Pass@1 and 100% in Pass@10,\noutperforming industrial LLMs of GPT-4o, GPT-5 and DeepSeek-V3 and several\nsupervised-fine-tuning (SFT)-only and RL-only baselines.","upvotes":12,"discussionId":"68de29c2a9129e507bf4a42f","githubRepo":"https://github.com/benyucong/QUASAR","githubRepoAddedBy":"user","ai_summary":"QUASAR, an RL framework using tool-augmented LLMs, improves quantum circuit generation and optimization through verification and hierarchical rewards, achieving high validity compared to industrial LLMs.","ai_keywords":["quantum circuits","parameterized quantum gates","large language model","reinforcement learning","quantum circuit verification","hierarchical reward mechanism","Pass@1","Pass@10","GPT-4o","GPT-5","DeepSeek-V3","supervised-fine-tuning","RL-only"],"githubStars":2},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"661d8018ba7a3d451862aff2","avatarUrl":"/avatars/572c757e18dc11437ca1ffd0d1a9e9d1.svg","isPro":false,"fullname":"Songlin Jiang","user":"HollowMan6","type":"user"},{"_id":"64d476faf41bdb1e2f88416e","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/64d476faf41bdb1e2f88416e/60Ax_bkHK8aF7bhS3kfDY.jpeg","isPro":false,"fullname":"Cong Yu","user":"Benyucong","type":"user"},{"_id":"645e8ca7f0f92653b9f21789","avatarUrl":"/avatars/47df6d37e415d6885b90e33c06af20de.svg","isPro":false,"fullname":"Zheyue","user":"tanzeyy","type":"user"},{"_id":"639bc04859473c6ae02b3f7e","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1671151648179-noauth.jpeg","isPro":false,"fullname":"Mustapha Abdullahi","user":"mustious7","type":"user"},{"_id":"65d61e7888196f05410f3aa3","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/65d61e7888196f05410f3aa3/E7COFUfyzVo37aOJ_18pR.jpeg","isPro":false,"fullname":"qy","user":"qingyuanwu","type":"user"},{"_id":"63dd3f4ea8877129a15a66d1","avatarUrl":"/avatars/5410233517f4bcfae827094dc1fb7bcf.svg","isPro":false,"fullname":"SHILONG DENG","user":"zczlsde","type":"user"},{"_id":"63efb8605c2ceb16fc6d3e95","avatarUrl":"/avatars/f38d399e1d4fc1157286ccd1cc7d91e1.svg","isPro":false,"fullname":"Robert Wang","user":"Diminished","type":"user"},{"_id":"647daae20ed7d0c87608fb20","avatarUrl":"/avatars/cd5f9f03538803265efbda181d9b80df.svg","isPro":false,"fullname":"Valter Uotila","user":"valterUo","type":"user"},{"_id":"66f26d7cd18cbcbc0e0d0bfb","avatarUrl":"/avatars/4384d00648fbf868bd38c1110291b9fe.svg","isPro":false,"fullname":"Tuo Shi","user":"shituo","type":"user"},{"_id":"62bbee7ac5b1c4341ea1589f","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/62bbee7ac5b1c4341ea1589f/9DtPgyGizUatspyg3o6GZ.jpeg","isPro":false,"fullname":"Edwin Samar","user":"edwinsamar","type":"user"},{"_id":"65bb837dbfb878f46c77de4c","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/65bb837dbfb878f46c77de4c/23gZ_lBEwyoqjexFy9QLD.jpeg","isPro":true,"fullname":"Prithiv Sakthi","user":"prithivMLmods","type":"user"},{"_id":"686db5d4af2b856fabbf13aa","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/6BjMv2LVNoqvbX8fQSTPI.png","isPro":false,"fullname":"V bbbb","user":"Bbbbbnnn","type":"user"}],"acceptLanguages":["*"],"dailyPaperRank":0}">
Papers
arxiv:2510.00967

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

Published on Oct 1, 2025
· Submitted by
Cong Yu
on Oct 2, 2025
Authors:
,
,
,

Abstract

QUASAR, an RL framework using tool-augmented LLMs, improves quantum circuit generation and optimization through verification and hierarchical rewards, achieving high validity compared to industrial LLMs.

AI-generated summary

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.

Community

Paper author Paper submitter

🔥 Concise & Promotional

🚀 QUASAR sets a new SOTA in quantum circuit generation with tool-augmented RL:
✅ 99.31% Pass@1 syntactic correctness (↑ over GPT-5, GPT-4o, DeepSeek-V3)
✅ 100% Pass@10 with stronger semantic alignment
✅ Hierarchical 4-level reward for syntax, distribution, expectation value & optimization

👉 Paper: arXiv:2510.00967
👉 Model: Benyucong/rl_quantum_4b
👉 Code: github.com/benyucong/QUASAR


🧠 Technical & Insightful

We introduce QUASAR, an agentic RL framework that equips LLMs with quantum-aware reasoning via external simulators and hierarchical rewards.
Unlike prior SFT-only or RL-only methods, QUASAR combines supervised fine-tuning with reinforcement learning guided by:

  • Syntax reward (valid OpenQASM 3.0 circuits)
  • Distributional alignment (Jensen–Shannon distance)
  • Expectation-value reward (Hamiltonian alignment)
  • Optimization-progress reward (fewer optimization steps to convergence)

📊 Results:

  • 99.31% Pass@1 validity, 100% Pass@10
  • +12.95% higher Successful Rate of Expectation Value vs. RL-only GRPO
  • 1.65× better High Quality Circuit Ratio than GPT-4o, 1.50× over GPT-5

QUASAR shows LLMs can internalize useful ansatz patterns & parameter initializations for QAOA/VQE—bridging the gap between general LLMs and domain-specific quantum code generation.

This is an automated message from the Librarian Bot. I found the following papers similar to this paper.

The following papers were recommended by the Semantic Scholar API

Please give a thumbs up to this comment if you found it helpful!

If you want recommendations for any Paper on Hugging Face checkout this Space

You can directly ask Librarian Bot for paper recommendations by tagging it in a comment: @librarian-bot recommend

Sign up or log in to comment

Models citing this paper 1

Datasets citing this paper 1

Spaces citing this paper 0

No Space linking this paper

Cite arxiv.org/abs/2510.00967 in a Space README.md to link it from this page.

Collections including this paper 0

No Collection including this paper

Add this paper to a collection to link it from this page.