Skip to content

Conversation

@denialhaag
Copy link
Member

@denialhaag denialhaag commented Dec 22, 2025

Description

This PR copies over some changes from #1356 so that the latter becomes a bit leaner and more focused on relevant changes.

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.

@denialhaag denialhaag self-assigned this Dec 22, 2025
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

πŸ“ Walkthrough

Summary by CodeRabbit

  • New Features

    • Added additional QDMI device targets, including dynamic variants, expanding supported device options.
  • Changed

    • QDMI generators are now built and installed as shared libraries for package builds; generated library output locations standardized.
    • Public target propagation updated to expose the expanded set of QDMI targets.
  • Bug Fixes

    • Ensured all available QDMI device targets are installed in Python package builds.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

This PR centralizes QDMI library creation via an add_mqt_core_library macro, expands and reorders QDMI device targets in pyproject.toml, adjusts NA/SC CMake target propagation and output directories, and adds dynamic QDMI device targets to the propagated MQT_CORE_TARGETS list.

Changes

Cohort / File(s) Summary
QDMI NA CMake
src/qdmi/na/CMakeLists.txt
Replaced explicit add_library(... STATIC)/alias with add_mqt_core_library(...), removed VERSION/SOVERSION/EXPORT_NAME and direct ProjectOptions/Warnings links, set library output dirs, switched MQT_CORE_TARGETS to list(APPEND ...) + PARENT_SCOPE, and added/propagated dynamic (*-dyn) target and alias.
QDMI SC CMake
src/qdmi/sc/CMakeLists.txt
Same pattern as NA: use add_mqt_core_library(...), adjust linkages (nlohmann_json public, spdlog private), remove explicit versioning and C++ standard enforcement, set output dirs, append static and dynamic targets to MQT_CORE_TARGETS, and add dynamic alias.
Python build targets
pyproject.toml
Replaced the prior two QDMI device targets with an expanded, reordered set: now includes mqt-core-qdmi-ddsim-device, mqt-core-qdmi-na-device, mqt-core-qdmi-na-device-dyn, mqt-core-qdmi-sc-device, mqt-core-qdmi-sc-device-dyn (removed previous simpler ordering).
Release notes
CHANGELOG.md
Updated changelog to reflect building spdlog and QDMI generators as shared libs in Python package builds, note installation of all QDMI device targets, and added PR reference #1403.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • #1406: Modifies QDMI dynamic device library creation and CMake propagationβ€”overlaps dynamic target handling changes.
  • #1236: Adjusts NA/SC QDMI CMake targets to use macro-based library creation and updates linkages/output directories.

Suggested labels

QDMI, packaging, dependencies

Poem

🐰 In CMake burrows I hop and peep,
New targets sprout where old ones sleep,
Macros weave libs both stout and spry,
Dyn devices twinkle, build and fly,
Packaging snug β€” I nibble and leap!

Pre-merge checks

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The description includes an overview, references the source PR for context, and completes most checklist items. However, changelog entries were marked as struck-through/deferred despite actual CHANGELOG.md changes in the PR. Clarify whether changelog entries were intentionally deferred or if the checklist should reflect that CHANGELOG.md was updated. Consider removing strike-through formatting if changes were completed.
βœ… Passed checks (1 passed)
Check name Status Explanation
Title check βœ… Passed The title uses an emoji and describes building QDMI generators as shared libraries, which directly aligns with the main changes in pyproject.toml, CMakeLists.txt files, and CHANGELOG.md.

πŸ“œ Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between e50625a and bfd3120.

πŸ“’ Files selected for processing (1)
  • CHANGELOG.md
🧰 Additional context used
🧠 Learnings (4)
πŸ““ Common learnings
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1403
File: src/qdmi/na/CMakeLists.txt:31-38
Timestamp: 2025-12-28T17:14:53.890Z
Learning: In the munich-quantum-toolkit/core repository, the NA device generator target (mqt-core-qdmi-na-device-gen) is intentionally propagated to MQT_CORE_TARGETS via list(APPEND) because it's publicly linked to the NA device library (the NA device uses a public function from the generator). The SC device generator is not propagated because it has no such dependency with the SC device library.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1403
File: pyproject.toml:98-102
Timestamp: 2025-12-28T17:13:36.900Z
Learning: In the munich-quantum-toolkit/core project, scikit-build-core is intelligent enough to skip build targets listed in pyproject.toml that don't exist for a given platform, so platform-specific targets (like `-dyn` targets conditioned on `NOT WIN32`) can be unconditionally listed in `build.targets` without causing Windows build failures.
πŸ“š Learning: 2025-10-14T14:37:38.047Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.

Applied to files:

  • CHANGELOG.md
πŸ“š Learning: 2025-11-04T14:28:32.371Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_backend.py:0-0
Timestamp: 2025-11-04T14:28:32.371Z
Learning: In the munich-quantum-toolkit/core repository, at least one FoMaC device is always available during testing, so skip logic for missing devices in QDMI Qiskit backend tests is not necessary.

Applied to files:

  • CHANGELOG.md
πŸ“š Learning: 2025-12-05T17:45:37.602Z
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.

Applied to files:

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04-arm, gcc, Release) / 🐧 ubuntu-24.04-arm gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Debug) / 🐧 ubuntu-24.04 gcc Debug
  • GitHub Check: 🐍 Test (ubuntu-24.04) / 🐍 ubuntu-24.04
  • GitHub Check: 🐍 Test (ubuntu-24.04-arm) / 🐍 ubuntu-24.04-arm
  • GitHub Check: 🐍 Test (macos-14) / 🐍 macos-14
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Debug) / 🍎 macos-14 clang Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Release) / 🐧 ubuntu-24.04 gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-15-intel, clang, Release) / 🍎 macos-15-intel clang Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Debug) / 🏁 windows-2022 msvc Debug
  • GitHub Check: 🐍 Test (windows-2022) / 🐍 windows-2022
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Release) / 🍎 macos-14 clang Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-11-arm, msvc, Release) / 🏁 windows-11-arm msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Release) / 🏁 windows-2022 msvc Release
  • GitHub Check: πŸ‡¨β€Œ Coverage / πŸ“ˆ Coverage
  • GitHub Check: 🐍 Lint / 🚨 Lint
  • GitHub Check: πŸ‡¨β€Œ Lint / 🚨 Lint
πŸ”‡ Additional comments (1)
CHANGELOG.md (1)

29-29: Changelog entries are properly formatted and grammar is corrected.

The changes follow the project's changelog conventions:

  • Line 29 (Changed section): The grammar error from the previous version has been correctly fixedβ€”"as shared libraries" (plural, no article) is now grammatically correct.
  • Line 51 (Fixed section): The new entry about installing all QDMI device targets is clearly written and consistently formatted with emoji, description, PR reference, and author attribution.
  • Line 296 (PR links): The reference to [πŸ‘¨β€πŸ’»πŸ“¦ build QDMI generators as shared libraries on installΒ #1403] is correctly placed in alphabetical order within the PR links section.

Also applies to: 51-51, 296-296


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
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: 4

πŸ“œ Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 4029d09 and fd7d995.

πŸ“’ Files selected for processing (8)
  • cmake/AddMQTCoreLibrary.cmake
  • cmake/ExternalDependencies.cmake
  • pyproject.toml
  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
  • test/qir/runner/test_qir_runner.cpp
  • test/qir/runtime/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (6)
πŸ““ Common learnings
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.
πŸ“š Learning: 2025-11-03T23:09:26.881Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • cmake/AddMQTCoreLibrary.cmake
  • cmake/ExternalDependencies.cmake
  • src/qdmi/sc/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-12-07T09:10:31.836Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • pyproject.toml
  • src/qdmi/sc/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-10-10T08:09:54.528Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.

Applied to files:

  • pyproject.toml
  • cmake/ExternalDependencies.cmake
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-17T11:09:50.147Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_site_handling.py:162-173
Timestamp: 2025-10-17T11:09:50.147Z
Learning: For QDMI tests that reference a specific named device via fixture (e.g., "MQT NA Default QDMI Device"), it is acceptable to hard-code device-specific values such as zone counts and indices, as these tests are intentionally coupled to that device's structure and serve as structural invariant checks.

Applied to files:

  • pyproject.toml
πŸ“š Learning: 2025-12-05T15:57:39.701Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 3
File: lib/Conversion/CatalystQuantumToMQTOpt/CMakeLists.txt:22-25
Timestamp: 2025-12-05T15:57:39.701Z
Learning: The munich-quantum-toolkit projects (core and core-plugins-catalyst) use `file(GLOB_RECURSE ...)` patterns in CMakeLists.txt files to collect header files, following an established convention in the parent repository for consistency across the codebase.

Applied to files:

  • src/qdmi/sc/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Debug) / 🏁 windows-2022 msvc Debug
  • GitHub Check: 🐍 Test (windows-2022) / 🐍 windows-2022
  • GitHub Check: 🐍 Test (ubuntu-24.04) / 🐍 ubuntu-24.04
  • GitHub Check: 🐍 Test (ubuntu-24.04-arm) / 🐍 ubuntu-24.04-arm
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04-arm, gcc, Release) / 🐧 ubuntu-24.04-arm gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-11-arm, msvc, Release) / 🏁 windows-11-arm msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Release) / 🐧 ubuntu-24.04 gcc Release
  • GitHub Check: 🐍 Test (macos-15-intel) / 🐍 macos-15-intel
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Release) / 🍎 macos-14 clang Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Debug) / 🐧 ubuntu-24.04 gcc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Release) / 🏁 windows-2022 msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-15-intel, clang, Release) / 🍎 macos-15-intel clang Release
  • GitHub Check: πŸ‡¨β€Œ Lint / 🚨 Lint
  • GitHub Check: 🐍 Lint / 🚨 Lint
  • GitHub Check: πŸ‡¨β€Œ Coverage / πŸ“ˆ Coverage
πŸ”‡ Additional comments (9)
test/qir/runtime/CMakeLists.txt (1)

24-24: LGTM! Good defensive practice for object-file-based executables.

Explicitly setting LINKER_LANGUAGE to CXX is essential here because the executable is created from a pre-compiled .o file without direct source files. CMake cannot reliably infer the linker language from object files alone, and this directive ensures the correct C++ linker is used, especially since the target links against the C++ library MQT::CoreQIRRuntime.

cmake/ExternalDependencies.cmake (2)

97-98: LGTM - Appropriate gating for shared spdlog build.

The cmake_dependent_option correctly enables shared spdlog builds only when BUILD_MQT_CORE_SHARED_LIBS is enabled, with a sensible default of OFF otherwise.


105-110: Good alignment of spdlog output directories.

Setting the output directories ensures spdlog shared libraries end up alongside other MQT libraries, which is essential for proper RUNPATH resolution at runtime. The if(TARGET spdlog) guard correctly handles the case where spdlog might be found via find_package rather than built from source.

src/qdmi/na/CMakeLists.txt (2)

16-38: LGTM - Good refactoring to use centralized macro.

Using add_mqt_core_library eliminates boilerplate for version properties, C++ standard, and warnings linkage. The output directory settings ensure proper library placement.


185-188: Good consolidation of PARENT_SCOPE propagation.

Moving the PARENT_SCOPE propagation to the end of the file ensures all targets (including the conditionally-built dynamic target) are properly exposed to the parent scope.

src/qdmi/sc/CMakeLists.txt (2)

16-35: LGTM - Consistent with NA device configuration.

The refactoring mirrors the NA device configuration, using add_mqt_core_library and setting consistent output directories.


182-185: Good consolidation of PARENT_SCOPE propagation.

Consistent with NA device configuration - ensures all targets including the conditionally-built dynamic target are properly propagated.

cmake/AddMQTCoreLibrary.cmake (1)

50-52: Good centralization of version definition.

Moving MQT_CORE_VERSION into the core library macro eliminates duplication across individual device CMakeLists.txt files. This ensures all libraries created via add_mqt_core_library consistently receive the version definition. The variable is properly set before any subdirectory processing occurs.

pyproject.toml (1)

97-97: The new CMake targets are properly defined in the build system.

Verification confirms all three new build targets referenced in pyproject.toml are properly defined:

  • mqt-core-qdmi-na-device-dyn: Created at src/qdmi/na/CMakeLists.txt:144 as SHARED library
  • mqt-core-qdmi-sc-device: Defined at src/qdmi/sc/CMakeLists.txt:70
  • mqt-core-qdmi-sc-device-dyn: Created at src/qdmi/sc/CMakeLists.txt:147 as SHARED library

The additions follow the established CMake naming convention using ${MQT_CORE_TARGET_NAME}-qdmi-{type}-device with the -dyn suffix for dynamic variants. The targets are logically organized with related variants grouped together, and the changes align with the PR objective of installing dynamic QDMI devices.

Copy link
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: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/qdmi/na/CMakeLists.txt (1)

170-171: Consider aligning dynamic target linkage with generator target.

The dynamic target explicitly links MQT::ProjectOptions and MQT::ProjectWarnings (line 170), while the generator target (line 16) removed these dependencies in favor of centralized handling via add_mqt_core_library. Consider whether the dynamic target should follow the same pattern for consistency.

src/qdmi/sc/CMakeLists.txt (1)

167-168: Consider aligning dynamic target linkage with generator target.

The dynamic target explicitly links MQT::ProjectOptions and MQT::ProjectWarnings (line 167), while the generator target (line 16) removed these dependencies in favor of centralized handling via add_mqt_core_library. Consider whether the dynamic target should follow the same pattern for consistency.

♻️ Duplicate comments (3)
src/qdmi/dd/CMakeLists.txt (1)

55-56: Comment accurately updated.

The comment now correctly reflects that only QDMI_VERSION is defined here, while MQT_CORE_VERSION is handled centrally by add_mqt_core_library (line 19).

src/qdmi/na/CMakeLists.txt (1)

133-134: Comment accurately updated.

The comment now correctly reflects that only QDMI_VERSION is defined here, while MQT_CORE_VERSION is handled centrally by add_mqt_core_library (line 97).

src/qdmi/sc/CMakeLists.txt (1)

130-131: Comment accurately updated.

The comment now correctly reflects that only QDMI_VERSION is defined here, while MQT_CORE_VERSION is handled centrally by add_mqt_core_library (line 94).

πŸ“œ Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between fd7d995 and 13d5baf.

πŸ“’ Files selected for processing (3)
  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (8)
πŸ““ Common learnings
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1326
File: python/mqt/core/__init__.py:22-22
Timestamp: 2025-11-24T10:19:41.147Z
Learning: In the munich-quantum-toolkit/core repository, Ruff is configured with 'ALL' rules enabled by default, and only specific rules are selectively disabled. When reviewing changes that enable previously-disabled rules (like PLC0415), noqa directives for those rules become necessary and should be retained.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: test/python/na/test_na_fomac.py:35-0
Timestamp: 2025-10-10T08:10:16.394Z
Learning: In the munich-quantum-toolkit/core repository, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which means CMake `install()` commands with `DESTINATION <path>` install files relative to `mqt/core/` in the wheel, making them accessible via `files("mqt.core").joinpath("<path>")`.
πŸ“š Learning: 2025-11-03T23:09:26.881Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-07T09:10:31.836Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-05T15:57:39.701Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 3
File: lib/Conversion/CatalystQuantumToMQTOpt/CMakeLists.txt:22-25
Timestamp: 2025-12-05T15:57:39.701Z
Learning: The munich-quantum-toolkit projects (core and core-plugins-catalyst) use `file(GLOB_RECURSE ...)` patterns in CMakeLists.txt files to collect header files, following an established convention in the parent repository for consistency across the codebase.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-05T17:45:37.602Z
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
πŸ“š Learning: 2025-10-09T13:14:10.178Z
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
πŸ“š Learning: 2025-10-17T11:09:50.147Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_site_handling.py:162-173
Timestamp: 2025-10-17T11:09:50.147Z
Learning: For QDMI tests that reference a specific named device via fixture (e.g., "MQT NA Default QDMI Device"), it is acceptable to hard-code device-specific values such as zone counts and indices, as these tests are intentionally coupled to that device's structure and serve as structural invariant checks.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-10T08:09:54.528Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.

Applied to files:

  • src/qdmi/sc/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Debug) / 🏁 windows-2022 msvc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Debug) / 🐧 ubuntu-24.04 gcc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-11-arm, msvc, Release) / 🏁 windows-11-arm msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Release) / 🏁 windows-2022 msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-15-intel, clang, Release) / 🍎 macos-15-intel clang Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04-arm, gcc, Release) / 🐧 ubuntu-24.04-arm gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Debug) / 🍎 macos-14 clang Debug
  • GitHub Check: πŸ‡¨β€Œ Coverage / πŸ“ˆ Coverage
  • GitHub Check: 🐍 Test (ubuntu-24.04-arm) / 🐍 ubuntu-24.04-arm
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Release) / 🐧 ubuntu-24.04 gcc Release
  • GitHub Check: 🐍 Test (macos-15-intel) / 🐍 macos-15-intel
  • GitHub Check: 🐍 Test (windows-2022) / 🐍 windows-2022
  • GitHub Check: 🐍 Test (ubuntu-24.04) / 🐍 ubuntu-24.04
  • GitHub Check: πŸ‡¨β€Œ Lint / 🚨 Lint
  • GitHub Check: 🐍 Lint / 🚨 Lint
πŸ”‡ Additional comments (4)
src/qdmi/na/CMakeLists.txt (2)

16-38: Generator target successfully refactored.

The migration to add_mqt_core_library centralizes library creation, version handling, and project configuration. The removal of MQT::ProjectOptions and MQT::ProjectWarnings from private links is appropriate since these are now handled by the macro. Output directory standardization ensures predictable artifact locations.


186-188: LGTM! Correct PARENT_SCOPE propagation.

Properly propagates the updated MQT_CORE_TARGETS list to the parent scope, ensuring all targets (including the dynamic target when built) are visible to the build system.

src/qdmi/sc/CMakeLists.txt (2)

16-35: Generator target successfully refactored.

The migration to add_mqt_core_library centralizes library creation, version handling, and project configuration. The removal of MQT::ProjectOptions and MQT::ProjectWarnings from private links is appropriate since these are now handled by the macro. Output directory standardization ensures predictable artifact locations.


183-185: LGTM! Correct PARENT_SCOPE propagation.

Properly propagates the updated MQT_CORE_TARGETS list to the parent scope, ensuring all targets (including the dynamic target when built) are visible to the build system.

@denialhaag
Copy link
Member Author

@burgholzer, I have cherry-picked all of your MLIR-unrelated commits. Please let me know if there's anything else to do. 😌

Copy link
Member

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

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

Thanks @denialhaag πŸ™Œ
Except for the failing CI; this looks great!
Might be worth running the extensive CI on this one.

Edit: Changelog entries would be nice as well.

Copy link
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

πŸ“œ Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 3c69af2 and 0e01672.

πŸ“’ Files selected for processing (2)
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (6)
πŸ““ Common learnings
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: test/python/na/test_na_fomac.py:35-0
Timestamp: 2025-10-10T08:10:16.394Z
Learning: In the munich-quantum-toolkit/core repository, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which means CMake `install()` commands with `DESTINATION <path>` install files relative to `mqt/core/` in the wheel, making them accessible via `files("mqt.core").joinpath("<path>")`.
πŸ“š Learning: 2025-11-03T23:09:26.881Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-07T09:10:31.836Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-05T15:57:39.701Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 3
File: lib/Conversion/CatalystQuantumToMQTOpt/CMakeLists.txt:22-25
Timestamp: 2025-12-05T15:57:39.701Z
Learning: The munich-quantum-toolkit projects (core and core-plugins-catalyst) use `file(GLOB_RECURSE ...)` patterns in CMakeLists.txt files to collect header files, following an established convention in the parent repository for consistency across the codebase.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-17T11:09:50.147Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_site_handling.py:162-173
Timestamp: 2025-10-17T11:09:50.147Z
Learning: For QDMI tests that reference a specific named device via fixture (e.g., "MQT NA Default QDMI Device"), it is acceptable to hard-code device-specific values such as zone counts and indices, as these tests are intentionally coupled to that device's structure and serve as structural invariant checks.

Applied to files:

  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-10T08:09:54.528Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.

Applied to files:

  • src/qdmi/sc/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: 🐍 Test (macos-14) / 🐍 macos-14
  • GitHub Check: 🐍 Test (windows-2022) / 🐍 windows-2022
  • GitHub Check: 🐍 Test (ubuntu-24.04-arm) / 🐍 ubuntu-24.04-arm
  • GitHub Check: 🐍 Test (ubuntu-24.04) / 🐍 ubuntu-24.04
  • GitHub Check: 🐍 Test (macos-15-intel) / 🐍 macos-15-intel
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Release) / 🏁 windows-2022 msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-11-arm, msvc, Release) / 🏁 windows-11-arm msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Debug) / 🏁 windows-2022 msvc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04-arm, gcc, Release) / 🐧 ubuntu-24.04-arm gcc Release
  • GitHub Check: πŸ‡¨β€Œ Coverage / πŸ“ˆ Coverage
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Debug) / 🐧 ubuntu-24.04 gcc Debug
  • GitHub Check: 🐍 Lint / 🚨 Lint
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Release) / 🐧 ubuntu-24.04 gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-15-intel, clang, Release) / 🍎 macos-15-intel clang Release
  • GitHub Check: πŸ‡¨β€Œ Lint / 🚨 Lint
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Release) / 🍎 macos-14 clang Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Debug) / 🍎 macos-14 clang Debug
πŸ”‡ Additional comments (5)
src/qdmi/na/CMakeLists.txt (3)

91-95: LGTM! Generator expression usage is correct.

Using $<TARGET_FILE:mqt-core-qdmi-na-device-generator> ensures the correct binary path is resolved at build time, which is more robust than hard-coded paths.


32-32: LGTM! Target collection pattern is correct.

The pattern of appending targets with list(APPEND MQT_CORE_TARGETS ...) followed by propagation to PARENT_SCOPE at the end is clean and correct. This ensures all device targets (generator library, device library, and dynamic device library) are properly collected for the parent build system.

Also applies to: 133-133, 183-183, 188-190


16-39: The add_mqt_core_library macro correctly handles ALIAS_NAME and creates the expected alias.

The macro in cmake/AddMQTCoreLibrary.cmake properly accepts the ALIAS_NAME QDMINaDeviceGen parameter and creates the alias MQT::CoreQDMINaDeviceGen as expected. The reference at line 53 is correct, and the output directory settings and target collection pattern are properly configured.

src/qdmi/sc/CMakeLists.txt (2)

16-36: LGTM! Consistent refactoring with NA device.

The refactoring mirrors the changes in src/qdmi/na/CMakeLists.txt, using add_mqt_core_library with ALIAS_NAME QDMIScDeviceGen. The consistency across device implementations improves maintainability. The alias MQT::CoreQDMIScDeviceGen is correctly referenced at line 50.


88-92: LGTM! Generator expression usage is correct.

Using $<TARGET_FILE:mqt-core-qdmi-sc-device-generator> follows the same robust pattern as the NA device implementation.

@denialhaag denialhaag force-pushed the streamline-project-configuration branch 4 times, most recently from 99f9dce to 47774aa Compare December 22, 2025 18:55
@denialhaag denialhaag added refactor Anything related to code refactoring c++ Anything related to C++ code labels Dec 23, 2025
@burgholzer burgholzer force-pushed the streamline-project-configuration branch from 47774aa to 44aaa3b Compare December 28, 2025 17:02
Copy link
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

πŸ“œ Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 47774aa and 44aaa3b.

πŸ“’ Files selected for processing (8)
  • cmake/AddMQTCoreLibrary.cmake
  • cmake/ExternalDependencies.cmake
  • pyproject.toml
  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
  • test/qir/runner/test_qir_runner.cpp
  • test/qir/runtime/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (10)
πŸ““ Common learnings
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1264
File: mlir/lib/Dialect/MQTOpt/Transforms/Transpilation/LayeredUnit.cpp:83-86
Timestamp: 2025-12-17T11:32:53.683Z
Learning: In the mlir directory of the munich-quantum-toolkit/core repository, the clang-tidy configuration (mlir/.clang-tidy) prefers marking free functions as `static` over placing them in anonymous namespaces. The configuration enables `llvm-prefer-static-over-anonymous-namespace` and disables `misc-use-anonymous-namespace`. Types/classes should still use anonymous namespaces, but free functions should use explicit `static` linkage.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.
πŸ“š Learning: 2025-11-03T23:09:26.881Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • cmake/ExternalDependencies.cmake
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-07T09:10:31.836Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
  • test/qir/runner/test_qir_runner.cpp
πŸ“š Learning: 2025-10-09T13:14:10.178Z
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • cmake/AddMQTCoreLibrary.cmake
πŸ“š Learning: 2025-10-17T11:09:50.147Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_site_handling.py:162-173
Timestamp: 2025-10-17T11:09:50.147Z
Learning: For QDMI tests that reference a specific named device via fixture (e.g., "MQT NA Default QDMI Device"), it is acceptable to hard-code device-specific values such as zone counts and indices, as these tests are intentionally coupled to that device's structure and serve as structural invariant checks.

Applied to files:

  • src/qdmi/dd/CMakeLists.txt
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-05T17:45:37.602Z
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.

Applied to files:

  • cmake/AddMQTCoreLibrary.cmake
πŸ“š Learning: 2025-10-10T08:09:54.528Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.

Applied to files:

  • cmake/ExternalDependencies.cmake
  • src/qdmi/sc/CMakeLists.txt
  • pyproject.toml
πŸ“š Learning: 2025-12-05T15:57:39.701Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 3
File: lib/Conversion/CatalystQuantumToMQTOpt/CMakeLists.txt:22-25
Timestamp: 2025-12-05T15:57:39.701Z
Learning: The munich-quantum-toolkit projects (core and core-plugins-catalyst) use `file(GLOB_RECURSE ...)` patterns in CMakeLists.txt files to collect header files, following an established convention in the parent repository for consistency across the codebase.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-13T20:08:45.549Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/qmap PR: 862
File: pyproject.toml:65-66
Timestamp: 2025-12-13T20:08:45.549Z
Learning: In the qmap project (pyproject.toml), maintain broad compatibility with dependencies across supported Python versions. Avoid artificially raising minimum version requirements unless there's a specific need (e.g., to guarantee binary wheel availability for certain Python versions, or to access required features). The goal is to keep the software as broadly compatible as possible with the rest of the ecosystem.

Applied to files:

  • pyproject.toml
πŸ“š Learning: 2025-10-10T08:10:16.394Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: test/python/na/test_na_fomac.py:35-0
Timestamp: 2025-10-10T08:10:16.394Z
Learning: In the munich-quantum-toolkit/core repository, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which means CMake `install()` commands with `DESTINATION <path>` install files relative to `mqt/core/` in the wheel, making them accessible via `files("mqt.core").joinpath("<path>")`.

Applied to files:

  • pyproject.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (17)
  • GitHub Check: 🐍 Test (windows-2022) / 🐍 windows-2022
  • GitHub Check: 🐍 Test (macos-14) / 🐍 macos-14
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Debug) / 🏁 windows-2022 msvc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04-arm, gcc, Release) / 🐧 ubuntu-24.04-arm gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-15-intel, clang, Release) / 🍎 macos-15-intel clang Release
  • GitHub Check: 🐍 Test (macos-15-intel) / 🐍 macos-15-intel
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Release) / 🏁 windows-2022 msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Debug) / 🐧 ubuntu-24.04 gcc Debug
  • GitHub Check: 🐍 Test (ubuntu-24.04-arm) / 🐍 ubuntu-24.04-arm
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Release) / 🍎 macos-14 clang Release
  • GitHub Check: 🐍 Test (ubuntu-24.04) / 🐍 ubuntu-24.04
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Debug) / 🍎 macos-14 clang Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-11-arm, msvc, Release) / 🏁 windows-11-arm msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Release) / 🐧 ubuntu-24.04 gcc Release
  • GitHub Check: πŸ‡¨β€Œ Lint / 🚨 Lint
  • GitHub Check: πŸ‡¨β€Œ Coverage / πŸ“ˆ Coverage
  • GitHub Check: 🐍 Lint / 🚨 Lint
πŸ”‡ Additional comments (10)
test/qir/runtime/CMakeLists.txt (1)

22-24: LGTM!

Explicitly setting LINKER_LANGUAGE CXX is necessary here since the target is created from object files (.o) without any C++ source files, preventing CMake from inferring the correct linker. This ensures proper linking against the C++ runtime library.

cmake/ExternalDependencies.cmake (1)

97-110: LGTM! Well-structured spdlog build configuration.

The changes properly:

  1. Tie SPDLOG_BUILD_SHARED to BUILD_MQT_CORE_SHARED_LIBS via cmake_dependent_option
  2. Guard output directory settings with if(TARGET spdlog) to handle both FetchContent and find_package scenarios
  3. Ensure spdlog libraries are placed in the common lib directory for consistent RPATH resolution
src/qdmi/dd/CMakeLists.txt (1)

55-56: LGTM!

The comment now accurately reflects that only QDMI_VERSION is defined here. MQT_CORE_VERSION is correctly provided by the add_mqt_core_library macro on line 19.

src/qdmi/sc/CMakeLists.txt (3)

15-36: LGTM! Device generator library setup.

Good use of add_mqt_core_library macro for consistent library creation. The output directory properties ensure the library is placed where the generator executable can find it.

Note: The device-gen target is intentionally not appended to MQT_CORE_TARGETS here, which is correct since it's an internal build-time library, not a distributable target.


127-131: LGTM!

Comment now correctly states "Make QDMI version available" and the list(APPEND MQT_CORE_TARGETS ...) pattern properly accumulates targets for parent scope propagation.


178-185: LGTM! Proper target propagation.

The dynamic target is correctly appended to MQT_CORE_TARGETS, and the final PARENT_SCOPE propagation ensures the accumulated targets are visible to the parent CMakeLists.txt.

src/qdmi/na/CMakeLists.txt (2)

133-134: LGTM!

Comment correctly states "Make QDMI version available" (addressing past review comment).


181-188: LGTM! Proper target propagation.

Dynamic target appending and PARENT_SCOPE propagation are correctly implemented, consistent with the SC device implementation.

test/qir/runner/test_qir_runner.cpp (1)

34-35: The code uses std::system which is acceptable for test utilities. Path quoting for arguments with spaces would be a best practice, but is not critical for test code that uses compile-time path definitions.

Likely an incorrect or invalid review comment.

cmake/AddMQTCoreLibrary.cmake (1)

50-52: LGTM! Centralized version definition.

Good consolidation of MQT_CORE_VERSION into the library creation macro. This ensures consistent version availability across all libraries created via add_mqt_core_library and reduces duplication in individual CMakeLists.txt files. The variable is properly defined in GetVersion.cmake before the macro is invoked.

burgholzer added a commit that referenced this pull request Dec 30, 2025
…#1409)

## Description

Picking apart #1403 even more.
This small PR directly exposes the MQT Core version as part of the CMake
library macro.

## 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.

Signed-off-by: burgholzer <[email protected]>
burgholzer added a commit that referenced this pull request Dec 30, 2025
## Description

Picked from #1403.
Improves the portability of the QIR runner by relying on less platform
specific functions.

## 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.

---------

Signed-off-by: burgholzer <[email protected]>
burgholzer added a commit that referenced this pull request Dec 30, 2025
## Description

Picked from #1403.
Builds `spdlog` as a shared library on library installs.
This reduces the wheel size from 14.3 MiB to 11.0 MiB on x86 linux.

## 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.

Signed-off-by: burgholzer <[email protected]>
Signed-off-by: Lukas Burgholzer <[email protected]>
@burgholzer burgholzer force-pushed the streamline-project-configuration branch from 2d632c9 to 9090bf6 Compare December 30, 2025 23:48
@burgholzer burgholzer changed the title 🚸 Improve project configuration πŸ‘¨β€πŸ’»πŸ“¦ build QDMI generators as shared libraries on install Dec 30, 2025
@burgholzer burgholzer force-pushed the streamline-project-configuration branch from 9090bf6 to e50625a Compare December 30, 2025 23:50
Copy link
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

πŸ“œ Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2d632c9 and 9090bf6.

πŸ“’ Files selected for processing (4)
  • CHANGELOG.md
  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
🧰 Additional context used
🧠 Learnings (18)
πŸ““ Common learnings
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.
πŸ“š Learning: 2025-10-14T14:37:38.047Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/yaqs PR: 212
File: CHANGELOG.md:12-15
Timestamp: 2025-10-14T14:37:38.047Z
Learning: In the munich-quantum-toolkit/yaqs project, changelog entries follow the template: "- $TITLE ([#$NUMBER]($URL)) ([**AUTHOR**](https://github.com/$AUTHOR))". Issue references should not be included in changelog entries; the PR number is sufficient for traceability.

Applied to files:

  • CHANGELOG.md
  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-11-04T14:28:32.371Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_backend.py:0-0
Timestamp: 2025-11-04T14:28:32.371Z
Learning: In the munich-quantum-toolkit/core repository, at least one FoMaC device is always available during testing, so skip logic for missing devices in QDMI Qiskit backend tests is not necessary.

Applied to files:

  • CHANGELOG.md
πŸ“š Learning: 2025-12-05T17:45:37.602Z
Learnt from: denialhaag
Repo: munich-quantum-toolkit/core PR: 1360
File: .github/workflows/reusable-mlir-tests.yml:40-43
Timestamp: 2025-12-05T17:45:37.602Z
Learning: In the munich-quantum-toolkit/core repository, patch releases of LLVM dependencies don't require documentation updates, changelog entries, or additional tests beyond what's validated by passing CI checks.

Applied to files:

  • CHANGELOG.md
  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-12-28T17:14:53.890Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1403
File: src/qdmi/na/CMakeLists.txt:31-38
Timestamp: 2025-12-28T17:14:53.890Z
Learning: In the munich-quantum-toolkit/core repository, the NA device generator target (mqt-core-qdmi-na-device-gen) is intentionally propagated to MQT_CORE_TARGETS via list(APPEND) because it's publicly linked to the NA device library (the NA device uses a public function from the generator). The SC device generator is not propagated because it has no such dependency with the SC device library.

Applied to files:

  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-28T17:13:36.900Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1403
File: pyproject.toml:98-102
Timestamp: 2025-12-28T17:13:36.900Z
Learning: In the munich-quantum-toolkit/core project, scikit-build-core is intelligent enough to skip build targets listed in pyproject.toml that don't exist for a given platform, so platform-specific targets (like `-dyn` targets conditioned on `NOT WIN32`) can be unconditionally listed in `build.targets` without causing Windows build failures.

Applied to files:

  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-07T09:10:31.836Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1355
File: src/qdmi/sc/Device.cpp:97-102
Timestamp: 2025-12-07T09:10:31.836Z
Learning: In the munich-quantum-toolkit/core repository, duplication of QDMI-related macros (such as IS_INVALID_ARGUMENT) across device implementations (e.g., in src/qdmi/sc/Device.cpp and src/qdmi/dd/Device.cpp) is acceptable as a temporary measure. The preferred long-term solution is to upstream these macros to the QDMI repository rather than creating local shared headers, so they can be reused across all dependent projects.

Applied to files:

  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-10T08:09:54.528Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: bindings/CMakeLists.txt:0-0
Timestamp: 2025-10-10T08:09:54.528Z
Learning: In the Munich Quantum Toolkit (MQT) Core project, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which automatically prefixes all CMake `DESTINATION` paths with `mqt/core/` during wheel installation. Therefore, CMake install destinations are relative to the `mqt/core` package namespace, not `site-packages`.

Applied to files:

  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-10T08:10:16.394Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1246
File: test/python/na/test_na_fomac.py:35-0
Timestamp: 2025-10-10T08:10:16.394Z
Learning: In the munich-quantum-toolkit/core repository, scikit-build-core is configured with `wheel.install-dir = "mqt/core"` in pyproject.toml, which means CMake `install()` commands with `DESTINATION <path>` install files relative to `mqt/core/` in the wheel, making them accessible via `files("mqt.core").joinpath("<path>")`.

Applied to files:

  • pyproject.toml
πŸ“š Learning: 2025-12-05T15:54:56.385Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 3
File: lib/Conversion/CatalystQuantumToMQTOpt/CMakeLists.txt:19-20
Timestamp: 2025-12-05T15:54:56.385Z
Learning: The munich-quantum-toolkit/core-plugins-catalyst project does not support Windows builds, so MSVC-specific compiler options or cross-platform compatibility with MSVC is not required.

Applied to files:

  • pyproject.toml
πŸ“š Learning: 2025-11-03T23:09:26.881Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1287
File: test/qdmi/dd/CMakeLists.txt:9-21
Timestamp: 2025-11-03T23:09:26.881Z
Learning: The CMake functions `generate_device_defs_executable` and `generate_prefixed_qdmi_headers` used in QDMI device test CMakeLists.txt files are provided by the external QDMI library (fetched via FetchContent from https://github.com/Munich-Quantum-Software-Stack/qdmi.git), specifically in the cmake/PrefixHandling.cmake module of the QDMI repository.

Applied to files:

  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-14T16:51:52.504Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 23
File: .readthedocs.yaml:13-18
Timestamp: 2025-12-14T16:51:52.504Z
Learning: In the munich-quantum-toolkit/core-plugins-catalyst repository, LLVM and MLIR toolchains are required for the documentation build because `uv run` includes a full build of the package, which compiles C++/MLIR extensions using scikit-build-core.

Applied to files:

  • pyproject.toml
  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-11-27T21:22:11.330Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/qmap PR: 846
File: pyproject.toml:213-214
Timestamp: 2025-11-27T21:22:11.330Z
Learning: In the qmap project (pyproject.toml), the maintainers intentionally enable `unsafe-fixes = true` in the ruff configuration. This is an established practice that has worked well for the project, with the expectation that PR authors review any automated fixes.

Applied to files:

  • pyproject.toml
πŸ“š Learning: 2025-10-17T11:09:50.147Z
Learnt from: marcelwa
Repo: munich-quantum-toolkit/core PR: 1243
File: test/python/qdmi/qiskit/test_qdmi_qiskit_site_handling.py:162-173
Timestamp: 2025-10-17T11:09:50.147Z
Learning: For QDMI tests that reference a specific named device via fixture (e.g., "MQT NA Default QDMI Device"), it is acceptable to hard-code device-specific values such as zone counts and indices, as these tests are intentionally coupled to that device's structure and serve as structural invariant checks.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-12-01T11:00:40.342Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 1
File: CHANGELOG.md:18-18
Timestamp: 2025-12-01T11:00:40.342Z
Learning: In the munich-quantum-toolkit/core-plugins-catalyst repository, the CHANGELOG.md intentionally references the parent MQT Core repository's release notes (https://github.com/munich-quantum-toolkit/core/releases) because the plugin repository is based on work performed in the parent repository.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-11-24T10:19:41.147Z
Learnt from: burgholzer
Repo: munich-quantum-toolkit/core PR: 1326
File: python/mqt/core/__init__.py:22-22
Timestamp: 2025-11-24T10:19:41.147Z
Learning: In the munich-quantum-toolkit/core repository, Ruff is configured with 'ALL' rules enabled by default, and only specific rules are selectively disabled. When reviewing changes that enable previously-disabled rules (like PLC0415), noqa directives for those rules become necessary and should be retained.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
πŸ“š Learning: 2025-12-05T15:57:39.701Z
Learnt from: flowerthrower
Repo: munich-quantum-toolkit/core-plugins-catalyst PR: 3
File: lib/Conversion/CatalystQuantumToMQTOpt/CMakeLists.txt:22-25
Timestamp: 2025-12-05T15:57:39.701Z
Learning: The munich-quantum-toolkit projects (core and core-plugins-catalyst) use `file(GLOB_RECURSE ...)` patterns in CMakeLists.txt files to collect header files, following an established convention in the parent repository for consistency across the codebase.

Applied to files:

  • src/qdmi/na/CMakeLists.txt
  • src/qdmi/sc/CMakeLists.txt
πŸ“š Learning: 2025-10-09T13:14:10.178Z
Learnt from: DRovara
Repo: munich-quantum-toolkit/core PR: 1108
File: mlir/lib/Dialect/MQTOpt/Transforms/ReplaceBasisStateControlsWithIfPattern.cpp:219-221
Timestamp: 2025-10-09T13:14:10.178Z
Learning: The MQT Core project (munich-quantum-toolkit/core repository) uses the C++20 standard, not C++17. C++20 features such as abbreviated function templates (e.g., `const auto&` parameters) are supported and valid in this codebase.

Applied to files:

  • src/qdmi/sc/CMakeLists.txt
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: 🐍 Test (ubuntu-24.04-arm) / 🐍 ubuntu-24.04-arm
  • GitHub Check: 🐍 Test (macos-15-intel) / 🐍 macos-15-intel
  • GitHub Check: 🐍 Test (windows-2022) / 🐍 windows-2022
  • GitHub Check: 🐍 Test (ubuntu-24.04) / 🐍 ubuntu-24.04
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Debug) / 🐧 ubuntu-24.04 gcc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Release) / 🏁 windows-2022 msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-11-arm, msvc, Release) / 🏁 windows-11-arm msvc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🏁 (windows-2022, msvc, Debug) / 🏁 windows-2022 msvc Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🍎 (macos-14, clang, Debug) / 🍎 macos-14 clang Debug
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04-arm, gcc, Release) / 🐧 ubuntu-24.04-arm gcc Release
  • GitHub Check: πŸ‡¨β€Œ Test 🐧 (ubuntu-24.04, gcc, Release) / 🐧 ubuntu-24.04 gcc Release
  • GitHub Check: πŸ‡¨β€Œ Lint / 🚨 Lint
πŸ”‡ Additional comments (8)
CHANGELOG.md (1)

51-51: LGTM!

The Fixed entry and PR link are correctly formatted and positioned.

Also applies to: 296-296

pyproject.toml (1)

98-102: LGTM!

The expanded QDMI device target list correctly includes all available device targets. Based on learnings, scikit-build-core will automatically skip the -dyn targets on Windows where they don't exist, so the unconditional listing is appropriate.

src/qdmi/sc/CMakeLists.txt (3)

16-16: LGTM!

The migration to add_mqt_core_library macro centralizes library creation and ensures consistent configuration across QDMI targets.


31-35: LGTM!

Output directory configuration ensures the library is placed in a predictable location for the generator executable to find it.


128-128: LGTM!

The target propagation pattern is correctβ€”accumulating targets with list(APPEND) and then propagating once at the end with PARENT_SCOPE. Based on learnings, the SC device-gen is intentionally not propagated because it has no public linkage dependency with the SC device library.

Also applies to: 176-182

src/qdmi/na/CMakeLists.txt (3)

16-16: LGTM!

The migration to add_mqt_core_library macro and output directory configuration is consistent with the SC device implementation. The spdlog linkage correctly changed to PRIVATE.

Also applies to: 29-38


31-32: LGTM!

The NA device-gen target is correctly propagated to MQT_CORE_TARGETS. Based on learnings, this is intentional because the NA device library publicly links to the generator (uses a public function from it), unlike the SC device which has no such dependency.


131-131: LGTM!

The target propagation pattern is consistent with the SC deviceβ€”accumulating all targets with list(APPEND) and propagating once at the end with PARENT_SCOPE.

Also applies to: 179-185

Signed-off-by: burgholzer <[email protected]>
@burgholzer burgholzer merged commit 70b9d1f into main Dec 31, 2025
34 checks passed
@burgholzer burgholzer deleted the streamline-project-configuration branch December 31, 2025 00:10
@coderabbitai coderabbitai bot mentioned this pull request Jan 4, 2026
8 tasks
burgholzer added a commit that referenced this pull request Jan 8, 2026
…#1409)

## Description

Picking apart #1403 even more.
This small PR directly exposes the MQT Core version as part of the CMake
library macro.

## 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.

Signed-off-by: burgholzer <[email protected]>
(cherry picked from commit 362a56f)
burgholzer added a commit that referenced this pull request Jan 8, 2026
## Description

Picked from #1403.
Improves the portability of the QIR runner by relying on less platform
specific functions.

## 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.

---------

Signed-off-by: burgholzer <[email protected]>
(cherry picked from commit 3bef3a6)
burgholzer added a commit that referenced this pull request Jan 8, 2026
## Description

Picked from #1403.
Builds `spdlog` as a shared library on library installs.
This reduces the wheel size from 14.3 MiB to 11.0 MiB on x86 linux.

## 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.

Signed-off-by: burgholzer <[email protected]>
Signed-off-by: Lukas Burgholzer <[email protected]>
(cherry picked from commit b9f6cf8)
burgholzer added a commit that referenced this pull request Jan 8, 2026
## Description

This PR copies over some changes from
#1356 so that the
latter becomes a bit leaner and more focused on relevant changes.

## 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.

---------

Signed-off-by: burgholzer <[email protected]>
Co-authored-by: burgholzer <[email protected]>
(cherry picked from commit 70b9d1f)
@coderabbitai coderabbitai bot mentioned this pull request Jan 12, 2026
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code refactor Anything related to code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants