Skip to content

⬆️ Update QDMI to latest version from stable v1.2.x branch#1593

Merged
burgholzer merged 4 commits intomainfrom
qdmi-v122-fixes
Mar 30, 2026
Merged

⬆️ Update QDMI to latest version from stable v1.2.x branch#1593
burgholzer merged 4 commits intomainfrom
qdmi-v122-fixes

Conversation

@burgholzer
Copy link
Copy Markdown
Member

Description

This PR updates QDMI to the latest version from the stable 1.2.x branch, which should be fairly close to the actual 1.2.2 release.
The biggest change here is that device now no longer need to directly link against qdmi::qdmi, but are rather self-contained.

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 this to the QDMI Support milestone Mar 30, 2026
@burgholzer burgholzer self-assigned this Mar 30, 2026
@burgholzer burgholzer added dependencies Pull requests that update a dependency file c++ Anything related to C++ code QDMI Anything related to QDMI backport-potential Changes to be backported to the stable branch labels Mar 30, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 30, 2026

📝 Walkthrough

Summary by CodeRabbit

Release Notes

  • Dependencies

    • Updated QDMI library dependency from v1.2.1 to v1.2.2
  • Documentation

    • Improved source code documentation with updated Doxygen comments across device implementations
  • Chores

    • Refactored build configuration for better module organization and symbol visibility management
    • Reorganized internal header dependencies for improved code structure

Walkthrough

This PR updates the QDMI dependency from version 1.2.1 to 1.2.2, adjusts CMake device library configurations to remove direct qdmi::qdmi dependencies and add export macros with hidden visibility settings, updates test includes to use mqt_ddsim_qdmi headers, and improves source file documentation comments.

Changes

Cohort / File(s) Summary
Version & Changelog Updates
CHANGELOG.md, cmake/ExternalDependencies.cmake
Updated QDMI from v1.2.1 to v1.2.2 with corresponding Git revision; added changelog entry documenting the update.
Device CMake Configurations
src/qdmi/devices/dd/CMakeLists.txt, src/qdmi/devices/na/CMakeLists.txt, src/qdmi/devices/sc/CMakeLists.txt
Removed qdmi::qdmi from PUBLIC link dependencies; added ${QDMI_PREFIX}_QDMI_device_EXPORTS compile definition; conditionally added static define when not building shared libs; set hidden symbol visibility presets on all device targets.
Header Include Updates
include/mqt-core/qdmi/common/Common.hpp, test/qdmi/devices/dd/*
Removed #include <qdmi/constants.h> from Common.hpp; migrated test files to use #include "mqt_ddsim_qdmi/constants.h" instead of #include <qdmi/constants.h>.
Device Implementation Documentation
src/qdmi/devices/dd/Device.cpp, src/qdmi/devices/na/App.cpp, src/qdmi/devices/na/Device.cpp, src/qdmi/devices/na/DynDevice.cpp, src/qdmi/devices/na/Generator.cpp, src/qdmi/devices/sc/App.cpp, src/qdmi/devices/sc/Device.cpp, src/qdmi/devices/sc/DynDevice.cpp, src/qdmi/devices/sc/Generator.cpp
Updated or added Doxygen @file headers with specific filenames and brief descriptions; no functional code changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • ystade

🐰 A version hop, from one-two-one to two so spry,
Constants migrate, as dependencies fly,
Visibility hidden, exports declared clear,
The device libraries now stand without fear! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: updating QDMI to the latest version from the stable v1.2.x branch, which aligns with the primary objective outlined in PR description.
Description check ✅ Passed The PR description includes a summary of the change, explains the motivation (devices no longer directly link against qdmi::qdmi), and all checklist items are marked complete, indicating comprehensive preparation for merge.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch qdmi-v122-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/qdmi/devices/na/CMakeLists.txt`:
- Around line 189-198: The target compile definitions and visibility properties
are being applied to ${TARGET_NAME} instead of the dynamic library target,
leaving ${DYN_TARGET_NAME} without export macros or hidden visibility; update
the block so that target_compile_definitions(...) uses ${DYN_TARGET_NAME} with
the dynamic export macro (e.g., MQT_NA_DYN_QDMI_device_EXPORTS) and
set_target_properties(...) applies
C_VISIBILITY_PRESET/CXX_VISIBILITY_PRESET/CXX_VISIBILITY_INLINES_HIDDEN to
${DYN_TARGET_NAME} rather than ${TARGET_NAME}, keeping this change inside the
existing if(NOT TARGET ${DYN_TARGET_NAME}) scope.

In `@src/qdmi/devices/sc/CMakeLists.txt`:
- Around line 186-195: The compile definitions and visibility properties are
being applied to ${TARGET_NAME} but should be applied to the dynamic library
target ${DYN_TARGET_NAME}; update the two calls that reference ${TARGET_NAME}
(the target_compile_definitions(...) and set_target_properties(...)) to use
${DYN_TARGET_NAME} so the dynamic library gets the export macro and hidden
visibility settings (these lines are the ones inside the if(NOT TARGET
${DYN_TARGET_NAME}) block).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4eb90655-dfb4-45bb-9c43-9da82a64f299

📥 Commits

Reviewing files that changed from the base of the PR and between 0d8ad59 and a2e428d.

📒 Files selected for processing (3)
  • src/qdmi/devices/dd/CMakeLists.txt
  • src/qdmi/devices/na/CMakeLists.txt
  • src/qdmi/devices/sc/CMakeLists.txt

Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Signed-off-by: burgholzer <burgholzer@me.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/qdmi/devices/dd/CMakeLists.txt`:
- Around line 60-65: Replace the incorrect CMake property name
CXX_VISIBILITY_INLINES_HIDDEN with the correct VISIBILITY_INLINES_HIDDEN in the
set_target_properties call for ${TARGET_NAME}; keep the value (1) and the
surrounding visibility presets (C_VISIBILITY_PRESET and CXX_VISIBILITY_PRESET)
unchanged so inline symbol hiding is actually applied.

In `@src/qdmi/devices/na/CMakeLists.txt`:
- Around line 142-147: Replace the non-existent CMake property
CXX_VISIBILITY_INLINES_HIDDEN with the documented VISIBILITY_INLINES_HIDDEN in
the set_target_properties call for ${TARGET_NAME}; update both visibility blocks
where CXX_VISIBILITY_INLINES_HIDDEN is used so the project uses
VISIBILITY_PRESET hidden / C_VISIBILITY_PRESET hidden and
VISIBILITY_INLINES_HIDDEN 1 to ensure inline symbols are actually hidden across
languages.

In `@src/qdmi/devices/sc/CMakeLists.txt`:
- Around line 139-144: The CMake visibility blocks setting target properties for
${TARGET_NAME} use the undocumented property CXX_VISIBILITY_INLINES_HIDDEN which
is ignored; replace that property with the correct, language-agnostic
VISIBILITY_INLINES_HIDDEN in both visibility blocks where set_target_properties
is used (the block that sets C_VISIBILITY_PRESET and CXX_VISIBILITY_PRESET and
the second analogous block), keeping the rest of the properties intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a1c43c31-1c42-4d45-ac6b-85cb6bf1aada

📥 Commits

Reviewing files that changed from the base of the PR and between dd74c2f and 42b86f4.

📒 Files selected for processing (3)
  • src/qdmi/devices/dd/CMakeLists.txt
  • src/qdmi/devices/na/CMakeLists.txt
  • src/qdmi/devices/sc/CMakeLists.txt

…ibility

Signed-off-by: burgholzer <burgholzer@me.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@cmake/ExternalDependencies.cmake`:
- Around line 96-99: The cached variables QDMI_VERSION and QDMI_REV are set
without FORCE so reconfigures won’t update them; change the set(...) calls for
QDMI_VERSION and QDMI_REV to use the CACHE STRING ... FORCE form (i.e., add
FORCE to the set invocations that define QDMI_VERSION and QDMI_REV) so that
updating the pinned version/revision will overwrite the existing CMake cache
entry and FetchContent will fetch the new commit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3afe7063-b381-4e9f-882d-6b9f69c5c7fd

📥 Commits

Reviewing files that changed from the base of the PR and between 42b86f4 and 7039bdf.

📒 Files selected for processing (26)
  • CHANGELOG.md
  • cmake/ExternalDependencies.cmake
  • include/mqt-core/qdmi/common/Common.hpp
  • src/qdmi/devices/dd/CMakeLists.txt
  • src/qdmi/devices/dd/Device.cpp
  • src/qdmi/devices/na/App.cpp
  • src/qdmi/devices/na/CMakeLists.txt
  • src/qdmi/devices/na/Device.cpp
  • src/qdmi/devices/na/DynDevice.cpp
  • src/qdmi/devices/na/Generator.cpp
  • src/qdmi/devices/sc/App.cpp
  • src/qdmi/devices/sc/CMakeLists.txt
  • src/qdmi/devices/sc/Device.cpp
  • src/qdmi/devices/sc/DynDevice.cpp
  • src/qdmi/devices/sc/Generator.cpp
  • test/qdmi/devices/dd/concurrency_test.cpp
  • test/qdmi/devices/dd/device_properties_test.cpp
  • test/qdmi/devices/dd/device_status_test.cpp
  • test/qdmi/devices/dd/error_handling_test.cpp
  • test/qdmi/devices/dd/helpers/test_utils.cpp
  • test/qdmi/devices/dd/job_lifecycle_test.cpp
  • test/qdmi/devices/dd/job_parameters_test.cpp
  • test/qdmi/devices/dd/results_probabilities_test.cpp
  • test/qdmi/devices/dd/results_sampling_test.cpp
  • test/qdmi/devices/dd/results_statevector_test.cpp
  • test/qdmi/devices/dd/session_lifecycle_test.cpp
💤 Files with no reviewable changes (1)
  • include/mqt-core/qdmi/common/Common.hpp

@burgholzer burgholzer merged commit bd9f9cb into main Mar 30, 2026
33 checks passed
@burgholzer burgholzer deleted the qdmi-v122-fixes branch March 30, 2026 20:39
mergify bot pushed a commit that referenced this pull request Mar 30, 2026
## Description

This PR updates QDMI to the latest version from the stable 1.2.x branch,
which should be fairly close to the actual 1.2.2 release.
The biggest change here is that device now no longer need to directly
link against `qdmi::qdmi`, but are rather self-contained.

## Checklist

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [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://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [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.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
(cherry picked from commit bd9f9cb)

# Conflicts:
#	CHANGELOG.md
#	include/mqt-core/qdmi/common/Common.hpp
#	test/qdmi/devices/dd/concurrency_test.cpp
#	test/qdmi/devices/dd/device_properties_test.cpp
#	test/qdmi/devices/dd/device_status_test.cpp
#	test/qdmi/devices/dd/helpers/test_utils.cpp
#	test/qdmi/devices/dd/job_parameters_test.cpp
#	test/qdmi/devices/dd/results_probabilities_test.cpp
#	test/qdmi/devices/dd/results_sampling_test.cpp
#	test/qdmi/devices/dd/results_statevector_test.cpp
@burgholzer
Copy link
Copy Markdown
Member Author

@Mergifyio backport v3.x

@mergify
Copy link
Copy Markdown

mergify bot commented Mar 30, 2026

backport v3.x

✅ Backports have been created

Details

Cherry-pick of bd9f9cb has failed:

On branch mergify/bp/v3.x/pr-1593
Your branch is up to date with 'origin/v3.x'.

You are currently cherry-picking commit bd9f9cb4.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   cmake/ExternalDependencies.cmake
	modified:   include/mqt-core/qdmi/common/Common.hpp
	modified:   src/qdmi/devices/dd/CMakeLists.txt
	modified:   src/qdmi/devices/dd/Device.cpp
	modified:   src/qdmi/devices/na/App.cpp
	modified:   src/qdmi/devices/na/CMakeLists.txt
	modified:   src/qdmi/devices/na/Device.cpp
	modified:   src/qdmi/devices/na/DynDevice.cpp
	modified:   src/qdmi/devices/na/Generator.cpp
	modified:   src/qdmi/devices/sc/App.cpp
	modified:   src/qdmi/devices/sc/CMakeLists.txt
	modified:   src/qdmi/devices/sc/Device.cpp
	modified:   src/qdmi/devices/sc/DynDevice.cpp
	modified:   src/qdmi/devices/sc/Generator.cpp
	modified:   test/qdmi/devices/dd/concurrency_test.cpp
	modified:   test/qdmi/devices/dd/device_properties_test.cpp
	modified:   test/qdmi/devices/dd/device_status_test.cpp
	modified:   test/qdmi/devices/dd/error_handling_test.cpp
	modified:   test/qdmi/devices/dd/helpers/test_utils.cpp
	modified:   test/qdmi/devices/dd/job_lifecycle_test.cpp
	modified:   test/qdmi/devices/dd/job_parameters_test.cpp
	modified:   test/qdmi/devices/dd/results_probabilities_test.cpp
	modified:   test/qdmi/devices/dd/results_sampling_test.cpp
	modified:   test/qdmi/devices/dd/results_statevector_test.cpp
	modified:   test/qdmi/devices/dd/session_lifecycle_test.cpp

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Mar 30, 2026
## Description

This PR updates QDMI to the latest version from the stable 1.2.x branch,
which should be fairly close to the actual 1.2.2 release.
The biggest change here is that device now no longer need to directly
link against `qdmi::qdmi`, but are rather self-contained.

## Checklist

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [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://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [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.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
(cherry picked from commit bd9f9cb)

# Conflicts:
#	CHANGELOG.md
burgholzer added a commit that referenced this pull request Mar 30, 2026
## Description

This PR updates QDMI to the latest version from the stable 1.2.x branch,
which should be fairly close to the actual 1.2.2 release.
The biggest change here is that device now no longer need to directly
link against `qdmi::qdmi`, but are rather self-contained.

## Checklist

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [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://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [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.

---------

Signed-off-by: burgholzer <burgholzer@me.com>
(cherry picked from commit bd9f9cb)
Signed-off-by: burgholzer <burgholzer@me.com>

# Conflicts:
#	CHANGELOG.md
mergify bot added a commit that referenced this pull request Mar 30, 2026
…#1593) (#1597)

## Description

This PR updates QDMI to the latest version from the stable 1.2.x branch,
which should be fairly close to the actual 1.2.2 release.
The biggest change here is that device now no longer need to directly
link against `qdmi::qdmi`, but are rather self-contained.

## 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://github.com/munich-quantum-toolkit/core/blob/main/docs/ai_usage.md).
- [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.
<hr>This is an automatic backport of pull request #1593 done by
[Mergify](https://mergify.com).

Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-potential Changes to be backported to the stable branch c++ Anything related to C++ code dependencies Pull requests that update a dependency file QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant