Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel

### Added

- ✨ Add initial infrastructure for new QC and QCO MLIR dialects ([#1264], [#1402], [#1428], [#1430], [#1436], [#1443], [#1446], [#1465]) ([**@burgholzer**], [**@denialhaag**], [**@taminob**], [**@DRovara**], [**@li-mingbao**])
- ✨ Add initial infrastructure for new QC and QCO MLIR dialects ([#1264], [#1402], [#1428], [#1430], [#1436], [#1443], [#1446], [#1464], [#1465]) ([**@burgholzer**], [**@denialhaag**], [**@taminob**], [**@DRovara**], [**@li-mingbao**])

### Changed

Expand Down Expand Up @@ -315,6 +315,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool
<!-- PR links -->

[#1465]: https://github.com/munich-quantum-toolkit/core/pull/1465
[#1464]: https://github.com/munich-quantum-toolkit/core/pull/1464
[#1458]: https://github.com/munich-quantum-toolkit/core/pull/1458
[#1453]: https://github.com/munich-quantum-toolkit/core/pull/1453
[#1447]: https://github.com/munich-quantum-toolkit/core/pull/1447
Expand Down
13 changes: 13 additions & 0 deletions mlir/unittests/Dialect/QCO/IR/Modifiers/test_qco_ctrl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,3 +221,16 @@ TEST_F(QCOCtrlOpTest, ParserErrors) {
.get(),
nullptr);
}

TEST_F(QCOCtrlOpTest, bodyUnitaryWithParameter) {
auto reg = builder.allocQubitRegister(2);
builder.crx(1.0, reg[0], reg[1]);
auto ctrlOp = cast<CtrlOp>(builder.getBlock()->getOperations().back());
module = builder.finalize();

auto bodyUnitary = ctrlOp.getBodyUnitary();
// Test if a valid unitary operation is returned
ASSERT_TRUE(bodyUnitary);
// Ensure it contains the correct operation type
EXPECT_EQ(bodyUnitary.getBaseSymbol(), "rx");
}
Loading