diff --git a/tests/templates/test_state_preparations/test_mottonen_state_prep.py b/tests/templates/test_state_preparations/test_mottonen_state_prep.py index 885def86e60..a63a2d20129 100644 --- a/tests/templates/test_state_preparations/test_mottonen_state_prep.py +++ b/tests/templates/test_state_preparations/test_mottonen_state_prep.py @@ -431,7 +431,7 @@ def circuit(coeffs): qml.MottonenStatePreparation(coeffs, wires=[0, 1]) return qml.probs(wires=[0, 1]) - circuit_fd = qml.QNode(circuit, dev, diff_method="finite-diff", h=0.05) + circuit_fd = qml.QNode(circuit, dev, diff_method="finite-diff", gradient_kwargs={"h": 0.05}) circuit_ps = qml.QNode(circuit, dev, diff_method="parameter-shift") circuit_exact = qml.QNode(circuit, dev_no_shots)