Skip to content

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

Open
burgholzer wants to merge 4 commits into
codex/multi-program-jobsfrom
codex/client-driver-abi-stable-ids
Open

✨ Add replaceable Client drivers and stable device IDs#511
burgholzer wants to merge 4 commits into
codex/multi-program-jobsfrom
codex/client-driver-abi-stable-ids

Conversation

@burgholzer

@burgholzer burgholzer commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

This PR defines a versioned, replaceable Client-driver ABI and stable
client-visible device IDs for QDMI v1.4. It is stacked directly on #509 so MQT
Core can consume one ordered QDMI v1.4 stack.

The Client ABI contract adds:

  • QDMI_driver_get_client_abi_version as a pure compatibility query before
    session allocation.
  • exported Client Interface symbols for replaceable driver libraries.
  • lazy, transactional driver initialization in QDMI_session_alloc, including
    retry after a failed allocation.
  • QDMI_DEVICE_PROPERTY_ID as a mandatory, stable Client Interface property.
    A driver supplies the value when a device does not provide it.
  • an explicit runtime device ID in the example driver configuration.

The stable ID is opaque, nonempty, immutable for one device handle, unique in a
session, and stable across equivalent sessions and process restarts while the
same logical resource exists. It is separate from display names, endpoints,
credentials, library versions, symbol prefixes, and CMake target properties.

Local validation on the final head passes:

  • the release build and all 111 release tests
  • all 111 coverage-build tests
  • focused Client ABI and stable-ID tests
  • Clang 22 changed-line lint
  • uvx prek run -a

Codecov reports 91.4% patch line coverage and 91.05% project line coverage on
the final head. Both required Codecov checks pass.

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-08-24 12:51 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.39785% with 8 lines in your changes missing coverage. Please review.

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

Impacted file tree graph

@@                    Coverage Diff                     @@
##           codex/multi-program-jobs    #511     +/-   ##
==========================================================
+ Coverage                      90.9%   91.4%   +0.5%     
==========================================================
  Files                             7       7             
  Lines                           861     891     +30     
  Branches                        181     192     +11     
==========================================================
+ Hits                            783     815     +32     
+ Misses                           78      76      -2     
Flag Coverage Δ
cpp 91.4% <91.3%> (+0.5%) ⬆️
Files with missing lines Coverage Δ
include/qdmi/constants.h 100.0% <ø> (ø)
examples/driver/qdmi_example_driver.cpp 95.1% <91.3%> (+1.6%) ⬆️
🚀 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
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
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch from 2ce1ffb to 691cc97 Compare August 24, 2026 12:43
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
@burgholzer
burgholzer force-pushed the codex/client-driver-abi-stable-ids branch from 95e7fb5 to dcb5742 Compare August 24, 2026 12:49
@burgholzer

Copy link
Copy Markdown
Contributor Author

Okay, this should be good now.

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.

1 participant