Polyhedral Analysis of Quantum Programs
In this work, we study how polyhedral compilation techniques can be applied to quantum programs. Concretely, we develop a compiler pass that constructs a polyhedral representation of quantum programs expressed in the HUGR intermediate representation. We show the usefulness of this abstraction through two case studies: First, we show how the model allows us to statically prove safety properties, in particular whether array accesses are in bounds and whether multi-qubit operations act on distinct qubits. Second, we show how to compute gate schedules that increase hardware parallelism, and develop a pass that resynthesises a HUGR program whose gates are emitted in the optimised order. Furthermore, we show how the scheduler can exploit commutation properties to enable additional reorderings and further increase parallelism.