✨ Add configurable QDMI device discovery - #1912
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
MatthiasReumann
previously requested changes
Jul 16, 2026
MatthiasReumann
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the effort 🙏
I've left one small remark, otherwise I think this one looks good 👍🏻
burgholzer
force-pushed
the
codex/qdmi-configuration-foundation
branch
from
July 16, 2026 14:03
a7e64c8 to
1f751ea
Compare
burgholzer
force-pushed
the
codex/qdmi-configuration-foundation
branch
from
July 24, 2026 18:28
86a14a3 to
ee76cdc
Compare
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
burgholzer
force-pushed
the
codex/qdmi-configuration-foundation
branch
from
July 24, 2026 22:55
ee76cdc to
f517297
Compare
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6-terra via Codex
Document that higher-precedence configuration must explicitly re-enable a device and cover both inherited-disable and explicit-enable behavior. Assisted-by: GPT-5.6-sol via Codex
This was referenced Jul 27, 2026
Use QDMI-owned target property names so independent device implementations can advertise their stable identifier and symbol prefix without coupling their exported CMake targets to MQT Core. Remove the source-tree discovery artifact ignore now that the underlying CMake behavior is being extracted separately. Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
This was referenced Jul 27, 2026
Preserve the filesystem-path contract in the new Python device definition API so callers can pass os.PathLike values and receive pathlib.Path objects without lossy string conversions. Assisted-by: GPT-5.6 via Codex
Describe disabled-ID fallback semantics consistently and remove stale iteration details from the completed execution plan. Assisted-by: GPT-5.6-sol via Codex
burgholzer
added a commit
that referenced
this pull request
Jul 27, 2026
🤖 *AI text below* 🤖 ## Description CMake 4.3 writes a `cmake_test_discovery_*.json` bookkeeping file to the directory passed to `gtest_discover_tests(WORKING_DIRECTORY ...)`. Our test helpers passed source directories there because the same argument also controls the runtime working directory of each discovered test. As a result, configuring and building tests could dirty the source tree. Run GoogleTest discovery from the current binary directory so the bookkeeping file remains a build artifact. Preserve the existing runtime working directory by setting the discovered tests' `WORKING_DIRECTORY` property separately. The property name is deferred through a generator expression so CMake's argument parser does not interpret it as a second discovery option. This is extracted from #1912 because it is independent of the QDMI configuration work. ## Validation - Configured and built representative targets with CMake 4.3.2. - Confirmed that no `cmake_test_discovery_*.json` files appear outside `build/`. - Confirmed that the ordinary helper still runs a FoMaC test from its source directory. - Confirmed that the custom-working-directory helper still runs an IR test from its configured build directory. - `uvx nox -s lint` - `git diff --check` ## Checklist - [x] The pull request only contains commits that are focused and relevant to this change. - [x] I have added appropriate tests that cover the new/changed functionality. (Existing tests exercise both helper variants.) - [x] I have updated the documentation to reflect these changes. (No user-facing documentation change is needed.) - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. (Not user-facing.) - [x] I have added migration instructions to the upgrade guide (if needed). (No migration is needed.) - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. (Local checks pass; CI is pending.) - [x] I have reviewed my own code changes. **If PR contains AI-assisted content:** - [x] Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our [AI Usage Guidelines](https://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md). - [x] Every agent-authored or agent-edited public text body begins with the visible disclosure `🤖 *AI text below* 🤖` (titles are exempt). - [x] AI-assisted commits include an `Assisted-by: [Model Name] via [Tool Name]` footer. - [x] I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.
burgholzer
added a commit
that referenced
this pull request
Jul 29, 2026
🤖 *AI text below* 🤖 ## Description Complete the public `qdmi::toString` mappings for the child-device session parameter and device property introduced with child-device support. This keeps diagnostics and property-name formatting exhaustive for the current QDMI enum surface. This small fix was identified while reviewing #1912 and is extracted because it has no dependency on configurable device discovery. The existing child-device changelog entry now also attributes this follow-up to #1952 and retains the original human author attribution. ## Validation - Focused child-device string-conversion tests: 2 passed - Complete FoMaC C++ test binary: 171 passed - `uvx nox -s lint` - `git diff --check` ## Checklist - [x] The pull request only contains commits that are focused and relevant to this change. - [x] I have added appropriate tests that cover the changed functionality. - [x] Documentation and migration guidance are not needed for this diagnostic-string completion. - [x] The existing changelog entry includes this PR and all human authors. - [x] The change follows the project's style guidelines and introduces no new warnings. - [x] The changes are fully tested and pass the relevant local checks. - [x] I have reviewed my own code changes. **If PR contains AI-assisted content:** - [x] Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our [AI Usage Guidelines](https://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md). - [x] Every agent-authored or agent-edited public text body begins with the visible disclosure `🤖 *AI text below* 🤖` (titles are exempt). - [x] AI-assisted commits include an `Assisted-by: [Model Name] via [Tool Name]` footer. - [x] I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.
Integrate the mandatory LLVM/MLIR and unconditional QIR build from #1953. Assisted-by: GPT-5.6-sol via Codex
Build the mandatory MLIR Python binding through the aggregate wheel target and generate its stub without probing for availability. Assisted-by: GPT-5.6-sol via Codex
Draft
4 tasks
burgholzer
marked this pull request as ready for review
July 29, 2026 18:00
burgholzer
dismissed
MatthiasReumann’s stale review
July 29, 2026 18:01
Dismissing as stale.
This has been polished quite a bit. It should now be ready to go in.
burgholzer
enabled auto-merge (squash)
July 29, 2026 18:53
burgholzer
added a commit
that referenced
this pull request
Jul 29, 2026
🤖 *AI text below* 🤖 ## Summary - add exact-byte FoMaC submission and retrieval for binary QDMI programs while preserving null-terminated text handling - expose the complete standard QDMI program-format enum in Python and enforce text/binary representation contracts - let embedding projects reuse an existing `spdlog::spdlog` target when adding MQT Core as a subdirectory - exercise textual QASM and real QIR bitcode paths through the DDSIM QDMI device ## Context This is an independent prerequisite for the QDMI integration in NVIDIA/cuda-quantum#4882. It does not depend on #1912 and can merge separately. Stable-ID device registration and selective provider composition remain part of #1912. QIR support is provided unconditionally by MQT Core following #1953; this PR does not add feature or capability negotiation. ## Validation - release configure and focused build with LLVM/MLIR 22.1.3 - 172 native FoMaC tests - 47 DDSIM QDMI device tests, including QIR string and binary profiles - 178 focused Python FoMaC tests - focused parent-provided `spdlog::spdlog` CMake configure test - full repository lint - warning-as-error documentation build --------- Signed-off-by: Lukas Burgholzer <burgholzer@me.com>
burgholzer
added a commit
to Munich-Quantum-Software-Stack/QDMI
that referenced
this pull request
Jul 29, 2026
🤖 *AI text below* 🤖 ## Description Add the QDMI-owned `configure_qdmi_device_target` CMake helper for publishing a device target's stable ID and symbol prefix through the neutral `QDMI_DEVICE_ID` and `QDMI_DEVICE_PREFIX` target properties. The properties are preserved when the target is exported and installed. Update the C++ example and generated device template to use the helper. Newly generated projects receive an overridable `<PREFIX>_QDMI_DEVICE_ID` with the default `<lowercase-prefix>.default`, and document why that identifier should remain stable. This is the QDMI side of [MQT Core #1912](munich-quantum-toolkit/core#1912), which is the first consumer of this metadata. Device implementations do not gain a build-time or runtime dependency on MQT Core. ## Checklist - [x] The pull request only contains commits that are focused and relevant to this change. - [x] I have added appropriate tests that cover the new/changed functionality. - [x] I have updated the documentation to reflect these changes. - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] I have added migration instructions to the upgrade guide (if needed). - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. **If PR contains AI-assisted content:** - [x] I have disclosed the use of AI tools in the PR description as per our [AI Usage Guidelines](https://munich-quantum-software-stack.github.io/QDMI/latest/md_docs_2ai__usage.html). - [x] AI-assisted commits include an `Assisted-by: [Model Name] via [Tool Name]` footer. - [x] I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.
12 tasks
burgholzer
added a commit
that referenced
this pull request
Jul 30, 2026
🤖 *AI text below* 🤖 ## Description Backport selected changes from `main` to the maintained `v3.x` branch in preparation for MQT Core 3.8.0. The commits are kept separate by upstream change wherever practical. The series includes: - configurable QDMI device discovery and stable-ID registration from #1912 - binary-safe FoMaC/QDMI program handling from #1957 - CMake subproject composability and individually selectable bundled QDMI devices from the current #1965 head (`cdc740398e472c19b585cf6dbd7d41de053d84a6`) - optional QIR support for the DDSIM QDMI device and the associated QIR runtime improvements - native RCCX support and the bottom-up DD construction path - Python CI performance improvements from #1944 - template synchronization through #1964, agent/contributor guide updates, dependency and pre-commit updates, and related maintenance ## v3 compatibility This backport deliberately preserves the v3 architecture: - LLVM/MLIR remains optional and continues to use LLVM/MLIR 21. - QIR support is available behind the existing MLIR-dependent feature flags. - The mandatory LLVM/MLIR 22 transition from #1953 and compiler-collection changes that depend on the v4 MLIR/QCO redesign are not included. - #1965 is adapted to retain optional MLIR and the v3 documentation roles while preserving its CMake and QDMI behavior. ## Validation - configured and built the complete non-MLIR library - configured the MLIR build against LLVM/MLIR 21.1.8 - built and ran focused DD, FoMaC, QDMI driver/registry/device, and QIR tests - verified 435 #1965-affected C++ test cases, with two expected device capability skips - configured MQT Core as an embedded CMake subproject with all bundled devices disabled by default - configured an embedded build with only the DDSIM QDMI device enabled - built and ran the device-free registry suite: 11 tests passed - focused Python FoMaC suite: 181 passed, two expected non-MLIR skips - regenerated Python stubs without a diff - complete lint, lockfile validation, commit-signature audit, and `git diff --check` passed The pre-existing v3 test configuration still requires `llc` even when MLIR is disabled. The non-MLIR library build itself succeeds; MLIR/QIR validation used LLVM/MLIR 21. ## Checklist - [x] The pull request only contains commits that are focused and relevant to this change. - [x] I have added appropriate tests that cover the new/changed functionality. - [x] I have updated the documentation to reflect these changes. - [x] I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals. - [x] I have added migration instructions to the upgrade guide (if needed). - [x] The changes follow the project's style guidelines and introduce no new warnings. - [x] The changes are fully tested and pass the CI checks. - [x] I have reviewed my own code changes. **If PR contains AI-assisted content:** - [x] Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines. - [x] Every agent-authored or agent-edited public text body begins with the visible disclosure `🤖 *AI text below* 🤖` (titles are exempt). - [x] I have disclosed AI assistance in the PR description. - [x] I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it. --------- Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Signed-off-by: Lukas Burgholzer <burgholzer@me.com> Signed-off-by: Roberto Turrado Camblor <rturrado@gmail.com> Signed-off-by: rturrado <rturrado@gmail.com> Co-authored-by: mqt-app[bot] <219534693+mqt-app[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Daniel Haag <121057143+denialhaag@users.noreply.github.com> Co-authored-by: simon1hofmann <119581649+simon1hofmann@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Roberto Turrado Camblor <rturrado@gmail.com> Co-authored-by: Yannick Stade <100073938+ystade@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Summary
This PR extracts the additive, MQT Core 3.x-compatible QDMI configuration
foundation from #1901. It adds stable device identities and configurable
discovery while retaining the current client interface,
qdmi::Driver, FoMaC,Qiskit, and neutral-atom APIs.
The breaking object-model refactor remains in #1901 and will be rebased onto
this foundation.
What changed
qdmi.json,[tool.qdmi], environmentconfiguration, packaged fragments, and C++ runtime overrides.
disabled-ID reservation, strict validation, relative-path resolution, and
explicit or isolated configuration modes.
opens create independent sessions and apply per-call overrides without
changing the configured client catalog.
QDMI_DEVICE_ID,QDMI_DEVICE_PREFIX, andQDMI_MANIFEST_NAMECMake targetmetadata. Installed consumers can copy selected device runtimes without
project-specific loader code.
static-consumer workflows.
Compatibility and impact
The public QDMI client C interface,
MQT::CoreQDMIDriver, the FoMaC objectmodel, and the existing Qiskit and neutral-atom APIs remain available. The
unstable C++
Driver::addDynamicDeviceLibraryand Pythonadd_dynamic_device_libraryentry points are replaced byDeviceDefinitionregistration and stable-ID opening;
UPGRADING.mddocuments that migration.Configuration discovery and registration do not load device code. A library is
loaded when a stable ID is explicitly opened or when the configured client
catalog is first materialized. Separately installed device wheels are not
scanned automatically; they can register a fallback definition or have their
runtime and generated fragment colocated by the consuming build.
Validation
uvx nox -s lintgit diff --checkFixes #1362
Fixes #1363