A MLIR Dialect for Quantum Assembly Languages

01/27/2021
by   Alexander McCaskey, et al.
0

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.

READ FULL TEXT

page 2

page 5

research
10/08/2020

Extending C++ for Heterogeneous Quantum-Classical Computing

We present qcor - a language extension to C++ and compiler implementatio...
research
04/12/2019

Verified Optimization in a Quantum Intermediate Representation

We present sqire, a low-level language for quantum computing and verific...
research
01/26/2021

Enabling Dataflow Optimization for Quantum Programs

We propose an IR for quantum computing that directly exposes quantum and...
research
03/25/2023

Formalization of Quantum Intermediate Representations for Code Safety

Quantum Intermediate Representation (QIR) is a Microsoft-developed, LLVM...
research
02/10/2017

Compressing Green's function using intermediate representation between imaginary-time and real-frequency domains

New model-independent compact representations of imaginary-time data are...
research
10/22/2019

Fairness evaluation during the conceptual design of heat grids with quantum annealers

This paper presents a workflow to evaluate the macro scale thermal fairn...
research
09/06/2021

QSSA: An SSA-based IR for Quantum Computing

Quantum computing hardware has progressed rapidly. Simultaneously, there...

Please sign up or login with your details

Forgot password? Click here to reset