Skip to content

Commit

Permalink
update hlt convention
Browse files Browse the repository at this point in the history
  • Loading branch information
jinluchang committed Mar 25, 2024
1 parent 1604a69 commit 834cd6e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions examples-py/q-hlt-reconstruction.log.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[
[
"g_t_arr_o",
-45.00735904594238,
-119.76919472085078,
1e-06
],
[
"aa",
0.0008383874439459038,
0.00022836718494415043,
1e-06
],
[
Expand All @@ -16,7 +16,7 @@
],
[
"aa / aa0",
0.004485723208403519,
0.001221859879867013,
1e-06
],
[
Expand All @@ -26,12 +26,12 @@
],
[
"delta",
-1.5092176912096527,
-1.698739994045368,
1e-06
],
[
"aa ; via sum",
0.0008944830338458671,
0.00022877574726680894,
1e-06
],
[
Expand All @@ -41,12 +41,12 @@
],
[
"aa / aa0 ; via sum",
0.00478607490439265,
0.0012241013203119332,
1e-06
],
[
"aa ; g via sum",
0.0008811084930816226,
0.0002484534814451156,
1e-06
],
[
Expand All @@ -56,12 +56,12 @@
],
[
"aa / aa0 ; g via sum",
0.004714298675485307,
0.001329329960717923,
1e-06
],
[
"delta via sum",
-1.5818439204460883,
-1.6830987064614964,
1e-06
]
]
6 changes: 4 additions & 2 deletions qlat-utils/qlat_utils/q_hlt_reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 834cd6e

Please sign in to comment.