From f7a77b49a5b3da42840f60463cacbdd63cd10b04 Mon Sep 17 00:00:00 2001 From: Andrija Paurevic <46359773+andrijapau@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:42:54 -0500 Subject: [PATCH] Update pennylane/workflow/qnode.py --- pennylane/workflow/qnode.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pennylane/workflow/qnode.py b/pennylane/workflow/qnode.py index e1070a7c860..66aa3ec2a02 100644 --- a/pennylane/workflow/qnode.py +++ b/pennylane/workflow/qnode.py @@ -645,10 +645,11 @@ def update(self, **kwargs) -> "QNode": f"Must specify at least one configuration property to update. Valid properties are: {valid_params}." ) original_init_args = self._init_args.copy() - gradient_kwargs = original__init_args.pop("gradient_kwargs") + gradient_kwargs = original_init_args.pop("gradient_kwargs") original_init_args.update(gradient_kwargs) original_init_args.update(kwargs) - return QNode(**original__init_args) + return QNode(**original_init_args) + # pylint: disable=too-many-return-statements, unused-argument