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 @@ -64,7 +64,7 @@ releases may include breaking changes.
#### Passes and transformations

- ✨ Add passes for quantum-specific interprocedural optimizations ([#2193],
[#2197]) ([**@DRovara**], [**@burgholzer**])
[#2197], [#2198]) ([**@DRovara**], [**@burgholzer**])
- ✨ Add Pauli twirling, quantum loop unrolling, and qubit reuse passes
([#1705], [#1718], [#1755], [#1756], [#1923], [#1924], [#2039], [#2118],
[#2216], [#2224]) ([**@MatthiasReumann**], [**@DRovara**], [**@burgholzer**],
Expand Down Expand Up @@ -890,6 +890,7 @@ for previous changelogs._
[#2216]: https://github.com/munich-quantum-toolkit/core/pull/2216
[#2203]: https://github.com/munich-quantum-toolkit/core/pull/2203
[#2214]: https://github.com/munich-quantum-toolkit/core/pull/2214
[#2198]: https://github.com/munich-quantum-toolkit/core/pull/2198
[#2197]: https://github.com/munich-quantum-toolkit/core/pull/2197
[#2196]: https://github.com/munich-quantum-toolkit/core/pull/2196
[#2194]: https://github.com/munich-quantum-toolkit/core/pull/2194
Expand Down
20 changes: 20 additions & 0 deletions mlir/include/mlir/Dialect/QCO/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,26 @@ def ContextSensitiveSpecialization
"mlir::qco::QCODialect"];
}

def QuantumArgumentPromotion
: Pass<"quantum-argument-promotion", "mlir::ModuleOp"> {
let summary = "Replace qubit-tensor arguments by the qubits a callee uses";
let description = [{
A tensor argument whose elements are taken out and put back at
compile-time constant indices is split into one qubit argument and one
qubit result per touched element, so untouched elements never cross the
call boundary. Call sites extract before and re-insert after the call.

The callee has to hand the tensor back as its first result, every
reference to it has to be a direct call, and elements taken out but
never put back prevent promotion.
}];

let dependentDialects = ["::mlir::func::FuncDialect",
"::mlir::arith::ArithDialect",
"::mlir::qtensor::QTensorDialect",
"mlir::qco::QCODialect"];
}

def RemoveDeadGates : Pass<"remove-dead-gates", "mlir::ModuleOp"> {
let dependentDialects = ["mlir::qco::QCODialect"];
let summary = "Remove quantum gates whose results cannot be observed";
Expand Down
Loading
Loading