Skip to content
/ qiree Public

The QIR Execution Engine library provides interfaces for easily processing Quantum Intermediate Representation code using the LLVM execution engine.

Notifications You must be signed in to change notification settings

ORNL-QCI/qiree

Repository files navigation

QIR-EE

The QIR Execution Engine library provides interfaces for easily processing Quantum Intermediate Representation code using the LLVM execution engine.

Introduction

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.

Documentation

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).

Getting Started

There are two dependencies for QIR-EE to work properly. Please make sure to download and install the most current versions of:

  1. LLVM (we have tested versions 14 through 18)
  2. XACC (currently required for execution in this version of qir-ee)

System Requirements

  • 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).

Installation

QIR-EE Setup in Command Line

  1. Clone this repo. Enter the repo.
  2. mkdir build; cd build
  3. cmake ..
  4. make

The resulting executable can be saved with an alias: alias qee="./[YOUR-DIR]/qir-xir/build/bin/qir-xacc"

Executing Quantum Circuits

(via QIR-EE and XACC)

  1. Check that your cmake prefixes for XACC are correct.
  2. Typing echo $CMAKE_PREFIX_PATH should give you the path to your XACC installation.
  3. If empty, then add it: export CMAKE_PREFIX_PATH=$HOME/.xacc or an equivalent path to your XACC installation.
  4. Check your $PYTHONPATH for pointing to your XACC installation.
  5. If empty, then add it: export PYTHONPATH=$PYTHONPATH:$HOME/.xacc or an equivalent path to your XACC installation.

Syntax for executing QIR via XACC:

For basic usage:

qee llvm-file-path --flag-name flag-value
  1. qee may be replaced with an equivalent path to the executable.

  2. llvm-file-path is used to indicate path of the LLVM (*.ll) file that specifies the quantum program (required).

  3. -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.

Example:

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.

Understanding the Results

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.

Adding Custom Operations

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 structure

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

About

The QIR Execution Engine library provides interfaces for easily processing Quantum Intermediate Representation code using the LLVM execution engine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •