|
QDMI v1.4.0-dev
Quantum Device Management Interface
|
This document describes breaking changes and provides guidance for upgrading between versions. For a complete list of changes, including minor and patch releases, please refer to the changelog.
Installed QDMI packages no longer select a compiler cache or add -g to consuming targets. Configure caching with CMAKE_C_COMPILER_LAUNCHER and CMAKE_CXX_COMPILER_LAUNCHER, and select Debug or RelWithDebInfo when debug information is needed.
QDMI 1.4 defines a stable ABI for replaceable QDMI driver libraries. Export every function declared in qdmi/client.h with QDMI_DRIVER_EXPORT. Define QDMI_driver_EXPORTS while building the driver. A loader first resolves and calls QDMI_driver_get_client_abi_version. It then resolves the complete Client Interface before it allocates a session. The returned ABI is compatible if and only if its packed major and minor fields equal those of QDMI_CLIENT_ABI_VERSION. Ignore the patch field when checking compatibility. A different major or minor field is incompatible. QDMI 1.4 defines QDMI_CLIENT_ABI_VERSION as 1.4.0. CMake derives the ABI version from the QDMI release version. Device library versions remain independent.
The ABI version query does not initialize the driver. QDMI_session_alloc is the first stateful Client call. It initializes the driver lazily, sets its output to NULL before work that can fail, and leaves no partial session on failure. Clients can retry a failed allocation. The example driver no longer exposes QDMI_driver_init or QDMI_driver_shutdown.
A process uses one Client implementation and can allocate many sessions. Each initialized session exposes an immutable authorized device catalog. Device, site, operation, and job handles belong to that session. Free all jobs before freeing the session. Freeing the session invalidates every remaining descendant handle.
QDMI_DEVICE_PROPERTY_ID is appended as value 18. It is mandatory through the Client Interface for configured top-level devices and optional through the Device Interface. A driver supplies the configured value when a device returns QDMI_ERROR_NOTSUPPORTED. Child-device IDs remain optional: drivers forward a device-reported ID when available and may otherwise return QDMI_ERROR_NOTSUPPORTED, without generating child IDs. The ID is a nonempty, opaque string. It is unique within an initialized session, immutable for one device handle, and stable across equivalent sessions and process restarts while the same logical resource exists. When saving an ID, also record which driver and configuration provide it. Do not use a display name, endpoint, pointer, credential, library version, or symbol prefix as the stable ID. The QDMI_DEVICE_ID CMake target property supplies a default stable ID that a driver can override in configuration.
The example driver configuration now gives each device a stable ID in a third column:
QDMI no longer tests x86 macOS. Generated device projects now target macOS 13.3 or newer. Use Apple silicon with macOS 13.3 or newer.
Generated QDMI device projects now require Python 3.11 or newer and use Python 3.11 as their stable ABI baseline. Existing generated projects should update their Python metadata and wheel configuration when adopting these changes.
The numeric values of remaining enumeration members are unchanged. Removed values remain reserved and return QDMI_ERROR_NOTSUPPORTED. Existing binaries can continue using supported values; source code referring to removed names must be updated when rebuilding against QDMI 1.4.
The unused QDMI_DEVICE_PROPERTY_NEEDSCALIBRATION property is removed. Providers can expose proprietary calibration readiness through a custom property, e.g., QDMI_DEVICE_PROPERTY_CUSTOM1. QDMI_DEVICE_STATUS_CALIBRATION remains available. The removed property's numeric value (8) remains reserved.
The unused QDMI_DEVICE_PROPERTY_PULSESUPPORT property and QDMI_Device_Pulse_Support_Level type are removed. QDMI does not define a pulse-programming interface. Providers can expose pulse programming through custom program formats or a separate vendor interface. The removed property's numeric value (9) remains reserved.
The QDMI_PROGRAM_FORMAT_CALIBRATION program format is removed. Use a provider-specific function to submit calibration jobs, if the provider offers one. Its numeric value (6) remains reserved. QDMI_DEVICE_STATUS_CALIBRATION remains available to report device status.
Jobs can now be retrieved by their ID via the new functions QDMI_session_retrieve_job_by_id (client interface) and QDMI_device_session_retrieve_device_job_by_id (device interface). The ID is the one reported by QDMI_JOB_PROPERTY_ID and QDMI_DEVICE_JOB_PROPERTY_ID, respectively.
A retrieved job can be queried, waited for, cancelled, and used to fetch results, but its parameters cannot be set and it cannot be submitted again. Devices that do not support this must return QDMI_ERROR_NOTSUPPORTED.
Two optional properties have been added:
Both are optional; implementations that cannot provide a trustworthy value return QDMI_ERROR_NOTSUPPORTED.
Device targets can now publish their stable ID and symbol prefix via the new configure_qdmi_device_target CMake function, which sets and exports the QDMI_DEVICE_ID and QDMI_DEVICE_PREFIX target properties.
Newly generated projects use this by default and expose an overridable <PREFIX>_QDMI_DEVICE_ID cache variable that defaults to <lowercase-prefix>.default. Existing device implementations can adopt it by calling the function for their device target. Once distributed, the ID should remain stable so that applications can keep referring to the same device.
The type used to represent core / processing-unit related information has been changed. A new device library implementation specific opaque pointer type named QDMI_Child_Device has been introduced for the QDMI_DEVICE_PROPERTY_CHILDDEVICES data queried via the device_query_interface.
CMake presets have been added to provide a standardized and reproducible way to configure builds across different platforms. These presets are also used in our CI.
On Unix systems, the debug, release, and coverage presets can be used to configure, build, and test QDMI.
Additionally, the lint preset can be used to configure and build QDMI in preparation for a clang-tidy run.
This release adds three new properties and parameters to the interface to enable support for multicore architectures:
The respective changes are additive and non-breaking, but device implementations that want to support multicore architectures will need to implement the new properties and parameters.
As of this release, the QDMI header-only library is no longer required to be linked into QDMI device implementations. Instead, each QDMI device now bundles all necessary headers in its own include directory. This allows distributing any QDMI device implementation in a truly standalone manner. You can remove the qdmi::qdmi target from the CMake configuration of your device implementation.
To properly resolve the imports, you will need to adjust the header includes in your device implementation. Any include of the form
must be replaced with
where my is the prefix of your device implementation.
Device implementations may now be compiled with hidden symbol visibility, which is a common best practice for C++ libraries to reduce symbol clashes and improve load times. In practice, this means that only symbols explicitly marked for export are accessible from outside the device library.
The header my_qdmi/export.h (where my is your device prefix) provides the export macro MY_QDMI_EXPORT. Use this header to control, which symbols are part of your public API.
All QDMI interface functions are already marked for export in my_qdmi/device.h. You only need to add MY_QDMI_EXPORT manually for additional custom public functions.
To enable this behavior, add the following CMake code to your device target's configuration:
where MY is your device prefix.
The QDMI device template has been updated to be compatible with the latest version of the QDMI specification and to include several improvements. Most importantly, as described above, the device implementation no longer needs to link against the QDMI header-only library and is now built with hidden symbol visibility by default.
Beyond that, the template has been extended to include:
In order to avoid a mismatch in the target name for the qdmi_project_warnings target between the source and installed versions of QDMI, the target alias has been adjusted. If your project relies on qdmi::project_warnings, you need to change it to qdmi::qdmi_project_warnings. More rationale is available in the PR description.
The CMake functionality for handling the prefixing of QDMI devices was refactored to improve the usability and flexibility. Particularly, the generate_device_defs_executable CMake function has been changed to allow the optional specification of the QDMI device target to link via a TARGET keyword argument. Example usage:
This change is expected to be fully backwards compatible.
The QDMI device template has been significantly updated to be more useful and provide a fully fletched starting point for new devices. This includes updating the existing template code with the latest best practices, including updating the CMake version range to 3.24-4.2 and using C++20 features.
In addition to these basic changes, the template has been extended to include:
The corresponding documentation has been updated to reflect these changes.
In addition, the template instantiation workflow has changed: the template files are no longer written as a side effect of the CMake configure step. Instead, configuration only defines the prefix and output path, and the actual file generation happens when the explicit build target qdmi-template is invoked (use qdmi-template-clean to overwrite an existing output directory).
Version 1.2.0 introduces several breaking changes, primarily related to type system improvements, duration/length unit handling, and API enhancements for neutral atom devices. Please review all sections carefully when upgrading.
Two new program formats were added to the QDMI_Program_Format enum to support additional quantum programming frameworks:
These additions are backward-compatible and do not require changes to existing code.
Breaking Change: Length and duration properties now use integer types (int64_t or uint64_t) instead of double, and represent values in device-specific units rather than standard SI units.
Device implementations must now provide the following properties to define their unit system:
Before (v1.1.0):
After (v1.2.0):
To get the device's duration unit, use the QDMI_DEVICE_PROPERTY_DURATIONUNIT property.
Migration: Replace all occurrences of QDMI_SITE_PROPERTY_ID with QDMI_SITE_PROPERTY_INDEX in your codebase.
Version 1.2.0 adds comprehensive support for neutral atom quantum computing platforms through a set of new device, site, and operation properties. These additions are non-breaking and optional for non-neutral-atom devices.
These properties enable precise modeling of neutral atom device capabilities.
Two new functions have been added for querying job properties:
These functions allow clients to retrieve job metadata and previously set parameter values, enabling better job tracking and debugging.
Breaking Change: The functions QDMI_job_wait and QDMI_device_job_wait now require an additional timeout parameter.
Function Signatures:
Timeout Parameter:
Migration:
Four new authentication options have been added to QDMI_SESSION_PARAMETER and QDMI_DEVICE_SESSION_PARAMETER enums to support diverse authentication mechanisms:
Breaking Change: The addition of new authentication options has changed the numeric values of existing enum entries in QDMI_SESSION_PARAMETER and QDMI_DEVICE_SESSION_PARAMETER.
Impact:
Migration:
Device Implementation Requirements:
Breaking Change: The QDMI_JOB_STATUS enum values have been reordered to better reflect the typical job lifecycle progression.
Impact:
Migration:
Breaking Change: The minimum required CMake version has been raised from 3.19 to 3.24.
Migration:
Rationale: This change enables better build system features and improved dependency management.
For quick reference, here are all breaking changes in v1.2.0: