From ea9ec22cd8a3b7a900a0ef9d331b7fc5c5e055f0 Mon Sep 17 00:00:00 2001 From: Anthony Date: Fri, 20 Dec 2024 15:10:26 -0500 Subject: [PATCH] another fix --- tests/test_training/test_opt_lab_dev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_training/test_opt_lab_dev.py b/tests/test_training/test_opt_lab_dev.py index 9d464fe40..766dc5332 100644 --- a/tests/test_training/test_opt_lab_dev.py +++ b/tests/test_training/test_opt_lab_dev.py @@ -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])