Hybrid classical-quantum computing paradigms are posed to benefit the scientific applications that are ubiquitous within the scientific computing research community, including modeling and simulation of quantum many-body systems, applied math, and data analytics. However, developing quantum-classical hybrids that integrate quantum algorithmic statements alongside conventional programming models is an outstanding technical challenge. Anticipating these unique challenges, a 2015 Advanced Scientific Computing Research (ASCR) workshop on quantum computing concluded that development of software infrastructure and interfaces will be critical for leveraging this technology into existing scientific computing research. While several efforts in quantum programming have focused on formal language development and low-level compiler tools, there has yet to be a concerted effort to integrate quantum programs into the sophisticated and complex HPC environments that are the staple of modern scientific computing. This lack of infrastructure and absence of proper tooling represents a major roadblock to programming small-scale QPUs as well as large-scale hierarchical (heterogeneous) computing systems.
The problem of accommodating new programming paradigms is not without precedent. The integration of GPUs into HPC systems was also a significant burden for many large-scale scientific applications because of the fundamentally different way programmers interact with the hardware. Hardware-specific solutions include language extensions like the CUDA library from NVidia that enable programming natively in the local dialect. This approach is useful because it retains a wide degree of flexibility to the programmer while also automating those aspects of compilation that are overly complex. Despite prior efforts, we anticipate that QPU programming models will be even more challenging due to the radically different features and behaviors brought by quantum computing. As highlighted by the ASCR report, there are serious questions concerning how to realize efficient quantum algorithm expression, compilation, and execution within the classical HPC context. The development of new programming models, runtime systems, and interfacing paradigms is needed to facilitate the future generation of HPC software. This system software is absolutely necessary for assessing concrete QPU performance, algorithm efficiency, and application scaling as well as better understanding the payoffs from quantum computing.
XACC is a programming specification and software framework that tackles the aforementioned challenges and provides a hybrid classical-quantum programming model that enables quantum acceleration within existing classical HPC applications. XACC provides the software interfaces and infrastructure required by domain computational scientists to offload computationally intractable work to an attached quantum accelerator. It handles algorithm programming in a manner similar to OpenCL, with code expressed as language-agnostic quantum kernels, thus enabling XACC to interact with existing quantum programming languages (QPLs) such as Scaffold, Quipper, and QCL. To accomplish this language interoperability, XACC keeps track of associated compilers for each programming language and orchestrates their compilation, or translation, to accelerator-level assembly code. XACC provides developers with two mechanisms for compilation: (1) a runtime API (just-in-time compilation) that enables the control of all aspects of high-level programming, translation, and execution, and (2) a static compiler that transforms invoked quantum kernels into an execution of the compiled result on the accelerator. Both mechanisms delegate to a classical compiler for generation of the hybrid classical-quantum executable. Furthermore, since XACC is extensible in languages and compilers, users can program and execute algorithms suited for either gate model quantum computing or adiabatic quantum computing.
The inevitable near-term variability in quantum hardware designs and implementations forces any software programming framework for quantum acceleration to be extensible in the hardware types it interacts with. XACC is no exception to this, and therefore provides a set of interfaces for injecting custom accelerator instances. These accelerator instances take as input the results of the XACC compilation step and leverage vendor-supplied APIs to perform the actual execution on the attached device. The first target QPUs for XACC are the 5-qubit gate model chip from IBM and the 1000 qubit quantum annealing model chip from D-Wave. These are both injected into the XACC framework as accelerator instances whose associated implementation delegates execution details to APIs supplied by IBM and D-Wave. This mechanism also enables the integration of external quantum computing simulation applications. Simulators act as virtual accelerators in the XACC framework - they provide an implementation of the accelerator infrastructure that delegates execution to simulations on small laptops, workstations, or even clusters and supercomputers.
The high-level programming, compilation, and execution tooling provided by XACC are envisioned as just an appropriate beginning. They form the software foundation for the more ambitious goal of easily leveraged, high-level software libraries for common quantum computing algorithms, math libraries, and utilities. The foundational layer provided by XACC will be used to build up libraries and repositories of common quantum kernels - quantum phase estimation, fourier transforms, and linear systems solvers. These utilities are vital for the DOE-relevant computational science problems facing potential testbed facility users.
Maximizing the utility of any quantum computing testbed necessarily requires a high-level, accessible, and feature-rich set of software tooling for interacting with complex quantum hardware. The ideal users of such a facility will not use the testbed if they have to program low-level hardware details. XACC provides the required infrastructure in an easily deployed, open-source manner and enables high-level programming and execution of both gate and adiabatic model quantum computing. Its design and implementation have been carefully crafted to leverage existing quantum programming languages and techniques, and interact with QPUs in a hardware-agnostic manner.