paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Exact Inference for Quantum Circuits: A Testing Oracle for Quantum Software Stacks

量子线路的精确推断:面向量子软件栈的测试预言
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 4/10 · 论文将精确推断和Coq形式化验证应用于量子软件栈的测试,属于程序分析与形式化方法在量子计算领域的应用,但用户核心关注的是PL与AI/LLM的交叉、浮点程序分析及贝叶斯程序分析,该论文不涉及这些方向,因此匹配度一般。引用 1 inbox
Kanguk Lee, Jaemin Hong, Sukyoung Ryu
crossref: 2026-09-12

AI 速览

一句话:提出 QASMInfer,为 OpenQASM 量子线路提供精确概率推断,作为量子软件栈的统一测试预言,发现 31 个缺陷。

量子软件栈(QSS)提供线路变换与模拟功能,但其正确性缺乏有效测试,核心障碍是缺少可判定语义保持性与模拟正确性的测试预言。已有工作采用差分测试与蜕变测试规避预言需求,但仅发现极少数非崩溃缺陷。本文提出 QASMInfer,一个针对量子线路的精确推断系统,计算线路可能输出结果的概率分布,并支持事实标准量子汇编语言 OpenQASM,从而成为多个 QSS 的统一测试预言。其设计实现三个目标:支持动态线路、保证效率与可靠性。效率方面引入两种优化与高效矩阵表示;可靠性方面证明物理一致性,确保推断结果遵循量子计算物理原理。为简化证明,作者引入 OpenQASM 核心语言 OpenQASMCore,通过脱糖将 OpenQASM 转换为该核心语言进行精确推断,全部实现与证明在 Coq 中机器化验证。在六个真实 QSS 上测试发现 31 个缺陷,其中 20 个为非崩溃缺陷。

问题
量子软件栈的线路变换与模拟缺乏测试预言,现有差分与蜕变测试难以有效发现非崩溃类缺陷。
方法
提出 QASMInfer,对 OpenQASM 线路做精确推断以计算输出概率分布,支持动态线路并通过两种优化与矩阵表示提升效率;引入 OpenQASMCore 核心语言并在 Coq 中机器化证明其物理一致性。
评估
将 QASMInfer 作为统一测试预言,在六个真实量子软件栈上进行测试,共发现 31 个缺陷,其中 20 个为非崩溃缺陷。
原文摘要(Abstract)

Quantum software stacks (QSSs), which provide quantum circuit transformers and simulators, enable circuit transformations and the execution of circuits on classical computers. Despite their importance, they have not been effectively tested yet, leaving the correctness in question. The main obstacle to testing is the absence of a testing oracle, which checks the semantics-preservation of circuit transformations and the correctness of simulation results. While previous studies have employed differential and metamorphic testing to circumvent the necessity for an oracle, they have detected very few non-crash bugs. In this work, we address this gap by introducing QASMInfer, an exact inference system for quantum circuits, which computes the probability distribution of possible circuit outcomes. By supporting circuits written in OpenQASM, the de facto standard quantum assembly language used by most QSSs, QASMInfer acts as a unified testing oracle for multiple QSSs. Our design of QASMInfer achieves three key goals: (1) support for dynamic circuits, an important class of quantum circuits, (2) efficiency, and (3) reliability. For efficiency, we introduce two optimizations and an efficient matrix representation. For reliability, we prove physical consistency, ensuring that QASMInfer’s inference results adhere to the physical principles of quantum computing. To simplify the proof, we introduce OpenQASMCore, a core language for OpenQASM, and perform exact inference for OpenQASM by desugaring it to OpenQASMCore. Our implementation and proof are fully mechanized in the Coq proof assistant. Testing six real-world QSSs using QASMInfer revealed 31 bugs, including 20 non-crash bugs, demonstrating QASMInfer’s effectiveness as a testing oracle.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9265,
  title = {Exact Inference for Quantum Circuits: A Testing Oracle for Quantum Software Stacks},
  author = {Kanguk Lee and Jaemin Hong and Sukyoung Ryu},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00203}
}