Skip to content

Commit 44cdf32

Browse files
committed
Update
1 parent fb5ac47 commit 44cdf32

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

doc/releases/changelog-dev.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212

1313
<h3>Improvements 🛠</h3>
1414

15+
* Add adjoint support to the decomposition graph solver, enabling `Adjoint(Op)` to be decomposed either
16+
via registered adjoint rules or by adjointing the base operator's decomposition rule,
17+
with the solver choosing the cheapest.
18+
[(#3001)](https://github.com/PennyLaneAI/catalyst/pull/3001)
19+
1520
* The `ResourceAnalysis` pass has received a new compiler hint to more accurately estimate quantum
1621
resources in the presence of conditional operations (`scf.if` and `scf.index_switch`). The
1722
operations in question can be annotated with either a `catalyst.estimated_probability` or

mlir/unittests/DecompGraphSolver/Test_DecompGraphSolverSymbolicOps.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ TEST_CASE("Test makeAdjointRule", "[DecompGraph::Core]")
6464
REQUIRE(adj.inputs[1].multiplicity == 1);
6565
}
6666

67-
TEST_CASE("Test DecompositionGraph adjoint rules from base rules",
68-
"[DecompGraph::Solver]")
67+
TEST_CASE("Test DecompositionGraph adjoint rules from base rules", "[DecompGraph::Solver]")
6968
{
7069
const OperatorNode rot{"Rot", 1, 3, false};
7170
const OperatorNode rz{"RZ", 1, 1, false};
@@ -97,7 +96,7 @@ TEST_CASE("Test DecompositionGraph does not synthesize adjoint rules for empty o
9796

9897
const WeightedGateset gateset{{{h, 1.0}}};
9998
const std::vector<RuleNode> rules{
100-
{"h_is_basis", h, {}}, // empty rule
99+
{"h_is_basis", h, {}}, // empty rule
101100
{"self_adjoint_H", adjH, {{h, 1}}}, // adjoint output, must not be mirrored!!
102101
};
103102

@@ -149,7 +148,8 @@ TEST_CASE("Test Adjoint: adjoint_rotation (Adjoint(RX) -> RX)", "[DecompGraph::S
149148
REQUIRE(chosen.basisCounts.at(rx) == 1);
150149
}
151150

152-
TEST_CASE("Test Adjoint: multiple rules and the solver should pick the cheapest", "[DecompGraph::Solver]")
151+
TEST_CASE("Test Adjoint: multiple rules and the solver should pick the cheapest",
152+
"[DecompGraph::Solver]")
153153
{
154154
const OperatorNode rot{"Rot", 1, 3, false};
155155
const OperatorNode rz{"RZ", 1, 1, false};

0 commit comments

Comments
 (0)