diff --git a/pennylane/ops/op_math/controlled.py b/pennylane/ops/op_math/controlled.py index 564cd0e0e4d..441d54e7b36 100644 --- a/pennylane/ops/op_math/controlled.py +++ b/pennylane/ops/op_math/controlled.py @@ -207,7 +207,7 @@ def remove_from_queue_args_and_kwargs(item): elif isinstance(item, dict): for key, value in item.items(): remove_from_queue_args_and_kwargs(value) - else: + elif isinstance(item, qml.Operator): qml.queuing.QueuingManager.remove(item)