The QIR Execution Engine library provides interfaces for easily processing Quantum Intermediate Representation code using the LLVM execution engine.
Welcome to the Quantum Intermediate Representation Execution Engine (QIR-EE), a state-of-the-art tool designed to streamline the process of running quantum circuits and algorithms. Whether you're a researcher, student, or enthusiast, QIR-EE (pronounced 'cure-ee') is designed to make your journey into quantum computing as seamless as possible. This implementation is associated to the paper A Cross-Platform Execution Engine for the Quantum Intermediate Representation and is maintained by the QIR-EE Developers.
At version 0.1, this work represents a proof-of-concept for the feasibility of a modular workflow at the lower end of the quantum software stack. We welcome feedback and ideas for collaborations.
Most of the QIR-EE documentation is readable through the codebase through a
combination of static RST documentation and Doxygen-markup
comments in the source code itself. The full QIR-EE user
documentation (including selected code documentation incorporated
by Breathe) and the QIR-EE code documentation are (TODO: will
be) mirrored on
our GitHub pages site. You can generate these yourself (if the necessary
prerequisites are installed) by
setting the QIREE_BUILD_DOCS=ON
configuration option and running make doc
(user) or make doxygen
(developer).
There are two dependencies for QIR-EE to work properly. Please make sure to download and install the most current versions of:
- LLVM (we have tested versions 14 through 18)
- XACC (currently required for execution in this version of qir-ee)
- Access to a compatible quantum computing simulator or real quantum hardware.
- Configuration files set up in your home folder that contain credential to access vendor backends. (Under construction: Formats for .ionq_config and .honeywell_config.)
- A QIR file with the quantum program that you want to run (see examples folder).
QIR-EE Setup in Command Line
- Clone this repo. Enter the repo.
mkdir build; cd build
cmake ..
make
The resulting executable can be saved with an alias: alias qee="./[YOUR-DIR]/qir-xir/build/bin/qir-xacc"
(via QIR-EE and XACC)
- Check that your cmake prefixes for XACC are correct.
- Typing
echo $CMAKE_PREFIX_PATH
should give you the path to your XACC installation. - If empty, then add it:
export CMAKE_PREFIX_PATH=$HOME/.xacc
or an equivalent path to your XACC installation. - Check your
$PYTHONPATH
for pointing to your XACC installation. - If empty, then add it:
export PYTHONPATH=$PYTHONPATH:$HOME/.xacc
or an equivalent path to your XACC installation.
For basic usage:
qee llvm-file-path --flag-name flag-value
-
qee
may be replaced with an equivalent path to the executable. -
llvm-file-path
is used to indicate path of the LLVM (*.ll
) file that specifies the quantum program (required). -
-a
or--accelerator
is the name of the quantum accelerator (hardware or simulator) that you wish to use (required).With XACC we have tested:
aer
,qpp
,qsim
,honeywell:H1-1SC
,honeywell:H1-1E
,honeywell:H1-1
,ionq
.
Please refer to the documentation here (add link) for all flag options.
qee $HOME/qir-xir/examples/bell.ll --accelerator qsim
This command will execute the quantum Bell circuit described in bell.ll
the
(default) 1024 times using the "qsim" accelerator.
After execution, you will receive a summary of the quantum circuit's results. This may include the xacc buffer output. Example outputs from experiments can be found here: qiree-data.
Advanced users can extend the engine's capabilities by introducing new operations or functionalities. Please refer to the developer documetation (link to be added) for further information.
Directory | Description |
---|---|
app | Source code for installed executable applications |
cmake | Implementation code for CMake build configuration |
doc | Code documentation and manual |
scripts | Development and continuous integration helper scripts |
src | Library source code |
test | Unit tests |