ACL2026

Explainable Quantum Program Repair with Verifiable Proof Traces

Tingting Li, Ziming Zhao, Zhaoxuan Li, Jiongchi Yu, Xiaofei Yue, Jianwei Yin

摘要

Large language models have recently advanced automated program repair, yet most existing approaches provide only post-hoc naturallanguage explanations that are neither executable nor verifiable. This limitation is especially critical for quantum programs, where correctness hinges on subtle semantic properties such as circuit equivalence and fidelity preservation. We propose Explainable Quantum Program Repair, a framework that couples repair generation with machine-checkable executable explanations. Given a buggy quantum circuit, a language model proposes candidate repairs together with structured transformation rationales, which are compiled into proof traces and validated using formal verification backends, including circuit equivalence checking, ZX-calculus reasoning, stabilizer analysis, and quantum simulation. Only repairs whose explanations are fully verified are accepted. Experiments on QASMBench with mutationgenerated quantum program bugs demonstrate that our approach achieves competitive repair success while substantially improving semantic precision and explanation faithfulness over baselines that rely on unconstrained or purely natural-language explanations.