Python Package

The Python package for this project is published on PyPI as iqm-qdmi. It provides a Python entry point for discovering installation paths that are useful when integrating the IQM QDMI Device into downstream build systems.

Install From PyPI

Use uv (or your Python package manager of choice) to install the package:

uv pip install iqm-qdmi

Quick Usage

The package itself makes the following variables available for import:

  • __version__: installed package version.

  • IQM_QDMI_INCLUDE_DIR: include directory for C/C++ headers.

  • IQM_QDMI_CMAKE_DIR: CMake package directory for find_package integration.

  • IQM_QDMI_LIBRARY_PATH: full path to the shared library.

1from iqm.qdmi import __version__, IQM_QDMI_INCLUDE_DIR, IQM_QDMI_CMAKE_DIR, IQM_QDMI_LIBRARY_PATH
2
3print(f"QDMI on IQM version: {__version__}")
4print(f"Include directory: {IQM_QDMI_INCLUDE_DIR}")
5print(f"CMake directory: {IQM_QDMI_CMAKE_DIR}")
6print(f"Library path: {IQM_QDMI_LIBRARY_PATH}")
QDMI on IQM version: 1.0.0
Include directory: /home/runner/work/QDMI-on-IQM/QDMI-on-IQM/.nox/docs/lib/python3.12/site-packages/iqm/qdmi/data/include
CMake directory: /home/runner/work/QDMI-on-IQM/QDMI-on-IQM/.nox/docs/lib/python3.12/site-packages/iqm/qdmi/data/share/cmake
Library path: /home/runner/work/QDMI-on-IQM/QDMI-on-IQM/.nox/docs/lib/python3.12/site-packages/iqm/qdmi/data/lib/libiqm-qdmi-device.so

Command Line Interface

The above values can also be conveniently queried from the command line via the iqm-qdmi entry point.

1!iqm-qdmi --help
usage: iqm-qdmi [-h] [--version | --include_dir | --cmake_dir | --lib_path]

Command line interface for the QDMI on IQM library.

options:
  -h, --help     show this help message and exit
  --version      show program's version number and exit
  --include_dir  Print the path to the iqm-qdmi C/C++ include directory
  --cmake_dir    Print the path to the iqm-qdmi CMake module directory
  --lib_path     Print the path to the iqm-qdmi shared library
1!iqm-qdmi --version
1.0.0
1!iqm-qdmi --include_dir
/home/runner/work/QDMI-on-IQM/QDMI-on-IQM/.nox/docs/lib/python3.12/site-packages/iqm/qdmi/data/include
1!iqm-qdmi --cmake_dir
/home/runner/work/QDMI-on-IQM/QDMI-on-IQM/.nox/docs/lib/python3.12/site-packages/iqm/qdmi/data/share/cmake
1!iqm-qdmi --lib_path
/home/runner/work/QDMI-on-IQM/QDMI-on-IQM/.nox/docs/lib/python3.12/site-packages/iqm/qdmi/data/lib/libiqm-qdmi-device.so