QDMI Devices v0.1
Quantum Device Management Interface Devices
Loading...
Searching...
No Matches
Development Guide

Ready to contribute to QDMI Devices or create your own? This guide will help you get started.

Initial Setup

  1. Fork the QDMI Devices repository on GitHub (see https://docs.github.com/en/get-started/quickstart/fork-a-repo).
  2. Clone your fork locally

    git clone git@github.com:your_name_here/QDMI-Devices.git
  3. Change into the project directory

    cd QDMI-Devices
  4. Create a branch for local development

    git checkout -b name-of-your-bugfix-or-feature

    Now you can make your changes locally.

  5. (Optional, highly recommended) Install pre-commit to automatically run a set of checks before each commit.

  • via uv The easiest way to install pre-commit is via uv.
    uv tool install pre-commit
  • via brew If you use macOS, then pre-commit is in Homebrew, use
    brew install pre-commit
  • via pipx If you prefer to use pipx, you can install pre-commit with
    pipx install pre-commit
  • via pip If you prefer to use regular pip (preferably in a virtual environment), you can install pre-commit with
    pip install pre-commit

    Afterwards, you can install the pre-commit hooks with

pre-commit install
  1. (Optional, highly recommended) Use Visual Studio Code Dev Containers. The required configurations is located under .devcontainer.

    6.1. Open the repository in the Visual Studio Code

    6.2 Use the Dev Container plugin to Open Folder in Container. This should install all the dependencies and set the environmental variables.

Configure and Build

Building the project requires a C compiler supporting C11 and a minimum CMake version of 3.19.

QDMI Devices uses CMake as its build system. Building a project using CMake is a two-step process:

The following commands configure the project to build all devices.

cmake -S . -B build

After the build system is generated in the build directory, the devices can be built by calling.

cmake --build build

In case of disable a spesifc device, please use the following commanded to configure the project:

cmake --build build -DBUILD_THE_NAME_OF_THE_DEVICE=OFF

The possible option for DBUILD_THE_NAME_OF_THE_DEVICE are as follows:

  • BUILD_BACKEND_QLM : Builds the QDMI Device for Qaptiva Device
  • BUILD_BACKEND_DCDB : Builds the QDMI Device for DCDB

The other options are as follows:

  • BUILD_BACKEND_TESTS : Builds the tests for the enabled devices
  • BUILD_DOCUMENTATION : Builds the documentation for the enabled devices

Device-Spesific Dependencies

To build and run the devices following packages are required.

  • QLM To build the QLM Device, Python and myQLM package is required.
  • DCDB To build the DCDB Device, DCDB is required.

Environment Variables

To build and run the devices following environment variables needs to be set.

  • QLM
    • QLM_AUXILIARY_SCRIPT_LOCATION : The location of the QLM auxiliary script.
    • QLM_AUXILIARY_SCRIPT_NAME : The name of the QLM auxiliary script.
    • QAPTIVA_HOST_URL : The host url where QLM hardware is hosted.
  • DCDB
    • DCDB_SOURCE_LOCATION : The location of the DCDB source.
    • LD_LIBRARY_PATH : The library of the DCDB should be append.
    • DCDB_HOST_URL : The host url where DCDB is hosted.