AIDE-QC: Software Stack for Quantum-Classical Computing | Getting Started |
AIDE-QC is a next-generation software stack enabling heterogeneous quantum-classical programming, compilation,
and execution on both near-term and future fault-tolerant quantum computers. Our approach treats quantum computers
as co-processors and puts forward single-source C++ and Pythonic programming models for quantum code expression and
compilation to native backend gate sets. AIDE-QC builds upon the service-oriented
XACC
quantum programming framework and puts forward plugins Ultimately, AIDE-QC puts forward a novel C++
language extension
for heterogeneous quantum-classical computing called | Install the AIDE-QC IDE (any OS, requires Docker)
Install the binaries locally (Mac, Linux)
See more details on installation at Getting Started . |
Quick Look - Programming Grover’s Algorithm
AIDE-QC promotes a single-source programming model for quantum computing. While most approaches promote circuit construction
data structures for remote submission APIs, we enable a true quantum-classical programming language via extensions to existing familiar
programming languages, like C++ and Python. Here we demonstrate how to program a textbook quantum algorithm - the Grover search. We want to implement the general circuit | ||
amplification.hpp | grover.hpp | run_grover.cpp |
|
|
|
To start, we look at the circuit above and notice a sub-circuit called out as `amplification`. It has a very specific structure - a pattern of Hadamard and X gates on all qubits, followed by a multi-qubit control-Z operation, and ended with another Hadamard/X broadcast operation. AIDE-QC and QCOR express this common pattern (so-called compute-action-uncompute) via a special compute {...} action {...} syntax. Note here also that qubit and sub-qreg extraction is possible on a provided qreg, and all single-qubit gates can be controlled on one or many qubits. | The AIDE-QC stack allows one to define quantum kernels that can be parameterized with other quantum callables via the KernelSignature | Finally, to use this general grover library code, we just include it as one would for any external library. We define an oracle quantum kernel, and pass it to the general grover call. Our oracle in this example marks states |101> and |011>, so our results should see these states each with 50% probability. |
|