Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

A MLIR Dialect for Quantum Assembly Languages

Conference ·
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 files, the lowering process from MLIR to LLVM IR, and ultimately the generation of executable binaries targeting available quantum processors.
Research Organization:
Oak Ridge National Laboratory (ORNL), Oak Ridge, TN (United States)
Sponsoring Organization:
USDOE
DOE Contract Number:
AC05-00OR22725
OSTI ID:
1862113
Country of Publication:
United States
Language:
English

Similar Records

Extending C++ for Heterogeneous Quantum-Classical Computing
Journal Article · Thu Jul 08 20:00:00 EDT 2021 · ACM Transactions on Quantum Computing · OSTI ID:1846549

Retargetable Optimizing Compilers for Quantum Accelerators via a Multi-Level Intermediate Representation
Journal Article · Mon Jun 13 20:00:00 EDT 2022 · IEEE Micro · OSTI ID:1883985

ASDF: A Compiler for Qwerty, a Basis-Oriented Quantum Programming Language
Conference · Fri Feb 28 23:00:00 EST 2025 · OSTI ID:3002249

Related Subjects