[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-81541-en":3,"doc-seo-81541-105":30,"detail-sidebar-cat-0-en-105":92},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":11,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},81541,687197100911,"Himbo","https://ap-avatar.wpscdn.com/avatar/a000239b6f1da00475?x-image-process=image/resize,m_fixed,w_180,h_180&k=1785132997149421697",6,"Technology","QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM Programming","Programming quantum circuits at the OpenQASM level is essential for hardware-aware optimization and reliable execution on NISQ devices, yet it is difficult due to domain-specific planning, iterative code synthesis, and low-level calibration. This paper introduces QAgent, an autonomous multi-agent framework for end-to-end OpenQASM code generation. QAgent unifies planning, synthesis, and calibration using schema-aware task planning, RAG-based kernel knowledge, coordinated reasoning, and iterative execution feedback, and substantially improves accuracy under realistic hardware drift.","QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM Programming  \nZhenxiao Fu∗ , Lei Jiang∗ , Yilun Xu†, Gang Huang†, Fan Chen∗  \n∗ Indiana University Bloomington †Lawrence Berkeley National Laboratory  \n∗ {zhfu, jiang60, [fc7](fc7}@iu.edu)[}](fc7}@iu.edu)[@iu.edu](fc7}@iu.edu) †{yilunxu, [ghuang](ghuang}@lbl.gov)[}](ghuang}@lbl.gov)[@lbl.gov](ghuang}@lbl.gov)  \narXiv :2508 .20 134v2 [ cs .AI] 9 Jul 2026  \nAbstract—Programming quantum circuits at the OpenQASM level is essential for achieving hardware-aware optimization and reliable execution on noisy intermediate-scale quantum (NISQ) devices, yet it remains challenging due to the need for domainspecific planning, iterative code synthesis, and low-level calibration. In this paper, we present QAgent, the first autonomous multi-agent framework for end-to-end OpenQASM code generation. QAgent integrates schema-aware task planning, exampleand tool-driven code synthesis, and hardware-aware calibration within a unified planning–synthesis–calibration workflow. The system leverages retrieval-augmented generation (RAG) to access structured kernel knowledge, examples, and backend constraints, and employs coordinated multi-agent reasoning with iterative execution feedback to ensure correctness. We evaluate QAgent on 12 representative quantum kernels and their compositions across five large language models (LLMs). Results show that QAgent improves Pass@1 accuracy by 47–70% on single-kernel tasks and achieves over 88% accuracy on multi-kernel workflows for large models, substantially outperforming existing baselines. Furthermore, under realistic hardware frequency drift, QAgent maintains near-unit execution fidelity through automated calibration, whereas SDK-based LLM methods suffer significant degradation. These results demonstrate that integrating planning, synthesis, and calibration is critical for reliable quantum program generation. The implementation of QAgent is open-sourced at [https://github.com/fuzhenxiao/QAgent](https://github.com/fuzhenxiao/QAgent).  \nIndex Terms—OpenQASM Programming, LLM Agents, RAG  \nI. INTRODUCTION  \nNoisy Intermediate-Scale Quantum (NISQ) devices have demonstrated quantum advantage in classically intractable domains, including physical simulation, chemistry, and combinatorial optimization. These capabilities are enabled in large part by the Open Quantum Assembly Language (OpenQASM) [1], which provides a standardized interface between quantum software development kits (SDKs), such as Qiskit [2] and PennyLane [3], and heterogeneous quantum hardware platforms [4],[5] . While modern SDKs offer high-level abstractions for quantum circuit design and can export subsets of OpenQASM, the generated circuits often omit hardware-specific decompositions, pulse-level optimizations, and calibration data due to limited access to low-level device control. As a result, direct OpenQASM programming remains critical for finegrained compiler optimization [6], experimental calibration and tuning [7], and hardware-aware pulse-level execution [8] . OpenQASM programming remains challenging, particularly for non-experts, due to its reliance on low-level hardware details such as qubit frequencies, temporal drift, control-port  \nmappings, and pulse scheduling [9], [10] . To address these complexities, OpenQASM development typically follows a structured, multi-stage workflow [1] . In the planning stage, high-level algorithmic objectives are decomposed into smaller computational tasks. Suitable circuit kernels [11] are then selected and mapped onto available hardware resources, taking into account device constraints and kernel-specific requirements. The subsequent code synthesis stage generates the corresponding OpenQASM implementation by defining quantum and classical registers, composing kernel operations, and assembling the full circuit. While canonical algorithms such as Deutsch–Jozsa can be synthesized using well-established templates, more complex or parameterized kernels","cbCaiokseKRTndtz","https://ap.wps.com/l/cbCaiokseKRTndtz","pdf",635332,1,10,"English","en",105,"# Introduction\n## Background on OpenQASM and NISQ\n## Challenges of LLMs for Quantum OpenQASM Workflows","[{\"question\":\"What problem does QAgent address?\",\"answer\":\"QAgent targets the difficulty of generating executable, hardware-aware OpenQASM code, which requires integrated planning, code synthesis, and calibration for NISQ devices.\"},{\"question\":\"How does QAgent perform end-to-end OpenQASM code generation?\",\"answer\":\"QAgent combines schema-aware task planning, retrieval-augmented generation to access kernel knowledge and backend constraints, coordinated multi-agent reasoning, and iterative feedback to refine correctness.\"},{\"question\":\"How does QAgent perform compared with existing baselines under hardware drift?\",\"answer\":\"The results report that QAgent achieves large Pass@1 accuracy improvements and maintains near-unit execution fidelity through automated calibration, while SDK-based LLM approaches degrade significantly.\"}]","QAgent: An LLM-based Multi-Agent System for Autonomous OpenQASM Programming | PDF",1784174157,25,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":87,"head_meta":89,"extra_data":91,"updated_unix":28},"qagent-an-llm-based-multi-agent-system-for-autonomous-openqasm-programming","",{"@graph":36,"@context":86},[37,54,69],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/technology/",3,{"item":52,"name":13,"@type":43,"position":53},"https://docshare.wps.com/document/qagent-an-llm-based-multi-agent-system-for-autonomous-openqasm-programming/81541/",4,{"url":52,"name":13,"@type":55,"author":56,"headline":13,"publisher":58,"fileFormat":61,"inLanguage":23,"description":14,"dateModified":62,"datePublished":63,"encodingFormat":61,"isAccessibleForFree":64,"interactionStatistic":65},"DigitalDocument",{"name":9,"@type":57},"Person",{"url":41,"name":59,"@type":60},"DocShare","Organization","application/pdf","2026-07-29","2026-07-16",true,{"@type":66,"interactionType":67,"userInteractionCount":11},"InteractionCounter",{"@type":68},"ViewAction",{"@type":70,"mainEntity":71},"FAQPage",[72,78,82],{"name":73,"@type":74,"acceptedAnswer":75},"What problem does QAgent address?","Question",{"text":76,"@type":77},"QAgent targets the difficulty of generating executable, hardware-aware OpenQASM code, which requires integrated planning, code synthesis, and calibration for NISQ devices.","Answer",{"name":79,"@type":74,"acceptedAnswer":80},"How does QAgent perform end-to-end OpenQASM code generation?",{"text":81,"@type":77},"QAgent combines schema-aware task planning, retrieval-augmented generation to access kernel knowledge and backend constraints, coordinated multi-agent reasoning, and iterative feedback to refine correctness.",{"name":83,"@type":74,"acceptedAnswer":84},"How does QAgent perform compared with existing baselines under hardware drift?",{"text":85,"@type":77},"The results report that QAgent achieves large Pass@1 accuracy improvements and maintains near-unit execution fidelity through automated calibration, while SDK-based LLM approaches degrade significantly.","https://schema.org",{"og:url":52,"og:type":88,"og:title":13,"og:site_name":59,"og:description":14},"article",{"robots":90,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":93},[94,98,102,106,111,114,119,124,129,132,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":95,"show_sort_weight":96,"slug":97},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":99,"show_sort_weight":100,"slug":101},"Literature",80,"literature",{"id":53,"doc_module":4,"doc_module_name":46,"category_name":103,"show_sort_weight":104,"slug":105},"Exam",70,"exam",{"id":107,"doc_module":4,"doc_module_name":46,"category_name":108,"show_sort_weight":109,"slug":110},5,"Comic",60,"comic",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":112,"slug":113},50,"technology",{"id":115,"doc_module":4,"doc_module_name":46,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":120,"doc_module":4,"doc_module_name":46,"category_name":121,"show_sort_weight":122,"slug":123},8,"Research & Report",30,"research-report",{"id":125,"doc_module":4,"doc_module_name":46,"category_name":126,"show_sort_weight":127,"slug":128},9,"Religion & Spirituality",20,"religion-spirituality",{"id":127,"doc_module":4,"doc_module_name":46,"category_name":130,"show_sort_weight":127,"slug":131},"World Cup","world-cup",{"id":21,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":21,"slug":134},"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":107,"slug":138},19,"General","general"]