Skip to content

Commit

Permalink
Update pennylane/workflow/qnode.py
Browse files Browse the repository at this point in the history
  • Loading branch information
andrijapau authored Jan 10, 2025
1 parent 62d97c4 commit f7a77b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pennylane/workflow/qnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7a77b4

Please sign in to comment.