diff --git a/examples-py/q-hlt-reconstruction.log.json b/examples-py/q-hlt-reconstruction.log.json index 486408fc1..8dc79f99b 100644 --- a/examples-py/q-hlt-reconstruction.log.json +++ b/examples-py/q-hlt-reconstruction.log.json @@ -1,12 +1,12 @@ [ [ "g_t_arr_o", - -45.00735904594238, + -119.76919472085078, 1e-06 ], [ "aa", - 0.0008383874439459038, + 0.00022836718494415043, 1e-06 ], [ @@ -16,7 +16,7 @@ ], [ "aa / aa0", - 0.004485723208403519, + 0.001221859879867013, 1e-06 ], [ @@ -26,12 +26,12 @@ ], [ "delta", - -1.5092176912096527, + -1.698739994045368, 1e-06 ], [ "aa ; via sum", - 0.0008944830338458671, + 0.00022877574726680894, 1e-06 ], [ @@ -41,12 +41,12 @@ ], [ "aa / aa0 ; via sum", - 0.00478607490439265, + 0.0012241013203119332, 1e-06 ], [ "aa ; g via sum", - 0.0008811084930816226, + 0.0002484534814451156, 1e-06 ], [ @@ -56,12 +56,12 @@ ], [ "aa / aa0 ; g via sum", - 0.004714298675485307, + 0.001329329960717923, 1e-06 ], [ "delta via sum", - -1.5818439204460883, + -1.6830987064614964, 1e-06 ] ] \ No newline at end of file diff --git a/qlat-utils/qlat_utils/q_hlt_reconstruction.py b/qlat-utils/qlat_utils/q_hlt_reconstruction.py index 4e36ffe90..688d2697c 100644 --- a/qlat-utils/qlat_utils/q_hlt_reconstruction.py +++ b/qlat-utils/qlat_utils/q_hlt_reconstruction.py @@ -159,7 +159,8 @@ def ww_from_g_via_sum(g_t_arr, params): cov = params["cov"] t_arr = params["t_arr"] new_g_t_arr, constraint_penalty = normalization_constraint_via_sum(g_t_arr, params) - aa = aa_from_g_via_sum(new_g_t_arr, params) + g0_t_arr = jnp.zeros(new_g_t_arr.shape, jnp.float64) + aa = aa_from_g_via_sum(new_g_t_arr, params) / aa_from_g_via_sum(g0_t_arr, params) ee = get_cov_term(new_g_t_arr, cov) * params["lambda"] return aa + ee + constraint_penalty @@ -344,7 +345,8 @@ def ww_from_g(g_t_arr, params): cov = params["cov"] t_arr = params["t_arr"] new_g_t_arr, constraint_penalty = normalization_constraint(g_t_arr, params) - aa = aa_from_g(new_g_t_arr, params) + g0_t_arr = jnp.zeros(new_g_t_arr.shape, jnp.float64) + aa = aa_from_g(new_g_t_arr, params) / aa_from_g(g0_t_arr, params) ee = get_cov_term(new_g_t_arr, cov) * params["lambda"] return aa + ee + constraint_penalty