-
-
Notifications
You must be signed in to change notification settings - Fork 1
Catalyst Quantum -> QC Conversion #87
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?
Changes from all commits
d0c370a
c997a9f
14129c5
64364f6
82bbf34
bad4111
473cfda
c09232c
0b1a52a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright (c) 2025 - 2026 Chair for Design Automation, TUM | ||
| # Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: MIT | ||
| # | ||
| # Licensed under the MIT License | ||
|
|
||
| set(LLVM_TARGET_DEFINITIONS CatalystQuantumToQC.td) | ||
| mlir_tablegen(CatalystQuantumToQC.h.inc -gen-pass-decls -name CatalystQuantumToQC) | ||
| add_public_tablegen_target(CatalystQuantumToQCIncGen) | ||
|
|
||
| add_mlir_doc(CatalystQuantumToQC CatalystQuantumToQC ./ -gen-pass-doc) |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright (c) 2025 - 2026 Chair for Design Automation, TUM | ||
| # Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: MIT | ||
| # | ||
| # Licensed under the MIT License | ||
|
|
||
| set(LLVM_TARGET_DEFINITIONS QCToCatalystQuantum.td) | ||
| mlir_tablegen(QCToCatalystQuantum.h.inc -gen-pass-decls -name QCToCatalystQuantum) | ||
| add_public_tablegen_target(QCToCatalystQuantumIncGen) | ||
|
|
||
| add_mlir_doc(QCToCatalystQuantum QCToCatalystQuantum ./ -gen-pass-doc) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,9 +15,9 @@ | |
| namespace mqt::ir::conversions { | ||
|
|
||
| #define GEN_PASS_DECL | ||
| #include "mlir/Conversion/CatalystQuantumToMQTOpt/CatalystQuantumToMQTOpt.h.inc" | ||
| #include "mlir/Conversion/QCToCatalystQuantum/QCToCatalystQuantum.h.inc" | ||
|
|
||
| #define GEN_PASS_REGISTRATION | ||
| #include "mlir/Conversion/CatalystQuantumToMQTOpt/CatalystQuantumToMQTOpt.h.inc" | ||
| #include "mlir/Conversion/QCToCatalystQuantum/QCToCatalystQuantum.h.inc" | ||
|
Comment on lines
17
to
+21
Contributor
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. Generate CI already fails because this renamed header is not being produced. Please add or fix the matching include-side TableGen wiring for 🤖 Prompt for AI Agents |
||
|
|
||
| } // namespace mqt::ir::conversions | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,17 +8,17 @@ | |
|
|
||
| include "mlir/Pass/PassBase.td" | ||
|
|
||
| def MQTOptToCatalystQuantum : Pass<"mqtopt-to-catalystquantum"> { | ||
| let summary = "Convert MQT's `MQTOpt` to Catalyst's `Quantum` dialect."; | ||
| def QCToCatalystQuantum : Pass<"qc-to-catalystquantum"> { | ||
| let summary = "Convert MQT's `QC` to Catalyst's `Quantum` dialect."; | ||
|
|
||
| let description = [{ | ||
| This pass converts MQT's `MQTOpt` to Catalyst's `Quantum` dialect. | ||
| This pass converts MQT's `QC` to Catalyst's `Quantum` dialect. | ||
| }]; | ||
| let dependentDialects = [ | ||
| "::catalyst::quantum::QuantumDialect", | ||
| "::mlir::arith::ArithDialect", | ||
| "::mlir::func::FuncDialect", | ||
| "::mlir::memref::MemRefDialect", | ||
| "::mqt::ir::opt::MQTOptDialect" | ||
| "::mlir::qc::QCDialect" | ||
|
Comment on lines
+11
to
+22
Contributor
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. Pass defined but registration is commented out. The
Per the PR description, this is intentional for the draft state since back-conversion is incomplete. Ensure the registration is uncommented when the implementation is ready. 🤖 Prompt for AI Agents |
||
| ]; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,8 +22,8 @@ add_subdirectory(Conversion) | |
|
|
||
| set(TARGET_NAME mqt-core-plugins-catalyst) | ||
|
|
||
| add_llvm_library(${TARGET_NAME} MODULE mqt-plugin.cpp LINK_LIBS CatalystQuantumToMQTOpt | ||
| MQTOptToCatalystQuantum) | ||
| add_llvm_library(${TARGET_NAME} MODULE mqt-plugin.cpp LINK_LIBS CatalystQuantumToQC) | ||
| # QCToCatalystQuantum) | ||
|
Comment on lines
+25
to
+26
Contributor
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. Link The plugin now expects both QC passes, but this target only links 🔧 Suggested linkage fix-add_llvm_library(${TARGET_NAME} MODULE mqt-plugin.cpp LINK_LIBS CatalystQuantumToQC)
-# QCToCatalystQuantum)
+add_llvm_library(
+ ${TARGET_NAME}
+ MODULE
+ mqt-plugin.cpp
+ LINK_LIBS
+ CatalystQuantumToQC
+ QCToCatalystQuantum)🤖 Prompt for AI Agents |
||
|
|
||
| # set required C++ standard | ||
| target_compile_features(${TARGET_NAME} PUBLIC cxx_std_20) | ||
|
|
||
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.
Personal fork and branch reference must be reverted before merging.
The external dependency now points to a personal fork (
NiklasKostrzewa/core) with a branch name (test_Memref_explicit) instead of the officialmunich-quantum-toolkit/corerepository with a pinned commit hash.Issues:
7d1d7fbbut the REV is set to a branch name.This is acceptable for a draft PR during development, but ensure these values are reverted to the official repository with a stable commit hash before merging.
Suggested values for merge readiness
🤖 Prompt for AI Agents