Local Optimization of Quantum Circuits (Extended Version)
Jatin Arora, Mingkuan Xu, Sam Westrick, Pengyu Liu, Dantong Li, Yongshan Ding, Umut A. Acar
TL;DR
This paper tackles the challenge of efficiently optimizing large quantum circuits while providing quality guarantees. It introduces local optimality, formalizes it with Laqe and a rewrite semantics, and then develops the OAC algorithm that uses circuit cutting and a lazy melding strategy to produce locally optimal circuits with a provable linear bound on oracle calls. Empirically, OAC, when paired with an oracle like VOQC, achieves more than an order of magnitude speedups and gate-count reductions competitive with or better than state-of-the-art optimizers across diverse circuit families. The work demonstrates that local optimality is a strong and practical optimization criterion for large quantum circuits and can serve as a scalable amplifier for existing global optimizers, with potential extensions to other gate sets and objectives.
Abstract
Recent advances in quantum architectures and computing have motivated the development of new optimizing compilers for quantum programs or circuits. Even though steady progress has been made, existing quantum optimization techniques remain asymptotically and practically inefficient and are unable to offer guarantees on the quality of the optimization. Because many global quantum circuit optimization problems belong to the complexity class QMA (the quantum analog of NP), it is not clear whether quality and efficiency guarantees can both be achieved. In this paper, we present optimization techniques for quantum programs that can offer both efficiency and quality guarantees. Rather than requiring global optimality, our approach relies on a form of local optimality that requires each and every segment of the circuit to be optimal. We show that the local optimality notion can be attained by a cut-and-meld circuit optimization algorithm. The idea behind the algorithm is to cut a circuit into subcircuits, optimize each subcircuit independently by using a specified "oracle" optimizer, and meld the subcircuits by optimizing across the cuts lazily as needed. We specify the algorithm and prove that it ensures local optimality. To prove efficiency, we show that, under some assumptions, the main optimization phase of the algorithm requires a linear number of calls to the oracle optimizer. We implement and evaluate the local-optimality approach to circuit optimization and compare with the state-of-the-art optimizers. The empirical results show that our cut-and-meld algorithm can outperform existing optimizers significantly, by more than an order of magnitude on average, while also slightly improving optimization quality. These results show that local optimality can be a relatively strong optimization criterion and can be attained efficiently.
