Large Language Models (LLMs) are increasingly used for code generation, yet quantum code generation is still evaluated mostly within single frameworks, making it difficult to separate quantum reasoning from framework familiarity. We introduce QuanBench+, a unified benchmark spanning Qiskit, PennyLane, and Cirq, with 42 aligned tasks covering quantum algorithms, gate decomposition, and state preparation. We evaluate models with executable functional tests, report Pass@1 and Pass@5, and use KL-divergence-based acceptance for probabilistic outputs. We additionally study Pass@1 after feedback-based repair, where a model may revise code after a runtime error or wrong answer. Across frameworks, the strongest one-shot scores reach 59.5% in Qiskit, 54.8% in Cirq, and 42.9% in PennyLane; with feedback-based repair, the best scores rise to 83.3%, 76.2%, and 66.7%, respectively. These results show clear progress, but also that reliable multi-framework quantum code generation remains unsolved and still depends strongly on framework-specific knowledge.


翻译:大型语言模型(LLM)日益广泛用于代码生成,然而量子代码生成目前仍主要在单一框架内评估,这难以区分量子推理能力与框架熟悉程度。我们提出QuanBench+,这是一个涵盖Qiskit、PennyLane和Cirq的统-基准测试,包含42个对齐任务,覆盖量子算法、量子门分解和量子态制备。我们通过可执行功能测试评估模型,报告Pass@1和Pass@5指标,并采用基于KL散度的接受机制处理概率性输出。我们进一步研究了基于反馈修复后的Pass@1性能,即模型在遭遇运行时错误或错误答案时可修改代码。跨框架比较显示,最强单次得分在Qiskit中达59.5%,Cirq中54.8%,PennyLane中42.9%;引入基于反馈的修复后,最优得分分别提升至83.3%、76.2%和66.7%。这些结果展现出明显进展,但也表明可靠的多框架量子代码生成问题仍未解决,且仍高度依赖于框架特定知识。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
如何检测LLM内容?UCSB等最新首篇《LLM生成内容检测》综述
NLP-Progress记录NLP最新数据集、论文和代码: 助你紧跟NLP前沿
中国人工智能学会
12+阅读 · 2018年11月15日
NLG ≠ 机器写作 | 专家专栏
量子位
13+阅读 · 2018年9月10日
GitHub获赞过千:PyTorch 自然语言处理项目Top 5
新智元
12+阅读 · 2018年7月10日
超全总结:神经网络加速之量化模型 | 附带代码
推荐|caffe-orc主流ocr算法:CNN+BLSTM+CTC架构实现!
全球人工智能
19+阅读 · 2017年10月29日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
综述 | 世界动作模型:少做梦,多行动
专知会员服务
0+阅读 · 8分钟前
美以伊冲突:无人机与人工智能的运用
专知会员服务
1+阅读 · 20分钟前
《特种部队在透明战场中的生存力》最新报告
专知会员服务
1+阅读 · 40分钟前
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
相关VIP内容
如何检测LLM内容?UCSB等最新首篇《LLM生成内容检测》综述
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员