paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Shaking Up Quantum Simulators with Fuzzing and Rigour

用模糊测试与形式化严谨性革新量子模拟器
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 论文将 Alloy 形式化模型与约束引导模糊测试结合用于量子模拟器差分测试,属于形式化方法与测试的交叉,但用户研究方向集中在 PL 与 LLM/Agent 的交叉、浮点程序分析及贝叶斯程序分析;该论文不涉及 LLM/Agent,也不针对 ML 系统或浮点程序分析,因此匹配度低。引用 3 inbox
Vasileios Klimis, Avner Bensoussan, Elena Chachkarova, Karine Even-Mendoza, Sophie Fortz, Connor Lenihan
crossref: 2026-09-10

AI 速览

一句话:结合 Alloy 形式化的 QASM 3.0 模型与约束引导模糊测试,对量子模拟器做差分基准测试,发现 8 个缺陷(6 个未记录)。

量子计算平台依赖模拟器在硬件执行前建模电路行为,模拟器不一致会导致高代价错误。现有形式化验证多针对特定编译器组件以控制状态爆炸,常漏掉关键缺陷;而常规测试缺乏对边界情形与真实执行场景的系统探索,易产生误报与漏报。本文提出 FuzzQ:以 Alloy 形式化的 QASM 3.0 语义模型为核心,自动生成结构多样且满足约束与保证性质的量子电路,并结合差分基准测试、变异测试与不变式检查。框架引入多种测试预言,包括不变式检查、统计分布检验,以及新颖的跨模拟器酉一致性检查——在模全局相位意义下验证功能等价,可发现标准态矢量比较无法察觉的差异。作者在 Qiskit 与 Cirq 上评估,执行逾 80 万个电路,考察吞吐、代码与电路覆盖率以及灵敏度、正确性与内存开销,共发现 8 个模拟器缺陷,其中 6 个此前未记录,并给出扩展到含噪混合态模拟的路线。

问题
量子模拟器是硬件执行前的关键建模工具,其不一致会带来高代价错误;现有形式化验证因需控制状态爆炸而只覆盖特定编译器组件,常规测试又缺乏对边界情形与真实场景的系统探索,导致误报与漏报并存。
方法
FuzzQ 将形式化方法与结构化测试生成、模糊测试结合:基于 Alloy 的 QASM 3.0 形式化模型编码量子电路语义,生成受约束且保证性质的结构多样电路,并配合差分基准测试、变异测试、不变式检查,以及模全局相位的跨模拟器酉一致性检查等测试预言。
评估
在 Qiskit 与 Cirq 上执行超过 80 万个量子电路,测量吞吐量、代码与电路覆盖率、灵敏度、正确性和内存开销等性能指标,验证了平台无关性;结果发现 8 个模拟器缺陷,其中 6 个为先前未记录,并讨论了向含噪混合态模拟扩展的路径。
原文摘要(Abstract)

Quantum computing platforms rely on simulators for modelling circuit behaviour prior to hardware execution, where inconsistencies can lead to costly errors. While existing formal validation methods typically target specific compiler components to manage state explosion, they often miss critical bugs. Meanwhile, conventional testing lacks systematic exploration of corner cases and realistic execution scenarios, resulting in both false positives and negatives. We present FuzzQ, a novel framework that bridges this gap by combining formal methods with structured test generation and fuzzing for quantum simulators. Our approach employs differential benchmarking complemented by mutation testing and invariant checking. At its core, FuzzQ utilises our Alloy-based formal model of QASM 3.0, which encodes the semantics of quantum circuits to enable automated analysis and to generate structurally diverse, constraint-guided quantum circuits with guaranteed properties. We introduce several test oracles to assess both Alloy’s modelling of QASM 3.0 and simulator correctness, including invariant-based checks, statistical distribution tests, and a novel cross-simulator unitary consistency check that verifies functional equivalence modulo global phase, revealing discrepancies that standard statevector comparisons fail to detect in cross-platform differential testing. We evaluate FuzzQ on both Qiskit and Cirq, demonstrating its platform-agnostic effectiveness. By executing over 800,000 quantum circuits to completion, we assess throughput, code and circuit coverage, and simulator performance metrics, including sensitivity, correctness, and memory overhead. Our analysis revealed eight simulator bugs, six previously undocumented. We also outline a path for extending the framework to support mixed-state simulations under realistic noise models.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2911,
  title = {Shaking Up Quantum Simulators with Fuzzing and Rigour},
  author = {Vasileios Klimis and Avner Bensoussan and Elena Chachkarova and Karine Even-Mendoza and Sophie Fortz and Connor Lenihan},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763100}
}