QuanBench+: A Unified Multi-Framework Benchmark for LLM-Based Quantum Code Generation
Abstract
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.
Cite
@article{arxiv.2604.08570,
title = {QuanBench+: A Unified Multi-Framework Benchmark for LLM-Based Quantum Code Generation},
author = {Ali Slim and Haydar Hamieh and Jawad Kotaich and Yehya Ghosn and Mahdi Chehimi and Ammar Mohanna and Hasan Abed Al Kader Hammoud and Bernard Ghanem},
journal= {arXiv preprint arXiv:2604.08570},
year = {2026}
}
Comments
24 pages total, 25 figures, 5 tables, including supplementary material. Accepted to the ICLR 2026 Workshop on I Can't Believe It's Not Better