Skip to content

Commit

Permalink
update adj unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
multiphaseCFD committed Oct 27, 2023
1 parent 2f50387 commit f590e47
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mpitests/test_adjoint_jacobian.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit f590e47

Please sign in to comment.