Lune

CAV2026Top-tier venue

Formal Verification of Quantum Ancilla Safety

Jiqi Li, Jingyi Mei, Wang Fang, Ji Guan

Abstract

Abstract Ensuring ancilla safety is a critical correctness requirement for quantum compilation, since ancilla qubits are routinely introduced to implement complex operations with fewer gates and reduced depth. However, formally verifying this property is computationally hard due to state-space explosion in the number of qubits, particularly for dirty ancillae, which carry unknown initial states and must be restored after use. We propose an end-to-end verification-and-repair framework that rigorously addresses both clean and dirty ancilla safety. Our core contribution is a two-step reduction strategy: we first prove that verifying an m -qubit dirty ancilla register decomposes into 2 m independent clean ancilla safety checks; subsequently, we reduce each clean ancilla safety instance to an algebraic commutativity check against Pauli- Z and Pauli- X operators. This approach yields an efficient and naturally parallel verifier and enables actionable diagnosis by classifying violations into logic errors and phase errors. Leveraging this diagnosis, we further design lightweight repair routines that append local single-qubit rotations to eliminate a broad class of local ancilla faults. We implement the full pipeline in a prototype tool using a dual-backend architecture combining decision diagrams and weighted model counting, and validate it on diverse circuits ranging from arithmetic benchmarks to Grover’s algorithm. Our experiments demonstrate scalability to thousands of qubits and show that the proposed repairs effectively improve ancilla safety while preserving circuit functionality.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Borrowing Dirty Qubits in Quantum Programs cites Unqomp: synthesizing uncomputation in Quantum circuits
  • Borrowing Dirty Qubits in Quantum Programs cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • Unqomp: synthesizing uncomputation in Quantum circuits cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
  • Parameterized Verification of Quantum Circuits cites Simulating Quantum Circuits by Model Counting
  • Quantum Uncomputation of Clean and Dirty Ancilla Qubits cites Borrowing Dirty Qubits in Quantum Programs
  • Quantum Uncomputation of Clean and Dirty Ancilla Qubits cites Unqomp: synthesizing uncomputation in Quantum circuits
  • Quantum Uncomputation of Clean and Dirty Ancilla Qubits cites Silq: a high-level quantum language with safe uncomputation and intuitive semantics
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Quantum Uncomputation of Clean and Dirty Ancilla QubitsChenke Liu, Li Zhou, Boning MengOOPSLA 2026

Builds on5

  1. Silq: a high-level quantum language with safe uncomputation and intuitive semanticsBenjamin Bichsel, Maximilian Baader, Timon Gehr, Martin T. VechevPLDI 2020 · 145 citations
  2. Unqomp: synthesizing uncomputation in Quantum circuitsAnouk Paradis, Benjamin Bichsel, Samuel Steffen, Martin T. VechevPLDI 2021 · 34 citations
  3. Simulating Quantum Circuits by Model CountingJingyi Mei, Marcello M. Bonsangue, Alfons LaarmanCAV 2024 · 15 citations
  4. Parameterized Verification of Quantum CircuitsParosh Aziz Abdulla, Yu-Fang Chen, Michal Hecko, Lukás Holík et al.POPL 2026 · 3 citations
  5. Borrowing Dirty Qubits in Quantum ProgramsBonan Su, Li Zhou, Yuan Feng, Mingsheng YingASPLOS 2026 · 1 citation

Related papers

  1. Explainable Quantum Program Repair with Verifiable Proof TracesTingting Li, Ziming Zhao, Zhaoxuan Li, Jiongchi Yu et al.ACL Findings 2026
  2. An Automata-Based Framework for Verification and Bug Hunting in Quantum CircuitsYu-Fang Chen, Kai-Min Chung, Ondrej Lengál, Jyun-Ao Lin et al.PLDI 2023 · 41 citations
  3. Embedding Quantum Program Verification into DafnyFeifei Cheng, Sushen Vangeepuram, Henry Allard, Seyed Mohammad Reza Jafari et al.OOPSLA 2025 · 2 citations
  4. Compiling Conditional Quantum Gates without Using Helper QubitsKeli Huang, Jens PalsbergPLDI 2024 · 5 citations
  5. Veritas: accurately estimating the correct output on noisy intermediate-scale quantum computersTirthak Patel, Devesh TiwariSC 2020 · 34 citations
Dusk over the sea between two cliffs drawn in fine vertical lines