Here we describe the main abstractions defined by XACC to enable quantum-classical
programming in a hardware and language independent manner.
Concepts
========
Here we describe the main concepts or abstractions defined by XACC that enable
hardware agnostic quantum-classical programming, compilation, and execution.
Layered Architecture
--------------------
The architecture of the XACC programming framework exposes a series of interfaces for hardware-agnostic quantum programming, compilation, and execution.
As shown in the figure below, the XACC framework uses a layered software architecture based upon the common
compiler decomposition of a front-end, middle-end, and back-end layers. Each layer exposes different extension
points, or interfaces, for implementing a variety of specific use cases. XACC currently includes interfaces for quantum language compilers, instructions, hardware devices (also referred to as accelerators), compiler optimizations (alternatively, passes), observable measurements, and algorithms.
\caption{XACC is composed of three high-level layers - the front-end, middle-end, and back-end. The overall workflow starts with quantum kernel programming at the frontend, followed by IR generation and processing, and ends with back-end execution. Each of these layers exposes a variety of critical extension points.
}
\label{fig:layered}
\end{figure}
%%
%\subsection{Overview of XACC Layers}
\par
The front-end maps quantum code expressions, i.e. source code, into an XACC intermediate representation (IR) suitable for transformations and analysis by the middle layer. More specifically, the front-end layer maps source strings expressing a \emph{quantum kernel} to an IR instance. For example, the XACC front-end may be extended to parse an input source code written in the IBM OpenQASM \cite{openqasm} dialect and enable translation into the XACC IR. Similar functionality is implemented for the Rigetti Quil \cite{quil} dialect and higher-level languages. As a framework, XACC provides an extensible quantum code transpilation or compilation interface that may be tailored to parse many different languages into a common IR for subsequent manipulation.
%in an extensible and modular fashion (see Sec. \ref{sec:compilers}).
\par
The middle layer exposes an IR object model while maintaining an application programming interface (API) for quantum programs that is agnostic to the underlying hardware. The structure of the IR provides an integration mechanism generalizing disparate programming approaches with multiple quantum devices. A critical middle layer concept is the IR transformation, which exposes a framework extension point for performing standard quantum compilation routines, including circuit synthesis, as well as the addition of error mitigation and correction techniques into the logical design.
\par
The back-end layer exposes an abstract quantum computer interface that accepts instances of the IR and executes them on a targeted hardware device (see Sec. \ref{sec:acc}). The back-end layer provides further extension points mapping the IR to hardware-specific instruction sets and the low-level controls used to execute kernels. The former is performed by taking advantage of the middle-end's IR transformation infrastructure. By using a common interface, quantum program execution via the back-end layer is easily extensible to new hardware. % Extensibility of the back-end layer uses a common interface to execute programs directly on quantum hardware.
\par
% This layered architecture is that it promotes an overall separation of concerns that enables management of the complexity of applying quantum programming methods across the high and low-level language dialects native to specific quantum computing devices.
With the layered architecture, XACC efficiently maps high-level programming languages to low-level hardware instruction sets. Where a direct mapping of $N$ languages into $M$ quantum devices would require $NM$ separate language-to-hardware mappings, XACC reduces the amount of work necessary to $N+M$ separate mapping implementations. The IR is the central construct connecting the front-end and back-end layers through a set of transformations.
Intermediate Representation
----------------------------
In order to promote interoperability and programmability across the wide range of
@@ -15,7 +15,7 @@ XACC is an extensible compilation framework for hybrid quantum-classical
computing architectures. It provides extensible language frontend and hardware
backend compilation components glued together via a novel, polymorphic quantum intermediate
representation. XACC currently supports quantum-classical programming and enables
the execution of quantum kernels on IBM, Rigetti, and D-Wave QPUs, as well as a
the execution of quantum kernels on IBM, Rigetti, IonQ, and D-Wave QPUs, as well as a
number of quantum computer simulators.
The XACC programming model follows the traditional co-processor model, akin to OpenCL or CUDA for GPUs, but
...
...
@@ -39,6 +39,11 @@ Accelerators, and IR. To enable support for various compilers and accelerators
(like the OpenQasm or Quil compilers, or the IBM or Rigetti QPUs) you
can install the appropriate plugin (see `XACC Plugins <plugins.html>`_).
Description of Architecture
---------------------------
For a comprehensive discussion of all components of the XACC programming model and architecture,
please refer to this `manuscript <https://arxiv.org/abs/1911.02452>`_.
XACC Development Team
----------------------
...
...
@@ -66,27 +71,23 @@ You can ask questions by creating a new issue with the question tag.
:caption: Contents:
install
arch
plugins
tutorials
apps
em
bench
basics
Publications
------------
The following publications describe XACC or experiments leveraging the it.
[1] `XACC: A System-Level Software Infrastructure for Heterogeneous Quantum-Classical Computing <https://arxiv.org/abs/1911.02452>`_
[1] `A language and hardware independent approach to quantum-classical computing <https://www.sciencedirect.com/science/article/pii/S2352711018300700>`_
[2] `A language and hardware independent approach to quantum-classical computing <https://www.sciencedirect.com/science/article/pii/S2352711018300700>`_
[2] `Validating Quantum-Classical Programming Models with Tensor Network Simulations <https://arxiv.org/abs/1807.07914>`_
[3] `Validating Quantum-Classical Programming Models with Tensor Network Simulations <https://arxiv.org/abs/1807.07914>`_
[3] `Hybrid Programming for Near-term Quantum Computing Systems <https://arxiv.org/abs/1805.09279>`_
[4] `Hybrid Programming for Near-term Quantum Computing Systems <https://arxiv.org/abs/1805.09279>`_
Publications Leveraging XACC
----------------------------
[1] `Cloud Quantum Computing of an Atomic Nucleus <https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.210501>`_
[5] `Cloud Quantum Computing of an Atomic Nucleus <https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.210501>`_
[2] `Quantum-Classical Computations of Schwinger Model Dynamics using Quantum Computers <https://journals.aps.org/pra/abstract/10.1103/PhysRevA.98.032331>`_
[6] `Quantum-Classical Computations of Schwinger Model Dynamics using Quantum Computers <https://journals.aps.org/pra/abstract/10.1103/PhysRevA.98.032331>`_