Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai>
  • Loading branch information
lillian542 and dwierichs authored Jul 25, 2024
1 parent 1e21841 commit e45e9e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pennylane/transforms/tape_expand.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def _custom_decomposition(obj, fn):
obj = getattr(qml, obj)

original_decomp_method = obj.compute_decomposition
original_has_decomp_propety = obj.has_decomposition
original_has_decomp_property = obj.has_decomposition

try:
# Explicitly set the new compute_decomposition method
Expand All @@ -307,7 +307,7 @@ def _custom_decomposition(obj, fn):

finally:
obj.compute_decomposition = staticmethod(original_decomp_method)
obj.has_decomposition = original_has_decomp_propety
obj.has_decomposition = original_has_decomp_property

# Loop through the decomposition dictionary and create all the contexts
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/ops/functions/test_assert_valid.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def compute_decomposition(wires):
assert_valid(BadDecomp(wires=0), skip_pickle=True)

def test_decomposition_must_not_contain_op(self):
"""Test that decomposition op an operator doesn't include the operator itself"""
"""Test that the decomposition of an operator doesn't include the operator itself"""

class BadDecomp(Operator):
@staticmethod
Expand Down

0 comments on commit e45e9e7

Please sign in to comment.