A MLIR Dialect for Quantum Assembly Languages
Alexander McCaskey, Thien Nguyen

TL;DR
This paper introduces a new MLIR dialect for quantum assembly languages, enabling compilation to quantum hardware-agnostic binaries through a retargetable workflow that adheres to the QIR specification.
Contribution
It extends MLIR with a quantum dialect that facilitates expression, compilation, and lowering of quantum assembly languages to LLVM IR and executable binaries.
Findings
Successfully generated MLIR from OpenQASM source files
Lowered MLIR to LLVM IR adhering to QIR standards
Produced executable binaries for quantum processors
Abstract
We demonstrate the utility of the Multi-Level Intermediate Representation (MLIR) for quantum computing. Specifically, we extend MLIR with a new quantum dialect that enables the expression and compilation of common quantum assembly languages. The true utility of this dialect is in its ability to be lowered to the LLVM intermediate representation (IR) in a manner that is adherent to the quantum intermediate representation (QIR) specification recently proposed by Microsoft. We leverage a qcor-enabled implementation of the QIR quantum runtime API to enable a retargetable (quantum hardware agnostic) compiler workflow mapping quantum languages to hybrid quantum-classical binary executables and object code. We evaluate and demonstrate this novel compiler workflow with quantum programs written in OpenQASM 2.0. We provide concrete examples detailing the generation of MLIR from OpenQASM source…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
