acceptodds
Under review as a conference paper at ICLR 2027

QuRepair: Diagnosis-Guided LLM Repair for Multi-Framework Quantum Software

Abstract

Large language models (LLMs) have shown strong performance in classical program repair, but quantum programs introduce challenges arising from quantum-specific operations, semantics, and programming frameworks. We introduce QuRepair, a structured quantum-aware repair framework in which static linter diagnostics, API evidence, and quantum-semantic rules inform a structured typed diagnosis produced by a decision model (Jev). A separate repair LLM uses this diagnosis and a textual circuit rendering to iteratively repair the program. For controlled evaluation, we also introduce a multi-framework fault-injection methodology spanning Qiskit, Cirq, PennyLane, and OpenQASM. Faults are defined by their intended effect and aligned across frameworks through canonical-source mutation and validated translation, with API faults realized through framework-specific mutations. Real-world Bugs4Q-Robust faults provide external validation. Evaluating five general-purpose and quantum-specific baselines, we find that existing methods vary substantially across frameworks and struggle on several challenging quantum-semantic faults, including relative-phase and operation-order errors. With GPT-4o, QuRepair achieves 62.83% overall repair success, 15.83 percentage points above the strongest baseline at 47.0%, with the highest success on three frameworks and a tie with the strongest baseline on OpenQASM. It also leads on real-world Bugs4Q-Robust faults (72.4% vs. 62.1% for the next-best method), and its advantage over direct repair persists across four underlying LLMs. These results show that structured quantum-specific evidence improves LLM-based quantum program repair across frameworks.

open until 14 Dec 2026

est. 32% chance this paper gets accepted at ICLR 2027.

Reject 68%Accept 32%

What do you think this paper will get?

All positions stay anonymous.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.