Skip to content

Commit f8a04f0

Browse files
burgholzermergify[bot]
authored andcommitted
⬆️ Update QDMI to latest version from stable v1.2.x branch (#1593)
## 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
1 parent f679bcd commit f8a04f0

26 files changed

Lines changed: 152 additions & 47 deletions

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,27 @@ This project adheres to [Semantic Versioning], with the exception that minor rel
1212
### Added
1313

1414
- ✨ Add Sampler and Estimator Primitives to the QDMI-Qiskit Interface ([#1507]) ([**@marcelwa**])
15+
<<<<<<< HEAD
16+
=======
17+
- ✨ Add conversions between Jeff and QCO ([#1479], [#1548], [#1565]) ([**@denialhaag**])
18+
- ✨ Add a `place-and-route` pass for mapping circuits to architectures with restricted topologies ([#1537], [#1547], [#1568], [#1581], [#1583], [#1588]) ([**@MatthiasReumann**])
19+
- ✨ Add initial infrastructure for new QC and QCO MLIR dialects
20+
([#1264], [#1330], [#1402], [#1428], [#1430], [#1436], [#1443], [#1446], [#1464], [#1465], [#1470], [#1471], [#1472], [#1474], [#1475], [#1506], [#1510], [#1513], [#1521], [#1542], [#1548], [#1550], [#1554], [#1570], [#1572], [#1573])
21+
([**@burgholzer**], [**@denialhaag**], [**@taminob**], [**@DRovara**], [**@li-mingbao**], [**@Ectras**], [**@MatthiasReumann**], [**@simon1hofmann**])
22+
23+
### Changed
24+
25+
- ⬆️ Update QDMI to latest version from stable `v1.2.x` branch ([#1593]) ([**@burgholzer**])
26+
- ⬆️ Update `clang-tidy` to version 22 ([#1564]) ([**@denialhaag**], [**@burgholzer**])
27+
- 👷 Build on `macos-26`/`macos-26-intel` by default and `macos-15`/`macos-15-intel` for extensive tests ([#1571]) ([**@denialhaag**])
28+
- ⬆️ Require LLVM 22.1 for C++ library builds ([#1549]) ([**@burgholzer**], [**@denialhaag**])
29+
- 📦 Build MLIR by default for C++ library builds ([#1356]) ([**@burgholzer**], [**@denialhaag**])
30+
31+
### Removed
32+
33+
- 🔥 Remove the density matrix support from the MQT Core DD package ([#1466]) ([**@burgholzer**])
34+
- 🔥 Remove `datastructures` (`ds`) (sub)library from MQT Core ([#1458]) ([**@burgholzer**])
35+
>>>>>>> bd9f9cb4 (⬆️ Update QDMI to latest version from stable `v1.2.x` branch (#1593))
1536
1637
## [3.4.1] - 2026-02-01
1738

@@ -316,6 +337,30 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool
316337

317338
<!-- PR links -->
318339

340+
<<<<<<< HEAD
341+
=======
342+
[#1593]: https://github.com/munich-quantum-toolkit/core/pull/1593
343+
[#1588]: https://github.com/munich-quantum-toolkit/core/pull/1588
344+
[#1583]: https://github.com/munich-quantum-toolkit/core/pull/1583
345+
[#1581]: https://github.com/munich-quantum-toolkit/core/pull/1581
346+
[#1573]: https://github.com/munich-quantum-toolkit/core/pull/1573
347+
[#1572]: https://github.com/munich-quantum-toolkit/core/pull/1572
348+
[#1571]: https://github.com/munich-quantum-toolkit/core/pull/1571
349+
[#1570]: https://github.com/munich-quantum-toolkit/core/pull/1570
350+
[#1568]: https://github.com/munich-quantum-toolkit/core/pull/1568
351+
[#1565]: https://github.com/munich-quantum-toolkit/core/pull/1565
352+
[#1564]: https://github.com/munich-quantum-toolkit/core/pull/1564
353+
[#1554]: https://github.com/munich-quantum-toolkit/core/pull/1554
354+
[#1550]: https://github.com/munich-quantum-toolkit/core/pull/1550
355+
[#1549]: https://github.com/munich-quantum-toolkit/core/pull/1549
356+
[#1548]: https://github.com/munich-quantum-toolkit/core/pull/1548
357+
[#1547]: https://github.com/munich-quantum-toolkit/core/pull/1547
358+
[#1542]: https://github.com/munich-quantum-toolkit/core/pull/1542
359+
[#1537]: https://github.com/munich-quantum-toolkit/core/pull/1537
360+
[#1521]: https://github.com/munich-quantum-toolkit/core/pull/1521
361+
[#1513]: https://github.com/munich-quantum-toolkit/core/pull/1513
362+
[#1510]: https://github.com/munich-quantum-toolkit/core/pull/1510
363+
>>>>>>> bd9f9cb4 (⬆️ Update QDMI to latest version from stable `v1.2.x` branch (#1593))
319364
[#1507]: https://github.com/munich-quantum-toolkit/core/pull/1507
320365
[#1481]: https://github.com/munich-quantum-toolkit/core/pull/1481
321366
[#1453]: https://github.com/munich-quantum-toolkit/core/pull/1453

cmake/ExternalDependencies.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ if(BUILD_MQT_CORE_TESTS)
7070
endif()
7171

7272
# cmake-format: off
73-
set(QDMI_VERSION 1.2.1
73+
set(QDMI_VERSION 1.2.2
7474
CACHE STRING "QDMI version")
75-
set(QDMI_REV "70b815615475598c6194096a29c1b2340dd54a6c" # v1.2.x
75+
set(QDMI_REV "5bcf32f57158beea34d2839a41d218ed46a41516" # v1.2.x
7676
CACHE STRING "QDMI identifier (tag, branch or commit hash)")
7777
set(QDMI_REPO_OWNER "Munich-Quantum-Software-Stack"
7878
CACHE STRING "QDMI repository owner (change when using a fork)")

include/mqt-core/qdmi/common/Common.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#pragma once
1616

1717
#include <qdmi/client.h>
18-
#include <qdmi/constants.h>
1918

2019
#include <string>
2120

src/qdmi/devices/dd/CMakeLists.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,8 @@ if(NOT TARGET ${TARGET_NAME})
3838
${QDMI_HDRS})
3939

4040
# Add link libraries
41-
target_link_libraries(
42-
${TARGET_NAME}
43-
PUBLIC qdmi::qdmi
44-
PRIVATE MQT::CoreDD MQT::CoreQASM MQT::CoreCircuitOptimizer MQT::CoreQDMICommon spdlog::spdlog)
41+
target_link_libraries(${TARGET_NAME} PRIVATE MQT::CoreDD MQT::CoreQASM MQT::CoreCircuitOptimizer
42+
MQT::CoreQDMICommon spdlog::spdlog)
4543

4644
# Always compile with position independent code such that the library can be used in shared
4745
# libraries
@@ -50,8 +48,21 @@ if(NOT TARGET ${TARGET_NAME})
5048
# Add to list of MQT Core targets
5149
list(APPEND MQT_CORE_TARGETS ${TARGET_NAME})
5250

53-
# Make QDMI version available
54-
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}")
51+
# Make QDMI version available and ensure symbols are exported when building the library
52+
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}"
53+
${QDMI_PREFIX}_QDMI_device_EXPORTS)
54+
55+
# Define a preprocessor macro to indicate that the library is being built as a static library
56+
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
57+
target_compile_definitions(${TARGET_NAME} PUBLIC ${QDMI_PREFIX}_QDMI_STATIC_DEFINE)
58+
endif()
59+
60+
# Compile with hidden visibility by default to reduce the exported symbols to the public API
61+
set_target_properties(
62+
${TARGET_NAME}
63+
PROPERTIES C_VISIBILITY_PRESET hidden
64+
CXX_VISIBILITY_PRESET hidden
65+
VISIBILITY_INLINES_HIDDEN 1)
5566

5667
# Generate additional alias for the target required for generate_device_defs_executable function
5768
# in the tests

src/qdmi/devices/dd/Device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Licensed under the MIT License
99
*/
1010

11-
/** @file
11+
/** @file Device.cpp
1212
* @brief The MQT QDMI device implementation for its DD-based simulator.
1313
*/
1414

src/qdmi/devices/na/App.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
* Licensed under the MIT License
99
*/
1010

11+
/**
12+
* @file App.cpp
13+
* @brief Implementation of the generator tool for neutral atom devices.
14+
*/
15+
1116
#include "qdmi/devices/na/Generator.hpp"
1217

1318
#include <spdlog/spdlog.h>

src/qdmi/devices/na/CMakeLists.txt

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,7 @@ if(NOT TARGET ${TARGET_NAME})
121121
${QDMI_HDRS})
122122

123123
# add link libraries
124-
target_link_libraries(
125-
${TARGET_NAME}
126-
PUBLIC qdmi::qdmi
127-
PRIVATE MQT::CoreQDMICommon spdlog::spdlog)
124+
target_link_libraries(${TARGET_NAME} PRIVATE MQT::CoreQDMICommon spdlog::spdlog)
128125

129126
# Always compile with position independent code such that the library can be used in shared
130127
# libraries
@@ -133,8 +130,21 @@ if(NOT TARGET ${TARGET_NAME})
133130
# add to list of MQT core targets
134131
list(APPEND MQT_CORE_TARGETS ${TARGET_NAME})
135132

136-
# Make QDMI version available
137-
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}")
133+
# Make QDMI version available and ensure symbols are properly exported when building the library
134+
target_compile_definitions(${TARGET_NAME} PRIVATE QDMI_VERSION="${QDMI_VERSION}"
135+
${QDMI_PREFIX}_QDMI_device_EXPORTS)
136+
137+
# Define a preprocessor macro to indicate that the library is being built as a static library
138+
if(NOT BUILD_MQT_CORE_SHARED_LIBS)
139+
target_compile_definitions(${TARGET_NAME} PUBLIC ${QDMI_PREFIX}_QDMI_STATIC_DEFINE)
140+
endif()
141+
142+
# Compile with hidden visibility by default to reduce the exported symbols to the public API
143+
set_target_properties(
144+
${TARGET_NAME}
145+
PROPERTIES C_VISIBILITY_PRESET hidden
146+
CXX_VISIBILITY_PRESET hidden
147+
VISIBILITY_INLINES_HIDDEN 1)
138148

139149
# Generate additional alias for the target required for generate_device_defs_executable function
140150
# in the tests
@@ -165,10 +175,8 @@ if(NOT TARGET ${TARGET_NAME})
165175
${QDMI_HDRS})
166176
# add link libraries
167177
target_link_libraries(
168-
${DYN_TARGET_NAME}
169-
PUBLIC qdmi::qdmi
170-
PRIVATE ${TARGET_NAME} MQT::CoreQDMICommon MQT::ProjectOptions MQT::ProjectWarnings
171-
spdlog::spdlog)
178+
${DYN_TARGET_NAME} PRIVATE ${TARGET_NAME} MQT::CoreQDMICommon MQT::ProjectOptions
179+
MQT::ProjectWarnings spdlog::spdlog)
172180
# set c++ standard
173181
target_compile_features(${DYN_TARGET_NAME} PRIVATE cxx_std_20)
174182
# set versioning information
@@ -183,6 +191,17 @@ if(NOT TARGET ${TARGET_NAME})
183191
set_target_properties(${DYN_TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION FALSE)
184192
target_link_options(${DYN_TARGET_NAME} PRIVATE /LTCG:OFF)
185193
endif()
194+
195+
# Ensure that symbols are properly exported when building the library
196+
target_compile_definitions(${DYN_TARGET_NAME} PRIVATE ${QDMI_PREFIX}_QDMI_device_EXPORTS)
197+
198+
# Compile with hidden visibility by default to reduce the exported symbols to the public API
199+
set_target_properties(
200+
${DYN_TARGET_NAME}
201+
PROPERTIES C_VISIBILITY_PRESET hidden
202+
CXX_VISIBILITY_PRESET hidden
203+
VISIBILITY_INLINES_HIDDEN 1)
204+
186205
add_library(MQT::CoreQDMINaDeviceDyn ALIAS ${DYN_TARGET_NAME})
187206
list(APPEND MQT_CORE_TARGETS ${DYN_TARGET_NAME})
188207
endif()

src/qdmi/devices/na/Device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Licensed under the MIT License
99
*/
1010

11-
/** @file
11+
/** @file Device.cpp
1212
* @brief The MQT QDMI device implementation for neutral atom devices.
1313
*/
1414

src/qdmi/devices/na/DynDevice.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
*/
1010

1111
/**
12-
* @file This file is a thin wrapper around MQT's Neutral Atom QDMI Device with
12+
* @file DynDevice.cpp
13+
* @brief This file is a thin wrapper around MQT's Neutral Atom QDMI Device with
1314
* another prefix.
1415
*/
1516

src/qdmi/devices/na/Generator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Licensed under the MIT License
99
*/
1010

11-
/** @file
11+
/** @file Generator.cpp
1212
* @brief The MQT QDMI device generator for neutral atom devices.
1313
*/
1414

0 commit comments

Comments
 (0)