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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ releases may include breaking changes.

#### Passes and transformations

- ✨ Add passes for quantum-specific interprocedural optimizations ([#2193])
([**@DRovara**], [**@burgholzer**])
- ✨ Add passes for quantum-specific interprocedural optimizations ([#2193],
[#2197]) ([**@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
[#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
[#2193]: https://github.com/munich-quantum-toolkit/core/pull/2193
Expand Down
25 changes: 25 additions & 0 deletions mlir/include/mlir/Dialect/QCO/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,31 @@ def ReuseQubits : Pass<"reuse-qubits", "mlir::ModuleOp"> {
}];
}

def ContextSensitiveSpecialization
: Pass<"quantum-context-sensitive-specialization", "mlir::ModuleOp"> {
let summary = "Specialize callees for what is known at their call sites";
let description = [{
Redirects a `func.call` to a specialized copy of its callee whenever the
call site pins down something the callee can exploit:

- a qubit argument known to be in the |0> state, which lets operations
that fix |0> be dropped;
- a qubit argument known to be in the |+> state, which lets an `x` be
dropped;
- a compile-time constant rotation angle from a small distinguished set,
which is folded into the copy.

Copies are shared between call sites with the same context. A callee
left without callers is erased, but only when this pass created the
situation; unrelated unused functions are left alone.
}];

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