Skip to content

✨ Add replaceable QDMI drivers and stable device IDs - #511

Open
burgholzer wants to merge 12 commits into
developfrom
codex/client-driver-abi-stable-ids
Open

burgholzer wants to merge 12 commits into
developfrom
codex/client-driver-abi-stable-ids

Conversation

@burgholzer

@burgholzer burgholzer commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

Allow applications to replace a QDMI driver without rebuilding and select configured devices by stable ID. The PR targets develop and retains the merged calibration and pulse removals.

The driver exports the Client Interface and reports its ABI version. Both interfaces use the QDMI release version; application–driver compatibility compares major/minor and ignores patch. The ABI macro and its documentation live together in client.h.

QDMI_DEVICE_PROPERTY_ID is the single client-visible identity. Drivers supply configured IDs, overriding device defaults as needed. Device-side reporting stays optional. Configured top-level devices have IDs; child devices may forward a device-reported ID or return NOTSUPPORTED. The example and template report their default stable identifiers, and documentation explains which driver and configuration to record with a saved ID.

Validation: release build and 97 CTest cases passed (expected read-only skips); repository lint, C11 header consumption, and Doxygen passed. The canonical configuration-path fix, optional example-driver authentication, and final-session library cleanup are included here because they repair this driver foundation. Core #2229 now reuses QDMI's example driver for runtime tests. The example uses native Windows loading and POSIX loading; the Windows paths are covered by Core's hosted Windows jobs. The downstream Core/provider changes demonstrate installed C++ and Python applications using standard QDMI symbols with interchangeable drivers.

QDMI commit: ffde5f4aa09e70b681a79418c5071eb65ba8121d. All 19 hosted checks passed on this head.

AI assistance: Codex prepared and validated these changes; human review remains required.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • I have disclosed the use of AI tools in the PR description as per our AI Usage Guidelines.
  • AI-assisted commits include an Assisted-by: [Model Name] via [Tool Name] footer.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@burgholzer burgholzer added minor Changes that warrant a minor version release feature New feature or feature request labels Aug 24, 2026
@burgholzer burgholzer self-assigned this Aug 24, 2026
@burgholzer burgholzer added minor Changes that warrant a minor version release feature New feature or feature request labels Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://Munich-Quantum-Software-Stack.github.io/QDMI/pr-preview/pr-511/

Built to branch gh-pages at 2026-09-28 06:20 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@codecov

codecov Bot commented Aug 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.17647% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
examples/driver/qdmi_example_driver.cpp 91.1% 9 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff            @@
##           develop    #511     +/-   ##
=========================================
+ Coverage     90.6%   91.1%   +0.5%     
=========================================
  Files            6       6             
  Lines          745     778     +33     
  Branches       145     157     +12     
=========================================
+ Hits           675     709     +34     
+ Misses          70      69      -1     
Flag Coverage Δ
cpp 91.1% <91.1%> (+0.5%) ⬆️
Files with missing lines Coverage Δ
examples/device/src/cxx_device.cpp 94.2% <ø> (ø)
examples/driver/qdmi_example_driver.cpp 94.7% <91.1%> (+1.2%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

burgholzer added a commit that referenced this pull request Aug 24, 2026
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer burgholzer added this to the v1.4.0 milestone Aug 24, 2026

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly looking good already. There's a few minor things that I would like to fix.

Comment thread examples/device/README.md Outdated
Comment thread include/qdmi/client.h Outdated
Comment thread templates/device/README.md Outdated
Comment thread test/test_program_feature.c Outdated
Comment thread test/test_qdmi.cpp Outdated
@burgholzer
burgholzer marked this pull request as ready for review August 24, 2026 12:12
burgholzer added a commit that referenced this pull request Aug 24, 2026
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch 2 times, most recently from 95e7fb5 to dcb5742 Compare August 24, 2026 12:49
@burgholzer

Copy link
Copy Markdown
Contributor Author

Okay, this should be good now.

burgholzer added a commit that referenced this pull request Sep 4, 2026
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch from dcb5742 to 8460e91 Compare September 4, 2026 09:38
@burgholzer
burgholzer changed the base branch from codex/multi-program-jobs to develop September 4, 2026 09:39
@burgholzer
burgholzer changed the base branch from develop to v1.4 September 4, 2026 14:52
burgholzer added a commit that referenced this pull request Sep 5, 2026
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch 2 times, most recently from 6591f8e to c7494d6 Compare September 5, 2026 14:40
burgholzer added a commit that referenced this pull request Sep 23, 2026
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch from c7494d6 to b09f3b0 Compare September 23, 2026 13:53
@burgholzer burgholzer changed the title ✨ Add replaceable Client drivers and stable device IDs ✨ Add replaceable QDMI drivers and stable device IDs Sep 23, 2026
@burgholzer
burgholzer changed the base branch from v1.4 to develop September 23, 2026 13:54
Comment thread examples/driver/qdmi_example_driver.cpp Fixed
Comment thread docs/examples.md Outdated
Comment thread include/qdmi/client.h Outdated
@burgholzer
burgholzer requested a review from ystade September 25, 2026 13:40
@burgholzer

Copy link
Copy Markdown
Contributor Author

@ystade After quite some iteration, the next PR in this series towards the 1.4 release is ready across the board. I hope this is fairly uncontroversial. Looking forward to your feedback!

@burgholzer burgholzer mentioned this pull request Sep 25, 2026
11 tasks
@burgholzer
burgholzer added this pull request to stack #557 September 27, 2026 20:35
burgholzer added a commit that referenced this pull request Sep 27, 2026
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch from 8eb74de to 76d12d3 Compare September 27, 2026 20:54
Export the complete Client interface, add a pure ABI query and stable device IDs, and make example-driver initialization transactional and retryable.

Assisted-by: GPT-5.6 Sol via Codex
Add the direct standard-library includes, make the owning device wrapper noncopyable, and use explicit C boundary representations in tests.

Assisted-by: GPT-5.6 Sol via Codex
Test duplicate library registration, device initialization failure, and the default configuration path. Simplify allocation to its specified out-of-memory result and attribute the Client ABI changes to PR #511.

Assisted-by: GPT-5.6 Sol via Codex
Generate the public Client ABI macro from the CMake project version, install and document the generated header, remove duplicated test constants, and apply the device-package wording suggestions.

Assisted-by: GPT-5.6 Sol via Codex
Use driver and stable-ID terminology, report the CMake default ID in the example and device template, and document the generated Client Interface ABI macro beside its definition.

Assisted-by: GPT-6 via Codex
Require driver-supplied stable IDs for configured top-level devices. Child devices may omit IDs without adding provider requirements or generated identities.

Assisted-by: GPT-6 via Codex
Use the same canonical path for the allowlist check and file access instead of reopening the environment-variable spelling. Cover rejection outside the allowed directory in the existing initialization retry test.

Assisted-by: GPT-6 via Codex
Document stable identifiers and per-session driver ownership, keep the ABI constant in the public header, and reuse the configured device prefix.

Assisted-by: GPT-6 via Codex
Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
Use the native Windows library loader so downstream clients can exercise the QDMI example driver on every supported platform. Retain POSIX loading and link its platform library explicitly.

Assisted-by: GPT-6 via Codex
List the replaceable ABI, stable device IDs, and Windows example-driver loading separately.

Assisted-by: GPT-6 via Codex
Release loaded device libraries when the last driver session closes, so device
finalizers run before process-wide dependencies shut down. Accept a device's
NOTSUPPORTED response to the token parameter while still propagating actual
authentication failures. Extend the existing initialization test to cover
library lifetime and reload.

Assisted-by: GPT-6 via Codex
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch from 76d12d3 to ffde5f4 Compare September 28, 2026 06:19

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or feature request minor Changes that warrant a minor version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants