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

QCoder 基准:通过基于模拟器的反馈桥接语言生成与量子硬件

QCoder Benchmark: Bridging Language Generation and Quantum Hardware through Simulator-Based Feedback

National Institute of Advanced Industrial Science and Technology (AIST)(国家先进工业科学与技术研究院);Yokohama National University(Yokohama国立大学);CyberAgent, Inc.(CyberAgent公司);DENSO CORPORATION(DENSO公司);The University of Tokyo(东京大学);Keio University(庆应义塾大学);NTT DATA GROUP Corporation(NTT DATA集团公司);Miletos inc.(Miletos公司);University of Tsukuba(筑波大学)
Taku Mikuriya, Tatsuya Ishigaki, Masayuki Kawarada, Shunya Minami, Tadashi Kadowaki, Yohichi Suzuki, Soshun Naito, Shunya Takata, Takumi Kato, Tamotsu Basseda, … 展开作者

Taku Mikuriya, Tatsuya Ishigaki, Masayuki Kawarada, Shunya Minami, Tadashi Kadowaki, Yohichi Suzuki, Soshun Naito, Shunya Takata, Takumi Kato, Tamotsu Basseda, Reo Yamada, Hiroya Takamura

AI总结:

针对量子编程中 LLM 与硬件交互的空白,提出基于模拟器反馈的 QCoder Benchmark,通过领域指标与真实竞赛代码评估模型,实验表明推理模型 o3 准确率达 78%,远超 GPT-4o 与人类平均水平。

摘要:

大型语言模型(LLMs)已越来越多地被应用于自动编程代码生成。这项任务可被视为桥接自然语言、人类知识与编程逻辑的语言生成任务。然而,在需要与硬件设备交互的领域(例如量子编程,程序员编写在量子计算机上执行的 Python 代码),该任务仍未被充分探索。为填补这一空白,我们引入了 QCoder Benchmark,这是一个利用模拟硬件设备的反馈来评估 LLMs 量子编程能力的评估框架。该基准提供两个关键特性。首先,它支持在传统 Python 执行之外的量子模拟器环境中进行评估,允许反馈电路深度、执行时间和错误分类等特定领域指标,从而指导更好的代码生成。其次,它整合了从真实编程竞赛中收集的人工编写代码提交,能够对 LLM 输出与人工编写代码进行定量比较和定性分析。我们的实验表明,即使是像 GPT-4o 这样的先进模型也仅达到约 18.97% 的准确率,凸显了该基准的难度。相比之下,基于推理的模型(如 o3)达到了高达 78% 的准确率,超越了人工编写代码的平均成功率(39.98%)。我们发布了 QCoder Benchmark 数据集和公开评估 API 以支持进一步研究。(代码和数据集可在 https://qcoder-bench.github.io/ 获取)

英文摘要:

Large language models (LLMs) have increasingly been applied to automatic programming code generation. This task can be viewed as a language generation task that bridges natural language, human knowledge, and programming logic. However, it remains underexplored in domains that require interaction with hardware devices, such as quantum programming, where human coders write Python code that is executed on a quantum computer. To address this gap, we introduce QCoder Benchmark, an evaluation framework that assesses LLMs on quantum programming with feedback from simulated hardware devices. Our benchmark offers two key features. First, it supports evaluation using a quantum simulator environment beyond conventional Python execution, allowing feedback of domain-specific metrics such as circuit depth, execution time, and error classification, which can be used to guide better generation. Second, it incorporates human-written code submissions collected from real programming contests, enabling both quantitative comparisons and qualitative analyses of LLM outputs against human-written codes. Our experiments reveal that even advanced models like GPT-4o achieve only around 18.97% accuracy, highlighting the difficulty of the benchmark. In contrast, reasoning-based models such as o3 reach up to 78% accuracy, outperforming averaged success rates of human-written codes (39.98%). We release the QCoder Benchmark dataset and public evaluation API to support further research. (Codes and datasets are available at https://qcoder-bench.github.io/ )

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

↑