diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index a9de6a1b39e..f398160644f 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -156,6 +156,9 @@ * Add more fermionic-to-qubit tests to cover cases when the mapped operator is different for various mapping schemes. [(#5873)](https://github.com/PennyLaneAI/pennylane/pull/5873) +* `SProd.terms` now flattens out the terms if the base is a multi-term observable. + [(#5885)](https://github.com/PennyLaneAI/pennylane/pull/5885) +

Mid-circuit measurements and dynamic circuits

* The `default.qubit` device implements a depth-first tree-traversal algorithm to diff --git a/pennylane/ops/op_math/sprod.py b/pennylane/ops/op_math/sprod.py index 5dbe46af6e4..b3b2a9cc96f 100644 --- a/pennylane/ops/op_math/sprod.py +++ b/pennylane/ops/op_math/sprod.py @@ -20,7 +20,7 @@ import pennylane as qml import pennylane.math as qnp -from pennylane.operation import Operator, convert_to_opmath, TermsUndefinedError +from pennylane.operation import Operator, TermsUndefinedError, convert_to_opmath from pennylane.ops.op_math.pow import Pow from pennylane.ops.op_math.sum import Sum from pennylane.queuing import QueuingManager