From e45e9e79d06f2d9aa708040d7aec085ddc4b33f4 Mon Sep 17 00:00:00 2001 From: lillian542 <38584660+lillian542@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:39:45 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: David Wierichs --- pennylane/transforms/tape_expand.py | 4 ++-- tests/ops/functions/test_assert_valid.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pennylane/transforms/tape_expand.py b/pennylane/transforms/tape_expand.py index d9d555966cc..60580eb3f67 100644 --- a/pennylane/transforms/tape_expand.py +++ b/pennylane/transforms/tape_expand.py @@ -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 @@ -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: diff --git a/tests/ops/functions/test_assert_valid.py b/tests/ops/functions/test_assert_valid.py index bbbda986b2d..9fff7758338 100644 --- a/tests/ops/functions/test_assert_valid.py +++ b/tests/ops/functions/test_assert_valid.py @@ -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