Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
PietropaoloFrisoni committed Feb 9, 2025
1 parent a324e95 commit c01521a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 2 additions & 3 deletions pennylane/transforms/decompose.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def _operator_decomposition_gen(


@lru_cache
def _get_plxpr_decompose(): # pylint: disable=missing-docstring
def _get_plxpr_decompose(): # pylint: disable=missing-docstring, too-many-statements
try:
# pylint: disable=import-outside-toplevel, too-many-statements
# pylint: disable=import-outside-toplevel
import jax

from pennylane.capture.primitives import (
Expand Down Expand Up @@ -182,7 +182,6 @@ def decompose_operation(self, op: qml.operation.Operator, current_depth: int = 0
)

current_depth = depth_tracker["current_depth"]
print(f"Final decomposition depth: {current_depth}")

return [
self.sub_interpret_operation(decomp_op, current_depth)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,6 @@ def circuit(x, wire):

check_jaxpr_eqns(jaxpr_eqns[0 : len(expected_ops)], expected_ops)

assert

@pytest.mark.parametrize(
"max_expansion, expected_ops, expected_ops_for_loop, expected_ops_while_loop",
[
Expand Down Expand Up @@ -1042,11 +1040,11 @@ def circuit(x, wire):
# CustomOpNestedOp is in the for loop of the true branch
# CustomOpNestedOp -> RX, SimpleCustomOp
# SimpleCustomOp -> Hadamard, Hadamard
# Hadamard -> RZ, RX, RZ
# Hadamard -> RZ, RX, RZ
[qml.RX, qml.RZ, qml.RX, qml.RZ, qml.RZ, qml.RX, qml.RZ],
# SimpleCustomOp is in the while loop of the false branch
# SimpleCustomOp -> Hadamard, Hadamard
# Hadamard -> RZ, RX, RZ
# Hadamard -> RZ, RX, RZ
[qml.RZ, qml.RX, qml.RZ, qml.RZ, qml.RX, qml.RZ],
),
],
Expand Down

0 comments on commit c01521a

Please sign in to comment.