QHackBench: Benchmarking Large Language Models for Quantum Code Generation Using PennyLane Hackathon Challenges

Abdul Basit, Minghao Shao, Muhammad Haider Asif, Nouhaila Innan, Muhammad Kashif +2 more
6/24/2025
cs.AIcs.PLcs.SE

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Recent advances in Large Language Models (LLMs) have demonstrated strong potential in code generation, yet their effectiveness in quantum computing remains underexplored. This paper benchmarks LLMs for PennyLane-based quantum code generation using real-world challenges from the Quantum Hackathon (QHack). We introduce QHackBench, a novel benchmark dataset derived from QHack competitions, and evaluate model performance under vanilla prompting and Retrieval-Augmented Generation (RAG). Our structured evaluation framework assesses functional correctness, syntactic validity, and execution success across varying challenge difficulties. Results indicate that RAG-enhanced models, supplemented with an augmented PennyLane dataset, approximately generate similar results as the standard prompting, particularly in complex quantum algorithms. Additionally, we introduce a multi-agent evaluation pipeline that iteratively refines incorrect solutions, further enhancing execution success rates. To foster further research, we commit to publicly releasing QHackBench, along with our evaluation framework and experimental results, enabling continued advancements in AI-assisted quantum programming.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{basit2025qhackbench,
  title  = {QHackBench: Benchmarking Large Language Models for Quantum Code Generation Using PennyLane Hackathon Challenges},
  author = {Abdul Basit and Minghao Shao and Muhammad Haider Asif and Nouhaila Innan and Muhammad Kashif and Alberto Marchisio and Muhammad Shafique},
  year   = {2025},
  eprint = {2506.20008},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.20008v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.20008.svg)](https://codeofpaper.com/paper/2506.20008)

Discussion