🤖 AI Summary
Existing quantum circuit compilation techniques are largely confined to unitary circuits without measurements, making them ill-suited for optimizing dynamic quantum circuits that involve mid-circuit measurements and classical feedback. This work proposes Branch-aware Quantum Constant Propagation (BQCP), the first approach to incorporate path-sensitive analysis into the optimization of dynamic quantum circuits. By jointly modeling classical control flow and quantum state evolution, BQCP tracks classical information generated by measurements and the corresponding quantum states within each conditional branch at compile time, enabling semantics-preserving, path-sensitive simplifications. The method combines bounded quantum state representations with branch pruning strategies to achieve both scalability and correctness. Experimental results demonstrate that BQCP significantly reduces circuit size compared to existing techniques—including standard Quantum Constant Propagation—on both real-world and synthetic dynamic circuit benchmarks.
📝 Abstract
Compile-time optimization is important for improving the efficiency and reliability of quantum circuits on current noisy hardware. While many existing methods simplify circuits using structural patterns or quantum-state information, most of them target only unitary circuits and do not support dynamic circuits with mid-circuit measurements and classical feedforward. In this work, we present Branch-Aware Quantum Constant Propagation (BQCP), a compile-time analysis for dynamic circuits. BQCP extends Quantum Constant Propagation (QCP) by tracking the classical information produced by mid-circuit measurements together with the corresponding post-measurement quantum states across different execution branches. This enables path-sensitive reasoning inside conditional blocks and more precise information propagation than QCP. To keep the analysis scalable, we bound both the size of the quantum-state representation and the number of tracked branches. Using the information inferred by the analysis, we apply semantics-preserving simplifications to circuit operations. We prove the soundness of both the analysis and the simplifications. Experimental results on both application-driven and synthetic benchmarks show that, on dynamic circuits, our method consistently achieves larger reductions than other existing passes including QCP.