-
Notifications
You must be signed in to change notification settings - Fork 35
MLIR Conversion(s) #880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
MLIR Conversion(s) #880
Changes from all commits
0589644
34387f5
3543439
15151e4
63ddd2f
5eefc34
6ef8276
35d781f
54f1f19
12d8f11
9a0fb1c
a46def1
d8aed8f
00b3d40
17291af
0d59f0a
4344df3
27cc84f
d78e5db
839fb5b
e4c0196
a019076
1daaec1
c7deddd
d3a42b3
e593baf
92b4742
ee108b7
c3eea64
3fb5ce3
07e5130
17c1e22
bb3cd4e
54d8064
a6eb526
de4b879
f9d6359
494f495
39f9460
e63f165
9f09e87
4757068
38d3f6a
f2e929d
461845d
bb31dd8
98f3da9
91cff38
2b460c8
684b5cf
562de94
b8a7569
903b5d7
39cf8e5
cef9047
f94019a
4dbd59d
24cec28
f238319
4a3bdf0
6b8d7ad
042d068
3373c76
5e7d6c6
7d12f7c
beec847
4edf6f3
60f3ee8
a8cd104
1ac55bc
0f8e199
893c2f3
ebbda74
2b824d1
7199987
d06c7f0
9246feb
55485c0
89336e2
8b09c68
c1b5efa
166bca6
cffe6bb
af534ff
956260c
4df9fb8
4c721ae
cecd0d6
a6cb11e
a3a651c
6bcf5cc
e81af86
3f0775f
8e45ec1
d3df8c1
47258fe
5d7a702
5d380d6
5abe9b1
889ffd6
8142225
e60af0f
cab888a
c1ec80c
0b084eb
e905f08
7dde58e
7841b33
d2213ea
d1f480f
6166d72
d97e5ef
1ac3384
35236d2
65ec200
fad43e4
c45fadf
a8b32ac
a5c0be4
1f254f7
40845b9
2134e36
dbdf863
08591a5
f3d9ded
4620c18
472616b
5289a0f
02d3c2b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,122 @@ | ||||||
name: Catalyst CI | ||||||
on: | ||||||
push: | ||||||
branches: | ||||||
- main | ||||||
paths: | ||||||
- "mlir/**" | ||||||
pull_request: | ||||||
paths: | ||||||
- "mlir/**" | ||||||
- ".github/workflows/ci_catalyst.yml" | ||||||
merge_group: | ||||||
workflow_dispatch: | ||||||
|
||||||
concurrency: | ||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||||||
cancel-in-progress: true | ||||||
|
||||||
jobs: | ||||||
cpp-test-catalyst: | ||||||
name: 🇨 Test MLIR with LLVM@${{ matrix.llvm-version }} | ||||||
runs-on: macos-14 | ||||||
strategy: | ||||||
matrix: | ||||||
llvm-version: [19] | ||||||
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 ccache for faster C++ builds | ||||||
- name: Setup ccache | ||||||
uses: Chocobo1/setup-ccache-action@v1 | ||||||
with: | ||||||
prepend_symlinks_to_path: false | ||||||
override_cache_key: c++-tests-mlir | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fairly sure you need to use a different cache key here, otherwise there will be cache contention between the jobs.
Suggested change
If we extend the matrix of CI workflows above, the cache key should also be updated. |
||||||
|
||||||
# set up mold as linker for faster C++ builds | ||||||
- name: Set up mold as linker | ||||||
uses: rui314/setup-mold@v1 | ||||||
|
||||||
# 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 | ||||||
|
||||||
# make sure ninja is installed | ||||||
- name: Install Ninja | ||||||
run: uv tool install ninja | ||||||
|
||||||
# make sure the lit test runner is installed | ||||||
- name: Install lit | ||||||
run: uv pip install lit | ||||||
|
||||||
# install LLVM 19 and MLIR via Homebrew and set up environment variables | ||||||
- name: Install LLVM and MLIR via Homebrew | ||||||
run: | | ||||||
brew install llvm@19 | ||||||
brew link --force --overwrite llvm@19 | ||||||
echo "CC=$(brew --prefix llvm@19)/bin/clang" >> $GITHUB_ENV | ||||||
echo "CXX=$(brew --prefix llvm@19)/bin/clang++" >> $GITHUB_ENV | ||||||
echo "MLIR_DIR=$(brew --prefix llvm@19)/lib/cmake/mlir" >> $GITHUB_ENV | ||||||
echo "LLVM_DIR=$(brew --prefix llvm@19)/lib/cmake/llvm" >> $GITHUB_ENV | ||||||
echo "$(brew --prefix llvm@19)/bin" >> $GITHUB_PATH | ||||||
|
||||||
# clone PennyLane Catalyst (from patched branch) - excl. submodules | ||||||
- name: Clone PennyLane Catalyst | ||||||
run: | | ||||||
git clone --branch mqt_integration --depth=1 https://github.com/flowerthrower/catalyst.git catalyst | ||||||
|
||||||
- name: Set macOS deployment target for linker | ||||||
run: echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV | ||||||
Comment on lines
+78
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not be necessary as you are running on macOS 14 already.
Comment on lines
+78
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not be necessary as you are running on macOS 14 already. |
||||||
|
||||||
# configure only MLIRQuantum dialect (skip building tools) | ||||||
- name: Configure MLIRQuantum dialect | ||||||
run: | | ||||||
cmake -G Ninja -S catalyst/mlir -B catalyst/mlir/build \ | ||||||
-DCMAKE_BUILD_TYPE=Release \ | ||||||
-DMLIR_DIR=$MLIR_DIR \ | ||||||
-DLLVM_DIR=$LLVM_DIR \ | ||||||
-DCATALYST_BUILD_TOOLS=OFF \ | ||||||
-DEnzyme_DIR="none" | ||||||
|
||||||
# build MLIRQuantum | ||||||
- name: Build MLIRQuantum dialect | ||||||
run: | | ||||||
ninja -C catalyst/mlir/build MLIRQuantum | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
- name: Check Catalyst CMake config | ||||||
run: test -f catalyst/mlir/build/lib/cmake/catalyst/CatalystConfig.cmake | ||||||
|
||||||
# configure the project with CMake | ||||||
- name: Configure CMake for MLIR | ||||||
run: | | ||||||
cmake -G Ninja -S . -B build \ | ||||||
-DCMAKE_BUILD_TYPE=Release \ | ||||||
-DBUILD_MQT_CORE_MLIR=ON \ | ||||||
-DENABLE_MQT_CORE_MLIR_CATALYST_PLUGIN=ON \ | ||||||
-DCatalyst_DIR="$PWD/catalyst/mlir/build/lib/cmake/catalyst" | ||||||
|
||||||
# build the project | ||||||
- name: Build MLIR quantum-opt | ||||||
run: cmake --build build --config Release --target quantum-opt | ||||||
|
||||||
# run conversion pipeline | ||||||
- name: Run conversion -> catalystquantum-to-mqtopt | ||||||
run: | | ||||||
./build/mlir/tools/quantum-opt/quantum-opt \ | ||||||
--pass-pipeline="builtin.module(catalystquantum-to-mqtopt)" \ | ||||||
mlir/test/Conversion/quantum.mlir | ||||||
- name: Run conversion -> mqtopt-to-catalystquantum | ||||||
run: | | ||||||
./build/mlir/tools/quantum-opt/quantum-opt \ | ||||||
--pass-pipeline="builtin.module(mqtopt-to-catalystquantum)" \ | ||||||
mlir/test/Conversion/mqtopt.mlir |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -73,3 +73,23 @@ endif() | |||||||||||||||
|
||||||||||||||||
# Make all declared dependencies available. | ||||||||||||||||
FetchContent_MakeAvailable(${FETCH_PACKAGES}) | ||||||||||||||||
|
||||||||||||||||
if(ENABLE_MQT_CORE_MLIR_CATALYST_PLUGIN) | ||||||||||||||||
# Manually detect the installed Catalyst Python and get its cmake directory. | ||||||||||||||||
execute_process( | ||||||||||||||||
COMMAND "${Python_EXECUTABLE}" -c | ||||||||||||||||
"import catalyst, os; print(os.path.dirname(catalyst.__file__))" | ||||||||||||||||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||||||||||||||||
OUTPUT_VARIABLE Python_Catalyst_DIR | ||||||||||||||||
ERROR_QUIET) | ||||||||||||||||
message(STATUS "Found Catalyst package: ${Python_Catalyst_DIR}") | ||||||||||||||||
|
||||||||||||||||
# TODO: once the Catalyst Python package provides the necessary files set(Catalyst_DIR | ||||||||||||||||
# "${Python_Catalyst_DIR}/mlir/build/lib/cmake/catalyst") | ||||||||||||||||
Comment on lines
+78
to
+88
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally, there would be no need to do something like |
||||||||||||||||
if(Catalyst_DIR) | ||||||||||||||||
list(APPEND CMAKE_PREFIX_PATH "${Catalyst_DIR}") | ||||||||||||||||
find_package(Catalyst REQUIRED) | ||||||||||||||||
else() | ||||||||||||||||
message(STATUS "Could not detect Catalyst CMake directory") | ||||||||||||||||
endif() | ||||||||||||||||
Comment on lines
+89
to
+94
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This needs to fail hard if Catalyst cannot be found.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once a compatible version of Catalyst is released, this will probably also require a version specifier to indicate the minimum version required. |
||||||||||||||||
endif() |
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,9 +12,8 @@ set(MQT_MLIR_MIN_VERSION 19.0) | |||||||||||
|
||||||||||||
# 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}") | ||||||||||||
endif() | ||||||||||||
# if(MLIR_VERSION VERSION_LESS MQT_MLIR_MIN_VERSION) message(FATAL_ERROR "MLIR version must be at | ||||||||||||
# least ${MQT_MLIR_MIN_VERSION} but found ${MLIR_VERSION}") endif() | ||||||||||||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this commented out?
Suggested change
|
||||||||||||
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}") | ||||||||||||
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}") | ||||||||||||
|
||||||||||||
|
@@ -26,6 +25,13 @@ string(REPLACE "." ";" MLIR_VERSION_COMPONENTS ${MLIR_VERSION}) | |||||||||||
list(GET MLIR_VERSION_COMPONENTS 0 MLIR_VERSION_MAJOR) | ||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just because I stumbe over it right now: Is this gymnastic with the version string necessary or can the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems reasonable to use |
||||||||||||
add_compile_definitions(MLIR_VERSION_MAJOR=${MLIR_VERSION_MAJOR}) | ||||||||||||
|
||||||||||||
option(ENABLE_MQT_CORE_MLIR_CATALYST_PLUGIN "Enable Catalyst conversion passes" OFF) | ||||||||||||
if(ENABLE_MQT_CORE_MLIR_CATALYST_PLUGIN) | ||||||||||||
message(STATUS "Found MLIR version ${MLIR_VERSION_MAJOR}.") | ||||||||||||
list(APPEND CMAKE_MODULE_PATH "${CATALYST_CMAKE_DIR}") | ||||||||||||
list(APPEND MLIR_INCLUDE_DIRS "${CATALYST_INCLUDE_DIRS}") | ||||||||||||
endif() | ||||||||||||
|
||||||||||||
# Include the TableGen, LLVM and MLIR CMake modules. | ||||||||||||
include(TableGen) | ||||||||||||
include(AddLLVM) | ||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
# Licensed under the MIT License | ||
|
||
add_subdirectory(Dialect) | ||
add_subdirectory(Conversion) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 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 | ||
|
||
if(ENABLE_MQT_CORE_MLIR_CATALYST_PLUGIN) | ||
add_subdirectory(Catalyst) | ||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 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 | ||
|
||
add_subdirectory(MQTOptToCatalystQuantum) | ||
add_subdirectory(CatalystQuantumToMQTOpt) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 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(LLVM_TARGET_DEFINITIONS CatalystQuantumToMQTOpt.td) | ||
mlir_tablegen(CatalystQuantumToMQTOpt.h.inc -gen-pass-decls -name CatalystQuantumToMQTOpt) | ||
add_public_tablegen_target(CatalystQuantumToMQTOptIncGen) | ||
|
||
add_mlir_doc(CatalystQuantumToMQTOpt CatalystQuantumToMQTOpt ./ -gen-pass-doc) |
burgholzer marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* 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 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <mlir/Pass/Pass.h> // from @llvm-project | ||
|
||
namespace mlir::mqt::ir::conversions { | ||
|
||
#define GEN_PASS_DECL | ||
#include "mlir/Conversion/Catalyst/CatalystQuantumToMQTOpt/CatalystQuantumToMQTOpt.h.inc" | ||
|
||
#define GEN_PASS_REGISTRATION | ||
#include "mlir/Conversion/Catalyst/CatalystQuantumToMQTOpt/CatalystQuantumToMQTOpt.h.inc" | ||
|
||
} // namespace mlir::mqt::ir::conversions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// 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 | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def CatalystQuantumToMQTOpt : Pass<"catalystquantum-to-mqtopt"> { | ||
let summary = "Convert Catalyst's `Quantum` to MQT's `MQTOpt` dialect."; | ||
|
||
let description = [{ | ||
This pass converts Catalyst's `Quantum` to MQT's `MQTOpt` dialect. | ||
The following operations are currently NOT converted (and instead marked legal): | ||
- DeviceInitOp | ||
- DeviceReleaseOp | ||
- NamedObsOp | ||
- ExpvalOp | ||
- FinalizeOp | ||
- ComputationalBasisOp | ||
- StateOp | ||
- InitializeOp | ||
}]; | ||
|
||
// Define dependent dialects | ||
let dependentDialects = [ | ||
"catalyst::quantum::QuantumDialect", | ||
"::mqt::ir::opt::MQTOptDialect" | ||
]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 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(LLVM_TARGET_DEFINITIONS MQTOptToCatalystQuantum.td) | ||
mlir_tablegen(MQTOptToCatalystQuantum.h.inc -gen-pass-decls -name MQTOptToCatalystQuantum) | ||
add_public_tablegen_target(MQTOptToCatalystQuantumIncGen) | ||
|
||
add_mlir_doc(MQTOptToCatalystQuantum MQTOptToCatalystQuantum ./ -gen-pass-doc) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* 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 | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <mlir/Pass/Pass.h> // from @llvm-project | ||
|
||
namespace mlir::mqt::ir::conversions { | ||
|
||
#define GEN_PASS_DECL | ||
#include "mlir/Conversion/Catalyst/MQTOptToCatalystQuantum/MQTOptToCatalystQuantum.h.inc" | ||
|
||
#define GEN_PASS_REGISTRATION | ||
#include "mlir/Conversion/Catalyst/MQTOptToCatalystQuantum/MQTOptToCatalystQuantum.h.inc" | ||
|
||
} // namespace mlir::mqt::ir::conversions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// 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 | ||
|
||
include "mlir/Pass/PassBase.td" | ||
|
||
def MQTOptToCatalystQuantum : Pass<"mqtopt-to-catalystquantum"> { | ||
let summary = "Convert MQT's `MQTOpt` to Catalyst's `Quantum` dialect."; | ||
|
||
let description = [{ | ||
This pass converts MQT's `MQTOpt` to Catalyst's `Quantum` dialect. | ||
The following operations are currently NOT converted (and instead marked legal): | ||
- IOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The identity gate is mapped to the Catalyst name "Identity". So this is definitely supported for conversion |
||
- GPhaseOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
- BarrierOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not quite sure we want to keep barriers around if we are translating between dialects. Ideally, we would want the conversion to be a true conversion in the sense that the whole circuit is translated. |
||
- SOp, SdgOp | ||
- TOp, TdgOp | ||
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both |
||
- VOp, VdgOp | ||
- UOp, U2Op | ||
- SXOp, SXdgOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This as well as the |
||
- iSWAPOp, iSWAPdgOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- PeresOp, PeresdgOp | ||
- DCXOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to add another comment here: One could probably add support for these gates by specifying them as a unitary matrix, right? |
||
- ECROp | ||
- RXXOp, RYYOp, RZZOp, RZXOp | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to https://github.com/PennyLaneAI/catalyst/blob/e89b83d393be158be499a95ce02b1312e7e89bbd/frontend/test/pytest/test_operations.py#L114-L124, at least RXX, RYY and RZZ are also supported. |
||
- XXminusYY, XXplusYY | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One final comment here: For some of these gates, a single gate could be replaced by a decomposed version of the gate only using gates supported by the other dialect. |
||
}]; | ||
let dependentDialects = [ | ||
"catalyst::quantum::QuantumDialect", | ||
"::mqt::ir::opt::MQTOptDialect" | ||
]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
# Licensed under the MIT License | ||
|
||
add_subdirectory(Dialect) | ||
add_subdirectory(Conversion) |
burgholzer marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 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 | ||
|
||
if(ENABLE_MQT_CORE_MLIR_CATALYST_PLUGIN) | ||
add_subdirectory(Catalyst) | ||
endif() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# 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 | ||
|
||
add_subdirectory(MQTOptToCatalystQuantum) | ||
add_subdirectory(CatalystQuantumToMQTOpt) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# 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 | ||
|
||
file(GLOB CONVERSION_SOURCES *.cpp) | ||
|
||
add_mlir_library(CatalystQuantumToMQTOpt ${CONVERSION_SOURCES} LINK_LIBS ${LIBRARIES} DEPENDS | ||
CatalystQuantumToMQTOptIncGen) | ||
|
||
target_link_libraries(CatalystQuantumToMQTOpt PRIVATE MLIRQuantum) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be interesting to see this work on
macos-13
(x86 runners) as well asllvm-version: 20
.The current build pipeline seems to pass, which is great already!
Unrelated to this PR in particular, but what could be a nice byproduct in a separate PR is that this already represents a functional macOS-14 CI pipeline for MLIR, which would be part of #925.