Hi all,

Tomorrow David Ittah will tell us about his master thesis on "Multi-level IR for Quantum Program Optimization", which was supervised by Torsten Hoefler from the CS department and Thomas Häner from Microsoft (formerly Troyer group). See below for the abstract. The zoom link is https://ethz.zoom.us/j/362994444.

Best,

Joe

Abstract:

Intermediate representations (IR) have traditionally provided numerous benefits to compilation systems, in particular in the domain of static program analysis and optimization. However, the quantum programming landscape has yet to produce similarly powerful IRs, instead focusing on the development of embedded domain-specific languages (eDSL). As these only feature rudimentary IRs in the form of data structures for quantum circuits, or simple quantum assembly (QASM) languages, they lack meaningful integration with their classical host compilation infrastructure. As a remedy, we propose a novel quantum IR design based on exposing SSA-like quantum dataflow in the IR alongside classical dataflow. Our language- and hardware-agnostic IR is designed to enable classical-quantum co-optimization, and with the intent to maximize the reuse of existing compilation infrastructure. An implementation in the MLIR compiler framework demonstrates that ∼99.8% of savings identified by ProjectQ’s run-time optimizations on Shor’s algorithm can be exploited by static optimizations in our IR. A resource estimation routine to count the number of rotation gates in Shor’s algorithm is shown to run 5-6 orders of magnitudes faster on application-scale input sizes than on existing systems in ProjectQ and Qiskit.