Linear and Non-linear Relational Analyses for Quantum Program Optimization
Matthew Amy, Joseph Lunderville
Abstract
The phase folding optimization is a circuit optimization used in many quantum compilers as a fast and effective way of reducing the number of high-cost gates in a quantum circuit. However, existing formulations of the optimization rely on an exact, linear algebraic representation of the circuit, restricting the optimization to being performed on straightline quantum circuits or basic blocks in a larger quantum program. We show that the phase folding optimization can be re-cast as an affine relation analysis , which allows the direct application of classical techniques for affine relations to extend phase folding to quantum programs with arbitrarily complicated classical control flow including nested loops and procedure calls. Through the lens of relational analysis, we show that the optimization can be powered-up by substituting other classical relational domains, particularly ones for non-linear relations which are useful in analyzing circuits involving classical arithmetic. To increase the precision of our analysis and infer non-linear relations from gate sets involving only linear operations – such as Clifford+ t – we show that the sum-over-paths technique can be used to extract precise symbolic transition relations for straightline circuits. Our experiments show that our methods are able to generate and use non-trivial loop invariants for quantum program optimization, as well as achieve some optimizations of common circuits which were previously attainable only by hand.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 7efafd0a-dda0-41f6-9f8d-db37f16c0685Cited by top-tier papers3
- Reducing T Gates with Unitary SynthesisTianyi Hao, Amanda Xu, Swamit TannuASPLOS 2026 · 3 citations
- SAQR-QC: A Logic for Scalable but Approximate Quantitative Reasoning about Quantum CircuitsNengkun Yu, Jens Palsberg, Thomas RepsPLDI 2026 · 3 citations
- Leveraging Phase Polynomials for Quantum Circuit OptimizationZihan Chen, Henry Chen, Yuwei Jin, Enhyeok Jang et al.ISCA 2026
Builds on5
- A verified optimizer for Quantum circuitsKesha Hietala, Robert Rand, Shih-Han Hung, Xiaodi Wu et al.POPL 2021 · 111 citations
- Quantum abstract interpretationNengkun Yu, Jens PalsbergPLDI 2021 · 69 citations
- Synthesizing Quantum-Circuit OptimizersAmanda Xu, Abtin Molavi, Lauren Pick, Swamit Tannu et al.PLDI 2023 · 41 citations
- Assertion-based optimization of Quantum programsThomas Häner, Torsten Hoefler, Matthias TroyerOOPSLA 2020 · 13 citations
- Solvable Polynomial Ideals: The Ideal Reflection for Program AnalysisJohn Cyphert, Zachary KincaidPOPL 2024 · 11 citations
Related papers
- Transpiler-Architecture Co-Design to Curb Clifford Costs in Fault-Tolerant Quantum ComputingMeng Wang, Chenxu Liu, Samuel A. Stein, Yufei Ding et al.ISCA 2026
- Giallar: push-button verification for the qiskit Quantum compilerRunzhou Tao, Yunong Shi, Jianan Yao, Xupeng Li et al.PLDI 2022 · 44 citations
- Relational Verification for Cost-Aware Quantum Program OptimizationZiming Zhao, Tingting Li, Zhaoxuan Li, Jianwei YinAAAI 2026
- Enabling accuracy-aware Quantum compilers using symbolic resource estimationGiulia Meuli, Mathias Soeken, Martin Roetteler, Thomas HänerOOPSLA 2020 · 10 citations
- How Many Quantum Circuit Identities Are Needed to Generate All Others?Yuantian Ding, Nengkun Yu, Xiaokang QiuCAV 2026
