Skip to content

Commit

Permalink
remove gradient_fn that was removed in master
Browse files Browse the repository at this point in the history
  • Loading branch information
andrijapau committed Nov 12, 2024
1 parent 40f17d8 commit 46376e5
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tests/test_qnode.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,17 +273,6 @@ def test_diff_method(self):

qn = QNode(dummyfunc, dev, diff_method="best")
assert qn.diff_method == "best"
with pytest.warns(
qml.PennyLaneDeprecationWarning, match=r"QNode.gradient_fn is deprecated"
):
assert qn.gradient_fn == "backprop"

dev_shots = qml.device("default.qubit", shots=45)
qn_shots = QNode(dummyfunc, dev_shots, diff_method="best")
with pytest.warns(
qml.PennyLaneDeprecationWarning, match=r"QNode.gradient_fn is deprecated"
):
assert qn_shots.gradient_fn is qml.gradients.param_shift

qn = QNode(dummyfunc, dev, interface="autograd", diff_method="best")
assert qn.diff_method == "best"
Expand Down

0 comments on commit 46376e5

Please sign in to comment.