Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
91b3ef9
feat(mlir): :sparkles: implement dead gate elimination canonicalizati…
DRovara Jun 1, 2026
ba57aa2
fix(mlir): :bug: fix tests
DRovara Jun 1, 2026
b83afab
test(mlir): :white_check_mark: add direct test for dead gate elimination
DRovara Jun 1, 2026
4243ac0
docs(mlir): :memo: update changelog
DRovara Jun 1, 2026
a50032b
style(mlir): :rotating_light: fix linter issues
DRovara Jun 1, 2026
d8c9ad5
fix(mlir): :recycle: guard RegionOp removal for child oeprations with…
DRovara Jun 2, 2026
9717547
fix(mlir): :bug: fix handling for `IfOp` removal and add specialized …
DRovara Jun 2, 2026
2d65418
fix(mlir): :bug: minor bug and code style fixes
DRovara Jun 2, 2026
278a54e
style(mlir): :rotating_light: fix linter issues on includes
DRovara Jun 2, 2026
44eaf7e
fix: :pencil2: fix typo in changelog
DRovara Jun 2, 2026
8b3af43
🎨 Optimize `checkAndRemoveDeadGate` function
burgholzer Jun 2, 2026
6998110
📝 Add to generic changelog entry for mqt-cc
burgholzer Jun 2, 2026
d56ccaf
Update mlir/lib/Dialect/QCO/IR/Operations/ResetOp.cpp
DRovara Jun 3, 2026
fb9fffb
🎨 pre-commit fixes
pre-commit-ci[bot] Jun 3, 2026
44f295a
test(mlir): :white_check_mark: improve test and add custom return typ…
DRovara Jun 3, 2026
9e8e711
Merge branch 'mlir/dead-gate-elimination' of github.com:munich-quantu…
DRovara Jun 3, 2026
b6cbf8e
style(mlir): :recycle: remove unneeded dumps
DRovara Jun 3, 2026
dee0752
style(mlir): :recycle: move `checkAndRemoveDeadGate` implementation o…
DRovara Jun 3, 2026
244f8bb
style(mlir): :recycle: implement helper function to check if a gate i…
DRovara Jun 3, 2026
6eaac40
style(mlir): :rotating_light: fix includes
DRovara Jun 3, 2026
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 @@ -18,7 +18,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel
- ✨ Add conversions between `jeff` and QCO ([#1479], [#1548], [#1565], [#1637], [#1676], [#1706]) ([**@denialhaag**], [**@burgholzer**])
- ✨ Add a `place-and-route` pass for mapping circuits to architectures with restricted topologies ([#1537], [#1547], [#1568], [#1581], [#1583], [#1588], [#1600], [#1664], [#1709], [#1716], [#1748]) ([**@MatthiasReumann**], [**@burgholzer**])
- ✨ Add initial infrastructure for new QC and QCO MLIR dialects
([#1264], [#1330], [#1402], [#1428], [#1430], [#1436], [#1443], [#1446], [#1464], [#1465], [#1470], [#1471], [#1472], [#1474], [#1475], [#1506], [#1510], [#1513], [#1521], [#1542], [#1548], [#1550], [#1554], [#1567], [#1569], [#1570], [#1572], [#1573], [#1580], [#1602], [#1620], [#1623], [#1624], [#1626], [#1627], [#1635], [#1638], [#1673], [#1675], [#1700], [#1717], [#1728], [#1730], [#1749])
([#1264], [#1330], [#1402], [#1428], [#1430], [#1436], [#1443], [#1446], [#1464], [#1465], [#1470], [#1471], [#1472], [#1474], [#1475], [#1506], [#1510], [#1513], [#1521], [#1542], [#1548], [#1550], [#1554], [#1567], [#1569], [#1570], [#1572], [#1573], [#1580], [#1602], [#1620], [#1623], [#1624], [#1626], [#1627], [#1635], [#1638], [#1673], [#1675], [#1700], [#1717], [#1728], [#1730], [#1749], [#1755])
([**@burgholzer**], [**@denialhaag**], [**@taminob**], [**@DRovara**], [**@li-mingbao**], [**@Ectras**], [**@MatthiasReumann**], [**@simon1hofmann**])

### Changed
Expand Down Expand Up @@ -402,6 +402,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool

<!-- PR links -->

[#1755]: https://github.com/munich-quantum-toolkit/core/pull/1755
[#1749]: https://github.com/munich-quantum-toolkit/core/pull/1749
[#1748]: https://github.com/munich-quantum-toolkit/core/pull/1748
[#1737]: https://github.com/munich-quantum-toolkit/core/pull/1737
Expand Down
33 changes: 32 additions & 1 deletion mlir/include/mlir/Dialect/QCO/Builder/QCOProgramBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,26 @@ class QCOProgramBuilder final : public ImplicitLocOpBuilder {
//===--------------------------------------------------------------------===//

/**
* @brief Initialize the builder and prepare for program construction
* @brief Initialize the builder and prepare for program construction, with
* a default return type of i64.
*
* @details
* Creates a main function with an entry_point attribute. Must be called
* before adding operations.
*/
void initialize();

/**
* @brief Initialize the builder and prepare for program construction
* with specified return types.
* @param returnTypes The return types for the main function
*
* @details
* Creates a main function with an entry_point attribute. Must be called
* before adding operations.
*/
void initialize(TypeRange returnTypes);

//===--------------------------------------------------------------------===//
// Constants
//===--------------------------------------------------------------------===//
Expand Down Expand Up @@ -1375,6 +1387,25 @@ class QCOProgramBuilder final : public ImplicitLocOpBuilder {
*/
OwningOpRef<ModuleOp> finalize();

/**
* @brief Finalize the program with a given exit code and return the
* constructed module
* @param returnValues Values representing the exit code to return
*
* @details
* Automatically deallocates all remaining valid qubits and tensors of qubits,
* adds a return statement with a given exit code,
* and transfers ownership of the module to the caller. The builder should not
* be used after calling this method.
*
* The return values must have the types indicated by the function signature
* of the main function, which returns an `i64` by default and can be
* modified by passing different arguments to the `initialize()` method.
*
* @return OwningOpRef containing the constructed quantum program module
*/
OwningOpRef<ModuleOp> finalize(ValueRange returnValues);

/**
* @brief Convenience method for building quantum programs
* @param context The MLIR context to use for building the program
Expand Down
2 changes: 2 additions & 0 deletions mlir/include/mlir/Dialect/QCO/IR/QCODialect.td
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def QCODialect : Dialect {
let cppNamespace = "::mlir::qco";

let useDefaultTypePrinterParser = 1;

let hasCanonicalizer = 1;
}

#endif // MLIR_DIALECT_QCO_IR_QCODIALECT_TD
Loading
Loading