A small C library to support offloading quantum circuit computation via OpenMP target interface.
Applications in C/C++ can use this library to offload quantum circuit computation to a separate target device (e.g. another x86 core), which manages the communication with an actual quantum device or an emulator, keeping the main thread free for classical computation while waiting for the quantum result.
Currently the main components of the library includes:
omp_q
: Manages circuits, operators, and measurement interface. Output circuits into OpenQASM 2.0 and QIR.simulate_qiskit
: Invokes Python Qiskit to simulate QASM circuit.simulate_lrz
: Communicates with LRZ quantum daemon (QLM or quantum hardware).
To build this library, there are a few dependencies:
- LLVM with OpenMP runtime (Currently only tested on x86_64, see
cirrus-compile-llvm.sh
orlrz-compile-llvm.sh
for configuration example). - Python and Qiskit required for QASM simulation.
- NLOPT optimizer for VQE/QAOA examples
- JANSSON and RABBITMQ-C for communication with LRZ quantum daemon.
- Use
lrz-compile-llvm.sh
to build a LLVM with OpenMP runtime - Use
build-lrz.sh
to buildlibOMPQ
and examples inbuild/
- Use
run-lrz.sh
to run example