Optimizing Quantum Compilation via High-Level Quantum Instructions
Evandro C. R. Rosa, Jerusa Marchi, Eduardo I. Duzzioni, Rafael de Santiago
TL;DR
This work addresses the bottleneck of circuit-centric quantum programming by introducing a high-levelKet construct that exposes semantic structure to the compiler through the $U^\dagger V U$ pattern. The approach enables two key capabilities: safe, dynamic management of auxiliary qubits and the use of approximate gate decompositions to reduce resources, demonstrated via a V-chain decomposition that achieves up to a 50% reduction in CNOT gates for multi-controlled NOT gates. The proposed theorems show when and how to apply these optimizations without altering the final unitary, relying on structural properties like permutation and diagonal gates. The results indicate that high-level abstractions can unlock a new class of compiler optimizations, potentially enabling more efficient quantum computation and paving the way for advanced memory management and circuit-mapping strategies.
Abstract
Current quantum programming is dominated by low-level, circuit-centric approaches that limit the potential for compiler optimization. This work presents how a high-level programming construct provides compilers with the semantic information needed for advanced optimizations. We introduce a novel optimization that leverages a quantum-specific instruction to automatically substitute quantum gates with more efficient, approximate decompositions, a process that is transparent to the programmer and significantly reduces quantum resource requirements. Furthermore, we show how this instruction guarantees the correct uncomputation of auxiliary qubits, enabling safe, dynamic quantum memory management. We illustrate these concepts by implementing a V-chain decomposition of the multi-controlled NOT gate, showing that our high-level approach not only simplifies the code but also enables the compiler to generate a circuit with up to a 50% reduction in CNOT gates. Our results suggest that high-level abstractions are crucial for unlocking a new class of powerful compiler optimizations, paving the way for more efficient quantum computation.
