Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
apchytr committed Dec 20, 2024
1 parent 6917c62 commit ea9ec22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_training/test_opt_lab_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def test_opt_backend_param(self):

def cost_fn_sympl():
state_out = Vacuum((0,)) >> S >> Rgate((0,), theta=r_angle)
return 1 - math.pow(state_out >> target_state.dual, 2)
return 1 - math.abs((state_out >> target_state.dual) ** 2)

opt = Optimizer(symplectic_lr=0.1, euclidean_lr=0.05)
opt.minimize(cost_fn_sympl, by_optimizing=[S, r_angle])
Expand Down

0 comments on commit ea9ec22

Please sign in to comment.