Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
330 commits
Select commit Hold shift + click to select a range
2a04dd5
dynamic path finding
flowerthrower Jun 2, 2025
65f34e7
calm down ruff
flowerthrower Jun 2, 2025
c2e0cda
remove version file
flowerthrower Jun 2, 2025
203049f
🚚 rename test file
flowerthrower Jun 4, 2025
270fd6d
🚧 use rpath
flowerthrower Jun 10, 2025
74a7ce9
🚧 use matchAndRewrite
flowerthrower Jun 11, 2025
cec21b4
add path in ci to find dylib
flowerthrower Jun 11, 2025
ffedad9
Merge commit '08e61d14291da0e7e39af3f5e6c46a6641635eb7' into mlir-plugin
flowerthrower Jun 11, 2025
95b7951
debug ci
flowerthrower Jun 11, 2025
8167e6f
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 11, 2025
35c01bf
debug ci
flowerthrower Jun 11, 2025
c230d99
✅ add test for plugin execution
flowerthrower Jun 13, 2025
705ac5d
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 13, 2025
116bb7f
➕ install pytest in ci
flowerthrower Jun 13, 2025
d5471b9
💚 fix urllib3 to stable version
flowerthrower Jun 13, 2025
4bd1af9
⚡️ improve ci
flowerthrower Jun 13, 2025
8c42d30
💚 improve ci
flowerthrower Jun 13, 2025
2680a1e
🐛 fix dialect roundtrip tests
flowerthrower Jun 20, 2025
ec8bedd
enable full round-trip-test
flowerthrower Jun 23, 2025
43f2bc2
add platform markers
flowerthrower Jun 23, 2025
294272f
Merge branch 'main' into mlir-plugin
burgholzer Jun 30, 2025
9ab3ef4
⏪ revert a couple of unrelated changes
burgholzer Jun 30, 2025
c43b7cc
♻️ restructure plugin package
burgholzer Jun 30, 2025
c0ee59f
🚧 work in progress that does not work yet
burgholzer Jun 30, 2025
388acf3
🩹 fix sdist for mqt-core
burgholzer Jul 9, 2025
54d4dec
➕ update dependencies
burgholzer Jul 9, 2025
ea57507
🚚 rename to `mqt-core-catalyst-plugin`
burgholzer Jul 9, 2025
7015cf3
🔧 do not explicitly register plugins
burgholzer Jul 9, 2025
745b26a
🔧 add target specific CMake settings
burgholzer Jul 9, 2025
7dda34a
♻️ turn into standalone plugin package
burgholzer Jul 9, 2025
624b5fa
🩹 do not register passes in dialect plugin
burgholzer Jul 9, 2025
4b69fa2
🎨 miscellaneous fixes in pyproject.toml configuration
burgholzer Jul 9, 2025
cbc97e9
🚨 run pre-commit
burgholzer Jul 9, 2025
7a97880
Merge remote-tracking branch 'refs/remotes/munich-quantum-toolkit/mai…
burgholzer Jul 9, 2025
fa3e096
⬆️ update mqt-core plugin dependency
burgholzer Jul 9, 2025
9900215
🔧 do not run cpp-linter on catalyst plugin for now.
burgholzer Jul 9, 2025
77266d3
👷 set up dedicated plugin CI
burgholzer Jul 9, 2025
4d76e3b
🩹 activate virtual environment in CI
burgholzer Jul 9, 2025
3d082df
🩹 enable PIC for MQT Core in plugin
burgholzer Jul 9, 2025
cd575bf
🔧 decouple plugin from main CMake build to avoid endless loop
burgholzer Jul 9, 2025
e3fe319
✏️ disambiguate workflow names
burgholzer Jul 9, 2025
ad33833
🔧 tweak workflow triggers
burgholzer Jul 9, 2025
8124ce3
Merge branch 'main' into mlir-plugin
flowerthrower Jul 10, 2025
70afd91
⏪ revert non plugin specific changes
flowerthrower Jul 10, 2025
173e971
⏪ revert non-plugin specific changes
flowerthrower Jul 10, 2025
3feaa26
⏪ revert non-plugin specific changes
flowerthrower Jul 10, 2025
aaa2188
🩹 properly run pytest
burgholzer Jul 10, 2025
d7d1783
🔧 only build catalyst MLIR component
burgholzer Jul 10, 2025
f1b333f
🩹 use active environment
burgholzer Jul 10, 2025
4b0d47e
⚗️ try building with clang-19 on Ubuntu
burgholzer Jul 10, 2025
e385ea5
Merge branch 'main' into mlir-plugin
burgholzer Jul 11, 2025
a314f38
⚗️ try Catalyst MLIR commit
burgholzer Jul 11, 2025
90dcb7b
🩹 set build type
burgholzer Jul 11, 2025
e80f154
⚗️ tweak LLVM installation
burgholzer Jul 12, 2025
29b121d
🩹 fix the mqt-core version
burgholzer Jul 12, 2025
8f804a2
🙈 simplify gitignore
burgholzer Jul 12, 2025
962802b
⏪ revert unnecessary config
burgholzer Jul 12, 2025
e9a3b56
⏪ don't explicitly install clang version that will not be used
burgholzer Jul 12, 2025
098c174
Merge branch 'main' into mlir-plugin
burgholzer Jul 12, 2025
43333de
⚗️ disable mold as a linker for catalyst build
burgholzer Jul 12, 2025
9179a40
♻️ one more `match` and `rewrite` replacement
burgholzer Jul 12, 2025
d9957f0
🔧 use mqt-core from the source tree
burgholzer Jul 14, 2025
989adfd
⬆️ update catalyst dependency
burgholzer Jul 14, 2025
14e5732
♻️ streamline Python plugin code
burgholzer Jul 14, 2025
106fa7d
🚨 address some clang-tidy warnings
burgholzer Jul 14, 2025
68142d6
🔧 tweak Catalyst installation on Linux
burgholzer Jul 14, 2025
9255e49
🔊 print more test output
burgholzer Jul 14, 2025
f7dce4c
⚗️ try with LLVM 21
burgholzer Jul 14, 2025
04a43f3
📦 only build the targets necessary for the plugin
burgholzer Jul 14, 2025
063b184
⚗️ experiment with the RPATH settings
burgholzer Jul 14, 2025
e7aed92
🔧 exclude macos and llvm@21
burgholzer Jul 14, 2025
610a8d9
⚗️ try compiling with gcc on Linux
burgholzer Jul 15, 2025
039cffc
🩹 disable LLD for catalyst build
burgholzer Jul 15, 2025
337ed02
🔧 only build the check-mlir target
burgholzer Jul 15, 2025
78e6291
⚗️ try an explicit repair wheel step
burgholzer Jul 15, 2025
7d874be
🔧 modify LLVM install configuration to maybe fix the Linux build
burgholzer Jul 15, 2025
e178ed8
🩹 fix CI configuration
burgholzer Jul 15, 2025
bec9939
⬆️ update to release version of Catalyst
burgholzer Jul 15, 2025
e045f05
🩹 also install the catalyst dependency group
burgholzer Jul 15, 2025
dd8cfb3
➕ add catalyst as a runtime dependency
burgholzer Jul 15, 2025
1afa51a
⏪ remove the wheel repair step again for now
burgholzer Jul 15, 2025
3b2c9dd
🔧 run without mold as a linker
burgholzer Jul 16, 2025
04f134d
🔊 print shared library information logs
burgholzer Jul 16, 2025
7668673
:refactor: added missing conversions from the separate PR #880
BertiFlorea Jul 16, 2025
60f7c22
:memo: update pass description with the remaining op conversions
BertiFlorea Jul 16, 2025
e2fde36
:bug: fix missing patterns of existing conversions
BertiFlorea Jul 16, 2025
3de0827
:recycle: add missing PeresOp conversion
BertiFlorea Jul 17, 2025
8686445
:memo: update MQTOptToCatalystQuantum pass description
BertiFlorea Jul 17, 2025
8fa8c0d
:green_heart: update include paths to prevent c lint error
BertiFlorea Jul 17, 2025
dfa1d9d
🎨 pre-commit fixes
pre-commit-ci[bot] Jul 17, 2025
f80355e
:rewind: :green_heart: revert include paths and update cmake file in …
BertiFlorea Jul 17, 2025
a682d93
:construction: try to explicitly point clang to see the includes
BertiFlorea Jul 17, 2025
d641451
🎨 pre-commit fixes
pre-commit-ci[bot] Jul 17, 2025
81b0e36
:recycle: revert catalyst/lib/CMakeLists.txt and catalyst/CMakeLists.txt
BertiFlorea Jul 17, 2025
ea46083
🐛 add arith includes and fix arith div logic
flowerthrower Jul 22, 2025
810ad4b
🐛 fix adjoint parameter handling in quantum gate conversions
flowerthrower Jul 22, 2025
48802d4
Merge remote-tracking branch 'munich-quantum-toolkit/main' into mlir-…
burgholzer Jul 30, 2025
5532a39
🔧 streamline CI configuration
burgholzer Jul 30, 2025
6358288
📦 make uv resolution more precise and update lockfile
burgholzer Jul 30, 2025
5953de0
🔧 match Catalyst macOS deployment target
burgholzer Jul 30, 2025
a83ecf6
⬆️ update C++ standard to C++20
burgholzer Jul 30, 2025
163d7d1
⬆️ update mqt-core version
burgholzer Jul 30, 2025
0b0b6d8
🔧 move prerelease config to comments
burgholzer Jul 30, 2025
fbfcf8c
🔥 remove unused CMake file
burgholzer Jul 30, 2025
41ad6a7
🔥 remove unused variable
burgholzer Jul 30, 2025
1667c4a
🚸 enable optional coverage collection
burgholzer Jul 30, 2025
5b1f072
🔧 optimize CMake configuration with header file sets
burgholzer Jul 30, 2025
32c4fdf
🎨 add format and linting config to plugin
burgholzer Jul 30, 2025
48ea811
♻️ first round of plugin code cleanup
burgholzer Jul 30, 2025
6a6c59f
🔥 remove LLVM 21 from the testing matrix
burgholzer Jul 30, 2025
ee084fd
👷 add Linux ARM to test matrix for plugin
burgholzer Jul 30, 2025
f9b32a2
♻️ simplify conversion patterns
burgholzer Jul 30, 2025
db60591
🐛 fix control and target ordering in MQTOpt to Catalyst translation
burgholzer Jul 30, 2025
6e829f2
🐛 fix pattern for `XXminusYY`
burgholzer Jul 30, 2025
54859f9
🔥 Comment out CI runs not using exact LLVM commit
burgholzer Jul 30, 2025
d2c7fec
✨ enable support for `CSWAP` from catalyst
burgholzer Jul 30, 2025
ee20add
✨ enable support for `S` and `T` from catalyst
burgholzer Jul 30, 2025
aa6bce6
✨ enable support for `ISWAP` from catalyst
burgholzer Jul 30, 2025
9daf5d3
✨ enable support for `Identity` from catalyst
burgholzer Jul 30, 2025
87ab895
✨ enable support for `SX` from catalyst
burgholzer Jul 30, 2025
ed9a3f3
✨ enable support for `ECR` from catalyst
burgholzer Jul 30, 2025
2374378
🎨 directly use string comparisons
burgholzer Jul 30, 2025
fec7946
🎨 reduce boilerplate code
burgholzer Jul 30, 2025
d80d1e4
⏪ restore boilerplate code for unresolved materialization
burgholzer Jul 30, 2025
12c47bf
♻️ streamline conversion to catalyst
burgholzer Jul 30, 2025
9a52a78
♻️ assume `SX` and `ECR` to be legal and supported
burgholzer Jul 30, 2025
857b368
✨ add support for CSWAP in conversion to catalyst
burgholzer Jul 30, 2025
4a7bf6e
♻️ simplify `V` and `Vdg` gate sequence
burgholzer Jul 30, 2025
778ae8f
🐛 fix DCX implementation
burgholzer Jul 30, 2025
b053818
🚨 fix missing header
burgholzer Jul 31, 2025
dbb2bb0
Merge branch 'main' into mlir-plugin
flowerthrower Aug 13, 2025
45ee5e1
add getting started example
flowerthrower Aug 13, 2025
11c308e
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 13, 2025
f4580a3
💚 add ci for plugin lit tests
flowerthrower Aug 15, 2025
f84706e
🐛 fix tests
flowerthrower Aug 15, 2025
df10af6
🐛 fix control order in conversion test
flowerthrower Aug 15, 2025
f8215ca
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 15, 2025
541c7ca
🚧 debug failing conversion
flowerthrower Aug 15, 2025
52023c1
🐛 fix test
flowerthrower Aug 18, 2025
5e46c40
🐛 fix operation names
flowerthrower Aug 18, 2025
5d3df91
✅ add conversion and test for xxplusyy gate
flowerthrower Aug 18, 2025
be0ba8e
🐛 fix lit setup
flowerthrower Aug 18, 2025
3f11c3c
🎨 remove debugging lines
flowerthrower Aug 19, 2025
1250676
✅ fix and test rzx gate conversion
flowerthrower Aug 19, 2025
b10f91b
🐛 fix include directories for Catalyst installation from PyPI
flowerthrower Aug 20, 2025
fca7d10
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 20, 2025
a876914
🎨 clean up CI configuration by removing commented-out jobs and updati…
flowerthrower Aug 20, 2025
108bb60
🐛 update Python executable references to Python3 in CMake files
flowerthrower Aug 20, 2025
0fbdcfc
🐛 fix constant values in MQTOptToCatalystQuantum conversion for corre…
flowerthrower Aug 20, 2025
d48decf
📝 update README.md with installation instructions and system requirem…
flowerthrower Aug 20, 2025
8142c08
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 20, 2025
906ca09
Merge commit '8bb58888948246ab3486c678a595ca670c2eddc7' into mlir-plugin
flowerthrower Aug 21, 2025
e7d8109
🚧 fix conversion patterns
flowerthrower Aug 21, 2025
ac126cd
🎨 imporve tests
flowerthrower Aug 21, 2025
b31f55e
✨ Update clang-tidy configurations and add clang-tidy to ci for the C…
flowerthrower Aug 25, 2025
00b2661
🎨 pre-commit fixes
pre-commit-ci[bot] Aug 25, 2025
5e642d7
🎨 pre-commit
flowerthrower Aug 25, 2025
3bcc78a
🎨 improve lit test coverage
flowerthrower Aug 25, 2025
bca11f7
🎨 reduce code duplication
flowerthrower Aug 25, 2025
7a4c649
Merge branch 'mlir-plugin' of https://github.com/cda-tum/mqt-core int…
flowerthrower Aug 26, 2025
a92555a
🎨 update parameter handling in ConvertMQTOptSimpleGate for VOp
flowerthrower Aug 26, 2025
3110870
Merge branch 'main' into mlir-plugin
flowerthrower Aug 29, 2025
e1193f5
Merge branch 'mlir-plugin' of https://github.com/cda-tum/mqt-core int…
flowerthrower Aug 29, 2025
0acca05
fix checks
flowerthrower Aug 29, 2025
23c1fd7
add pauli gates conversion lit test
flowerthrower Sep 2, 2025
559648d
add clifford gates conversion lit test
flowerthrower Sep 2, 2025
708f2c8
add swap gates conversion lit test
flowerthrower Sep 2, 2025
59bcd6e
add ising gates conversion lit test
flowerthrower Sep 2, 2025
fcf3f5d
add parameterized gates conversion lit test
flowerthrower Sep 2, 2025
81ee0af
remove xxminusyy conversion
flowerthrower Sep 2, 2025
1496eb8
remove duplicate tests
flowerthrower Sep 2, 2025
c9e0c9f
add quantum conversion tests
flowerthrower Sep 4, 2025
bad986e
🎨 make style consistent with other tests
flowerthrower Sep 4, 2025
ef302a7
Merge remote-tracking branch 'origin/main' into mlir-plugin
flowerthrower Sep 19, 2025
2e7dc88
update tests
flowerthrower Sep 26, 2025
cd7916c
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 26, 2025
ac029e8
fix tests
flowerthrower Sep 26, 2025
2ea817b
Merge commit 'cd7916c2e194a709ae71c19aadd1ab3f99250e82' into mlir-plugin
flowerthrower Sep 26, 2025
dd33fbf
Merge branch 'main' into mlir-plugin
flowerthrower Sep 26, 2025
cec133f
first adaptions to work with new mref
flowerthrower Sep 26, 2025
2830e66
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 26, 2025
1a49e72
make work with older llvm
flowerthrower Sep 29, 2025
f273fa4
Merge commit '2830e66c823f742f46bc19a356ddfaba6e73c422' into mlir-plugin
flowerthrower Sep 29, 2025
08a5565
update ising
flowerthrower Sep 29, 2025
0d79329
update entangling tests
flowerthrower Sep 29, 2025
0755907
finish update all mqtopt tests
flowerthrower Sep 29, 2025
fd2c784
fix quantum pauli test
flowerthrower Sep 29, 2025
e3ef2e9
update quantum to mqt conversion to account for mref
flowerthrower Sep 30, 2025
3fe4e05
use mlir isa
flowerthrower Sep 30, 2025
70be761
standardize tests
flowerthrower Oct 1, 2025
54c1dd7
calm down warnings
flowerthrower Oct 1, 2025
abc676d
Merge remote-tracking branch 'origin/main' into mlir-plugin
flowerthrower Oct 1, 2025
1906761
fix fialing tests
flowerthrower Oct 1, 2025
fe20c95
🚧 wip
flowerthrower Oct 1, 2025
54a4ec1
all lit tests succeed
flowerthrower Oct 1, 2025
b50d557
fix conversion dynamic index from operand
flowerthrower Oct 13, 2025
7443c3a
Merge commit '1e22f589e0531e4693a22beb6ae8eb5a53a85eb5' into mlir-plugin
flowerthrower Oct 13, 2025
c8af436
fix: update greedy driver configuration for MLIR version compatibility
flowerthrower Oct 14, 2025
c789e97
fix: streamline top-down traversal configuration for MLIR compatibility
flowerthrower Oct 14, 2025
443ea2f
fix: add conversion pattern for GlobalPhaseOp in Catalyst to MQTOpt
flowerthrower Oct 14, 2025
349e952
fix: remove unnecessary comments in ConvertQuantumGlobalPhase struct
flowerthrower Oct 14, 2025
e1e300c
fix: enhance gate conversion logic for RX, RY, RZ, CRX, CRY, CRZ, and…
flowerthrower Oct 15, 2025
8eec5c7
fix: implement conversion pattern for XXplusYYOp with parameter handl…
flowerthrower Oct 15, 2025
3721891
fix: update Ising gate conversion test to correctly handle new RZ par…
flowerthrower Oct 15, 2025
fd43fba
fix: add device configuration utilities to prevent gate decomposition…
flowerthrower Oct 15, 2025
36a5d50
fix: add python test cases for MQT plugin to ensure correct roundtrip…
flowerthrower Oct 15, 2025
886e71d
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 15, 2025
2032b9e
fix: update Ising gate tests to use correct angle parameter and add P…
flowerthrower Oct 15, 2025
b071000
fix: update C++ linter configuration to use input from caller and ign…
flowerthrower Oct 16, 2025
3d44546
fix: add type hint for kwargs in get_device function and update docst…
flowerthrower Oct 16, 2025
f518011
Merge branch 'main' into mlir-plugin
flowerthrower Oct 16, 2025
71065ab
fix: update cpp-linter workflow commit
flowerthrower Oct 16, 2025
d6fec59
fix: reorder includes and improve type conversion comments in Catalys…
flowerthrower Oct 17, 2025
36b52da
Merge branch 'mlir-plugin' of https://github.com/cda-tum/mqt-core int…
flowerthrower Oct 23, 2025
f7f806b
fix: update MLIR and Catalyst dependencies and adjust Python version …
flowerthrower Oct 23, 2025
38c779c
Merge branch 'main' into mlir-plugin
flowerthrower Oct 23, 2025
d40fa29
fix: clean up README.md by removing TODO comments and improving wording
flowerthrower Oct 23, 2025
f79d5a9
Merge branch 'mlir-plugin' of https://github.com/cda-tum/mqt-core int…
flowerthrower Oct 23, 2025
465242a
fix: add explicit constructor to QubitInfo for gcc-14 compatibility
flowerthrower Oct 23, 2025
70c4596
fix: enhance ising gates roundtrip test with custom MLIR pipelines an…
flowerthrower Oct 23, 2025
cc88071
Refactor code structure for improved readability
flowerthrower Oct 24, 2025
7b95c7b
Apply suggestions from code review
flowerthrower Oct 24, 2025
90c25d1
fix: correct variable usage in ExternalDependencies.cmake and improve…
flowerthrower Oct 24, 2025
3fe4813
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 24, 2025
2239690
feat: implement XXminusYY gate conversion and update test cases for I…
flowerthrower Oct 24, 2025
153b6e6
Merge branch 'mlir-plugin' of https://github.com/cda-tum/mqt-core int…
flowerthrower Oct 24, 2025
d5e808f
refactor: replace custom math constants with std::numbers in MQTOptTo…
flowerthrower Oct 24, 2025
6f64f36
refactor: remove constructor from QubitInfo struct in Layout.h
flowerthrower Nov 10, 2025
d0da45f
revert: rewrite configuration in SwapReconstructionAndElision
flowerthrower Nov 10, 2025
df0cf97
fix: include WalkResult header in PlacementPass.cpp
flowerthrower Nov 10, 2025
1f8adb6
fix: include WalkResult header in RoutingPass and RoutingVerification…
flowerthrower Nov 10, 2025
d7c44d2
docs: update system requirements in README.md for MQT Core Catalyst M…
flowerthrower Nov 10, 2025
c447429
update: readme
flowerthrower Nov 10, 2025
f7276ee
docs: add BibTeX citation
flowerthrower Nov 10, 2025
250abd3
fix: ensure BUILD_DIR is set and verify lit installation in CI workflow
flowerthrower Nov 10, 2025
0d2faa7
fix: refine .gitignore to include specific build directories for test…
flowerthrower Nov 10, 2025
5690729
🎨 pre-commit fixes
pre-commit-ci[bot] Nov 18, 2025
7e01857
Merge remote-tracking branch 'origin/main' into pr/flowerthrower/881
flowerthrower Nov 26, 2025
b1ad57a
🔧 Update pennylane-catalyst dependency to version 0.13.0 and adjust e…
flowerthrower Nov 26, 2025
3e21e5e
🧹 Remove redundant licensing information from mqt-plugin.cpp
flowerthrower Nov 26, 2025
5153ce8
🔧 Refactor memory allocation and gate conversion logic in MQTOptToCat…
flowerthrower Nov 26, 2025
2dd0a1c
🔧 Enhance control value handling and error reporting in Quantum conve…
flowerthrower Nov 26, 2025
f3cd62b
🎨 update docstring
flowerthrower Nov 26, 2025
53fb679
🔧 Improve plugin path resolution by adding platform check and refinin…
flowerthrower Nov 26, 2025
62dd819
🔧 Update dialect dependencies and refine test cases for quantum opera…
flowerthrower Nov 26, 2025
f422efc
🎨 improve tests
flowerthrower Nov 27, 2025
01c91f3
🐛 fix two minor bugs
flowerthrower Nov 27, 2025
e2efc99
🔧 Update MQT Core version and revision identifiers to 3.3.3
flowerthrower Nov 28, 2025
fc8a852
🔧 Enhance CMake configuration for catalyst plugin output directories …
flowerthrower Nov 28, 2025
7f8dfb5
🐛 fix permissions
flowerthrower Dec 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FormatStyle: file
HeaderFilterRegex: "^(?!.*plugins/).*"

Checks: |
bugprone-*,
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
name: 🇨‌ Lint
needs: change-detection
if: fromJSON(needs.change-detection.outputs.run-cpp-linter)
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@ea4fccbb432596cbb6840a9608d6376b6b2c8ff7 # v1.17.2
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@v1.17
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The version reference format changed from a specific commit hash to a version tag (v1.17). While this is more readable, it's less deterministic than pinning to a specific commit. Consider documenting this change if intentional.

Suggested change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@v1.17
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@ea4fccbb432596cbb6840a9608d6376b6b2c8ff7 # v1.17.2

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, let's read the ci.yml file to see the actual content around line 158
cat -n .github/workflows/ci.yml | sed -n '1,250p'

Repository: munich-quantum-toolkit/core

Length of output: 11093


Inconsistent workflow reference format and version mismatch on line 158.

Line 158 uses @v1.17 while all other workflow references in this file (lines 17, 33, 53, 74, 98, 121, 139, 149, 184, 192, 206, 214, 222, 240) use pinned commit hashes with version tags (e.g., @ea4fccbb432596cbb6840a9608d6376b6b2c8ff7 # v1.17.2). This breaks workflow reproducibility and deviates from the established pattern. Additionally, the version tag mismatch (v1.17 vs v1.17.2 used elsewhere) creates inconsistency. Restore the pinned commit hash format to match the pattern used throughout the file:

-    uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@v1.17
+    uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@ea4fccbb432596cbb6840a9608d6376b6b2c8ff7 # v1.17.2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@v1.17
uses: munich-quantum-toolkit/workflows/.github/workflows/reusable-cpp-linter.yml@ea4fccbb432596cbb6840a9608d6376b6b2c8ff7 # v1.17.2
🤖 Prompt for AI Agents
.github/workflows/ci.yml around line 158: the workflow reference uses an
unpinned tag "@v1.17" which is inconsistent with other entries that use pinned
commit hashes with version comments (e.g., "@<commit-hash> # v1.17.2"); replace
"@v1.17" with the exact commit hash used for v1.17.2 in this repository (and
append the same inline comment "# v1.17.2") so the reference matches the
pinned-hash + version-tag pattern used elsewhere in the file.

with:
cmake-args: -DBUILD_MQT_CORE_BENCHMARKS=ON -DBUILD_MQT_CORE_MLIR=ON -DBUILD_MQT_CORE_BINDINGS=ON
clang-version: 21
Expand All @@ -164,6 +164,7 @@ jobs:
setup-python: true
install-pkgs: "pybind11==3.0.0"
cpp-linter-extra-args: "-std=c++20"
cpp-linter-ignore-extra: "plugins/**"

python-tests:
name: 🐍 Test
Expand Down Expand Up @@ -243,6 +244,9 @@ jobs:
mlir-tests:
name: 🐉 Test
needs: change-detection
permissions:
contents: read
id-token: write
if: fromJSON(needs.change-detection.outputs.run-mlir)
uses: ./.github/workflows/reusable-mlir-tests.yml

Expand Down
187 changes: 187 additions & 0 deletions .github/workflows/ci_mlir_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
name: MLIR Plugin CI
on:
push:
branches:
- main
paths:
- "plugins/**"
pull_request:
paths:
- "plugins/**"
- ".github/workflows/ci_mlir_plugin.yml"
merge_group:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
cpp-test-mlir-catalyst-plugin-exact-mlir:
name: 🧩 Test MLIR Catalyst Plugin on ${{ matrix.runs-on }} from exact MLIR source
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
runs-on: [ubuntu-24.04, ubuntu-24.04-arm, macos-14]
fail-fast: false
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
CTEST_PARALLEL_LEVEL: 4
FORCE_COLOR: 3
steps:
# Check out the repository
- uses: actions/checkout@v4
with:
fetch-depth: 0

# set up gcc as compiler
- name: Set up GCC as compiler
if: runner.os == 'Linux'
run: |
echo "C_COMPILER=gcc-14" >> $GITHUB_ENV
echo "CXX_COMPILER=g++-14" >> $GITHUB_ENV
echo "CC=gcc-14" >> $GITHUB_ENV
echo "CXX=g++-14" >> $GITHUB_ENV

# set up ccache for faster C++ builds
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
prepend_symlinks_to_path: false
override_cache_key: mlir-plugin-${{ matrix.runs-on }}-exact-mlir

Comment thread
flowerthrower marked this conversation as resolved.
# Set up uv for faster Python package management
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
python-version: 3.13
activate-environment: true

# Check out the LLVM commit Catalyst is based on
- name: Checkout llvm
uses: actions/checkout@v4
with:
repository: llvm/llvm-project
ref: f8cb7987c64dcffb72414a40560055cb717dbf74
path: llvm-project

# Install LLVM
- name: Install LLVM
working-directory: llvm-project
run: |
cmake \
-S llvm \
-B build_llvm \
-G Ninja \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_BUILD_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_EXAMPLES=OFF \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_ZLIB=FORCE_ON \
-DLLVM_ENABLE_ZSTD=OFF \
-DCMAKE_CXX_VISIBILITY_PRESET=default
cmake --build build_llvm --config Release
Comment thread
flowerthrower marked this conversation as resolved.
echo "MLIR_DIR=$(pwd)/build_llvm/lib/cmake/mlir" >> $GITHUB_ENV
echo "LLVM_DIR=$(pwd)/build_llvm/lib/cmake/llvm" >> $GITHUB_ENV

Comment thread
flowerthrower marked this conversation as resolved.
# Build the plugin package
- name: Build mqt-core-catalyst-plugin
working-directory: plugins/catalyst
run: uv sync --verbose --active

# Print shared library dependencies for the plugin
- name: Print shared library dependencies for mqt-core-catalyst-plugin
run: |
if [ "$(uname)" = "Linux" ]; then
ldd .venv/lib/python3.13/site-packages/mqt/core/plugins/catalyst/mqt-core-catalyst-plugin.so || true
elif [ "$(uname)" = "Darwin" ]; then
otool -l .venv/lib/python3.13/site-packages/mqt/core/plugins/catalyst/mqt-core-catalyst-plugin.dylib || true
fi

Comment thread
flowerthrower marked this conversation as resolved.
# Print shared library dependencies for Catalyst
- name: Print shared library dependencies for Catalyst
run: |
if [ "$(uname)" = "Linux" ]; then
ldd $(which catalyst) || true
elif [ "$(uname)" = "Darwin" ]; then
otool -l $(which catalyst) || true
fi
Comment thread
flowerthrower marked this conversation as resolved.

# Reconfigure CMake for LIT
- name: Reconfigure CMake for LIT
working-directory: plugins/catalyst
run: |
BUILD_DIR=$(find build -type d -name Release | head -n1)
if [ -z "$BUILD_DIR" ]; then
BUILD_DIR="build"
fi
Comment on lines +117 to +120
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

BUILD_DIR detection logic is duplicated across three steps.

The same BUILD_DIR detection pattern (find Release subdir, fallback to "build") appears in three places. This is a code smell that violates DRY and makes future maintenance harder.

Consider extracting this to a reusable shell function or GitHub Actions composite action. For example, define a shell function early in the workflow:

detect_build_dir() {
  local dir=$(find build -type d -name Release | head -n1)
  echo "${dir:-build}"
}

Then call it in each step:

       - name: Reconfigure CMake for LIT
         working-directory: plugins/catalyst
         run: |
+          detect_build_dir() {
+            local dir=$(find build -type d -name Release | head -n1)
+            echo "${dir:-build}"
+          }
-          BUILD_DIR=$(find build -type d -name Release | head -n1)
-          if [ -z "$BUILD_DIR" ]; then
-            BUILD_DIR="build"
-          fi
+          BUILD_DIR=$(detect_build_dir)

Repeat for the clang-tidy and LIT test steps.

Also applies to: 138-141, 178-181

🤖 Prompt for AI Agents
.github/workflows/ci_mlir_plugin.yml lines 117-120 (also similar blocks at
138-141 and 178-181): the BUILD_DIR detection logic is duplicated across three
steps; extract the logic into a single reusable function or composite action and
call it from each step instead of repeating the find/fallback block. Add a shell
function (e.g., detect_build_dir) defined once in the workflow's top-level run:
or a reusable composite action that returns the build dir, then replace each
duplicated block with a simple call that assigns BUILD_DIR=$(detect_build_dir)
(or uses the composite action output) so all three steps share the same
implementation and fallback behavior.


# Verify lit is installed, install if missing
if ! command -v lit &> /dev/null; then
echo "lit not found, installing..."
python -m pip install lit
fi

cmake -S . \
-B "$BUILD_DIR" \
-DLLVM_EXTERNAL_LIT=$(which lit) \
-DPython3_EXECUTABLE=$(which python) \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON

Comment thread
flowerthrower marked this conversation as resolved.
# Run clang-tidy on plugin code
- name: Run clang-tidy on plugin
working-directory: plugins/catalyst
run: |
BUILD_DIR=$(find build -type d -name Release | head -n1)
if [ -z "$BUILD_DIR" ]; then
BUILD_DIR="build"
fi

# Check if compilation database exists
if [ ! -f "$BUILD_DIR/compile_commands.json" ]; then
echo "No compilation database found, skipping clang-tidy"
exit 0
fi

# Find all C++ source files in the plugin
FILES=$(find lib include -name "*.cpp" -o -name "*.h" 2>/dev/null || true)
if [ -z "$FILES" ]; then
echo "No C++ files found to analyze"
exit 0
fi

# Find Catalyst include directory
CATALYST_INCLUDE=$(find .venv -path "*/catalyst/include" -type d | head -n1)
if [ -z "$CATALYST_INCLUDE" ]; then
echo "Catalyst include directory not found, running without extra includes"
EXTRA_ARGS=""
else
echo "Found Catalyst includes at: $CATALYST_INCLUDE"
EXTRA_ARGS="--extra-arg=-I$CATALYST_INCLUDE"
fi

echo "Running clang-tidy on plugin files..."
echo "$FILES" | xargs clang-tidy \
-p="$BUILD_DIR" \
--config-file=.clang-tidy \
--format-style=file \
$EXTRA_ARGS \
|| echo "clang-tidy completed with warnings"

# Run the MLIR LIT tests
- name: Run LIT tests
working-directory: plugins/catalyst
run: |
BUILD_DIR=$(find build -type d -name Release | head -n1)
if [ -z "$BUILD_DIR" ]; then
BUILD_DIR="build"
fi
ninja -C "$BUILD_DIR" check-mqt-core-catalyst-plugin

Comment thread
flowerthrower marked this conversation as resolved.
# Run the plugin Python tests
- name: Run pytest for mqt-core-catalyst-plugin
working-directory: plugins/catalyst
run: python -m pytest -s --verbose
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ python/**/_version.py
# SKBuild cache dir
_skbuild/

# Any build dirs in the tests
# Any build dirs
test/**/build/
plugins/**/build/

# Common editor files
*~
Expand Down Expand Up @@ -167,9 +168,7 @@ Thumbs.db
/distro/plans/main.fmf
/distro/tests/main.fmf

/docs/**/build
.vs
out/build

node_modules/
wheelhouse/
Expand Down
4 changes: 3 additions & 1 deletion cmake/SetupMLIR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ set(MQT_MLIR_MIN_VERSION
# MLIR must be installed on the system
find_package(MLIR REQUIRED CONFIG)
if(MLIR_VERSION VERSION_LESS MQT_MLIR_MIN_VERSION)
message(FATAL_ERROR "MLIR version must be at least ${MQT_MLIR_MIN_VERSION}")
message(
FATAL_ERROR "MLIR version must be at least ${MQT_MLIR_MIN_VERSION} but found ${MLIR_VERSION}")

Comment thread
flowerthrower marked this conversation as resolved.
endif()
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
Expand Down
1 change: 1 addition & 0 deletions plugins/catalyst/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
BasedOnStyle: InheritParentConfig
2 changes: 2 additions & 0 deletions plugins/catalyst/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
InheritParentConfig: true
HeaderFilterRegex: ".*"
Comment thread
flowerthrower marked this conversation as resolved.
65 changes: 65 additions & 0 deletions plugins/catalyst/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
# Copyright (c) 2025 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License

# set required cmake version
cmake_minimum_required(VERSION 3.24...4.0)

project(
mqt-core-catalyst-plugin
LANGUAGES C CXX
VERSION 0.1.0
DESCRIPTION "MQT Core MLIR Plugin for Catalyst")

set(CMAKE_CXX_STANDARD
20
CACHE STRING "C++ standard to conform to")

if(ENABLE_COVERAGE)
add_compile_options(--coverage -O0)
add_link_options(--coverage)
endif()
Comment thread
flowerthrower marked this conversation as resolved.

include(cmake/ExternalDependencies.cmake)

set(MQT_MLIR_PLUGIN_SOURCE_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
set(MQT_MLIR_PLUGIN_BUILD_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/include")

# MLIR must be installed on the system
find_package(MLIR REQUIRED CONFIG)

# Add the paths to the MLIR and LLVM CMake modules.
list(APPEND CMAKE_MODULE_PATH "${MLIR_CMAKE_DIR}")
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_DIR}")

# Include the TableGen, LLVM and MLIR CMake modules.
include(TableGen)
include(AddLLVM)
include(AddMLIR)
include(HandleLLVMOptions)

include_directories(${LLVM_INCLUDE_DIRS})
include_directories(${MLIR_INCLUDE_DIRS})
include_directories(BEFORE ${MQT_MLIR_PLUGIN_SOURCE_INCLUDE_DIR})
include_directories(BEFORE ${MQT_MLIR_PLUGIN_BUILD_INCLUDE_DIR})
include_directories(${CATALYST_INCLUDE_DIRS})

Comment thread
burgholzer marked this conversation as resolved.
link_directories(${LLVM_BUILD_LIBRARY_DIR})
add_definitions(${LLVM_DEFINITIONS})

Comment thread
burgholzer marked this conversation as resolved.
if(APPLE)
set(BASEPOINT @loader_path)
else()
set(BASEPOINT $ORIGIN)
endif()
set(CMAKE_INSTALL_RPATH ${BASEPOINT} ${BASEPOINT}/${CMAKE_INSTALL_LIBDIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)

Comment thread
burgholzer marked this conversation as resolved.
add_subdirectory(include)
add_subdirectory(lib)
add_subdirectory(test)
22 changes: 22 additions & 0 deletions plugins/catalyst/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License
Comment thread
flowerthrower marked this conversation as resolved.

Copyright (c) 2023 - 2025 Chair for Design Automation, TUM
Copyright (c) 2025 Munich Quantum Software Company GmbH

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Comment thread
flowerthrower marked this conversation as resolved.
Loading