diff --git a/mpitests/test_adjoint_jacobian.py b/mpitests/test_adjoint_jacobian.py index 51b9465ded..c4ecc2ca12 100644 --- a/mpitests/test_adjoint_jacobian.py +++ b/mpitests/test_adjoint_jacobian.py @@ -1222,13 +1222,10 @@ def circuit_compare(params, excitations): qml.SingleExcitation(params[i], wires=excitation) return qml.expval(H) - jac_func = qml.jacobian(circuit) - jac_func_comp = qml.jacobian(circuit_compare) - params = qml.numpy.array([0.0] * len(doubles), requires_grad=True) - jacs = jac_func(params, excitations=doubles) - jacs_comp = jac_func_comp(params, excitations=doubles) + jacs = qml.jacobian(circuit)(params, excitations=doubles) + jacs_comp = qml.jacobian(circuit_compare)(params, excitations=doubles) comm.Barrier()