Formalization of Quantum Intermediate Representations for Code Safety
- URL: http://arxiv.org/abs/2303.14500v1
- Date: Sat, 25 Mar 2023 15:40:18 GMT
- Title: Formalization of Quantum Intermediate Representations for Code Safety
- Authors: Junjie Luo, Jianjun Zhao
- Abstract summary: Quantum Intermediate Representation (QIR) is a Microsoft-developed, LLVM-based intermediate representation for quantum program compilers.
We provide formal definitions for the data types and instruction sets of QIR, aiming to provide correctness and security guarantees.
- Score: 3.5116128875896067
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Quantum Intermediate Representation (QIR) is a Microsoft-developed,
LLVM-based intermediate representation for quantum program compilers. QIR aims
to provide a general solution for quantum program compilers independent of
front-end languages and back-end hardware, thus avoiding duplicate development
of intermediate representations and compilers. Since it is still under
development, QIR is described in natural language and lacks a formal
definition, leading to ambiguity in its interpretation and a lack of rigor in
implementing quantum functions. In this paper, we provide formal definitions
for the data types and instruction sets of QIR, aiming to provide correctness
and security guarantees for operations and intermediate code conversions in
QIR. To validate our design, we show some samples of unsafe QIR code where
errors can be detected by our formal approach.
Related papers
- ASDF: A Compiler for Qwerty, a Basis-Oriented Quantum Programming Language [0.46435896353765527]
Qwerty is a high-level quantum programming language built on bases and functions rather than circuits.
This paper presents ASDF, an open-source compiler for Qwerty that answers these challenges in compiling basis-oriented languages.
arXiv Detail & Related papers (2025-01-22T22:54:13Z) - Towards Supporting QIR: Thoughts on Adopting the Quantum Intermediate Representation [4.704614749567071]
Intermediate representations play a crucial role in the software stack for a quantum computer.
Microsoft proposed the Quantum Intermediate Representation (QIR) to facilitate efficient optimizations.
This article provides food for thought on how QIR can be adopted in different software tools.
arXiv Detail & Related papers (2024-11-27T19:00:01Z) - NetQIR: An Extension of QIR for Distributed Quantum Computing [2.924756839755417]
NetQIR is an extension of Microsoft's Quantum Intermediate Representation (QIR)
It was developed in response to the lack of abstraction at the network and hardware layers.
It aims to bridge the gap between high-level quantum algorithm design and low-level hardware execution.
arXiv Detail & Related papers (2024-08-07T12:01:47Z) - Modular decoding: parallelizable real-time decoding for quantum
computers [55.41644538483948]
Real-time quantum computation will require decoding algorithms capable of extracting logical outcomes from a stream of data generated by noisy quantum hardware.
We propose modular decoding, an approach capable of addressing this challenge with minimal additional communication and without sacrificing decoding accuracy.
We introduce the edge-vertex decomposition, a concrete instance of modular decoding for lattice-surgery style fault-tolerant blocks.
arXiv Detail & Related papers (2023-03-08T19:26:10Z) - InQuIR: Intermediate Representation for Interconnected Quantum Computers [0.0]
InQuIR is a representation that can express communication and computation on distributed quantum systems.
We give examples written in InQuIR to illustrate the problems arising in distributed programs, such as deadlock.
We also provide software tools for InQuIR and evaluate the computational costs of quantum circuits.
arXiv Detail & Related papers (2023-02-01T06:19:23Z) - Deep Quantum Error Correction [73.54643419792453]
Quantum error correction codes (QECC) are a key component for realizing the potential of quantum computing.
In this work, we efficiently train novel emphend-to-end deep quantum error decoders.
The proposed method demonstrates the power of neural decoders for QECC by achieving state-of-the-art accuracy.
arXiv Detail & Related papers (2023-01-27T08:16:26Z) - QParallel: Explicit Parallelism for Programming Quantum Computers [62.10004571940546]
We present a language extension for parallel quantum programming.
QParallel removes ambiguities concerning parallelism in current quantum programming languages.
We introduce a tool that guides programmers in the placement of parallel regions by identifying the subroutines that profit most from parallelization.
arXiv Detail & Related papers (2022-10-07T16:35:16Z) - Enabling Retargetable Optimizing Compilers for Quantum Accelerators via
a Multi-Level Intermediate Representation [78.8942067357231]
We present a multi-level quantum-classical intermediate representation (IR) that enables an optimizing, retargetable, ahead-of-time compiler.
We support the entire gate-based OpenQASM 3 language and provide custom extensions for common quantum programming patterns and improved syntax.
Our work results in compile times that are 1000x faster than standard Pythonic approaches, and 5-10x faster than comparative standalone quantum language compilers.
arXiv Detail & Related papers (2021-09-01T17:29:47Z) - A MLIR Dialect for Quantum Assembly Languages [78.8942067357231]
We demonstrate the utility of the Multi-Level Intermediate Representation (MLIR) for quantum computing.
We extend MLIR with a new quantum dialect that enables the expression and compilation of common quantum assembly languages.
We leverage a qcor-enabled implementation of the QIR quantum runtime API to enable a retargetable (quantum hardware agnostic) compiler workflow.
arXiv Detail & Related papers (2021-01-27T13:00:39Z) - Extending C++ for Heterogeneous Quantum-Classical Computing [56.782064931823015]
qcor is a language extension to C++ and compiler implementation that enables heterogeneous quantum-classical programming, compilation, and execution in a single-source context.
Our work provides a first-of-its-kind C++ compiler enabling high-level quantum kernel (function) expression in a quantum-language manner.
arXiv Detail & Related papers (2020-10-08T12:49:07Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.