Retargetable Optimizing Compilers for Quantum Accelerators via a Multilevel Intermediate Representation
Thien Nguyen, Alexander McCaskey · IEEE Micro · 2022
We present a multilevel quantum–classical intermediate representation (IR) that enables an optimizing, retargetable compiler for available quantum languages. Our work builds upon the multilevel intermediate representation (MLIR) framework and leverages its unique progressive lowering capabilities to map quantum languages to the low-level virtual machine (LLVM) machine-level IR. We provide both quantum and classical optimizations via the MLIR pattern rewriting subsystem and standard LLVM optimization passes, and demonstrate the programmability, compilation, and execution of our approach via standard benchmarks and test cases. In comparison to other standalone language and compiler efforts available today, our work results in compile times that are 1,000× faster than standard Pythonic approaches, and 5–10× faster than comparative standalone quantum language compilers. Our compiler provides quantum resource optimizations via standard programming patterns that result in a 10× reduction in entangling operations, a common source of program noise. We see this work as a vehicle for rapid quantum compiler prototyping.
Cited by 7 works. doi:10.1109/mm.2022.3179654 Open-access PDF
Authors
References
- OpenQASM 3: A Broader and Deeper Quantum Assembly Language
- XACC: a system-level software infrastructure for heterogeneous quantum–classical computing*
- MLIR: A Compiler Infrastructure for the End of Moore's Law
- High-Performance Computing with Quantum Processing Units
- Quantum programming languages
- Compiling ONNX Neural Network Models Using MLIR
- Domain-Specific Multi-Level IR Rewriting for GPU: The Open Earth Compiler for GPU-accelerated Climate Simulation
- Extending C++ for Heterogeneous Quantum-Classical Computing
- A MLIR Dialect for Quantum Assembly Languages
- QCOR