Skip to content

Commit

Permalink
small change
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit76 committed Oct 13, 2024
1 parent 3c5d497 commit 433bb18
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions ad_afqmc/propagation.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,11 @@ def _build_propagation_intermediates(
optimize="optimal",
)
h1_mod = (ham_data["h1"][0] + ham_data["h1"][1]) / 2.0 - v0
h1_mod = h1_mod - jnp.real(
1.0j
* jnp.einsum(
"g,gik->ik",
ham_data["mf_shifts"],
ham_data["chol"].reshape(-1, trial.norb, trial.norb),
)
mf_shifts_r = (1.0j * ham_data["mf_shifts"]).real
h1_mod = h1_mod - jnp.einsum(
"g,gik->ik",
mf_shifts_r,
ham_data["chol"].reshape(-1, trial.norb, trial.norb),
)
ham_data["exp_h1"] = jsp.linalg.expm(-self.dt * h1_mod / 2.0)
return ham_data
Expand Down Expand Up @@ -490,13 +488,11 @@ def _build_propagation_intermediates(
ham_data["chol"].reshape(-1, trial.norb, trial.norb),
optimize="optimal",
)
v1 = jnp.real(
1.0j
* jnp.einsum(
"g,gik->ik",
ham_data["mf_shifts"],
ham_data["chol"].reshape(-1, trial.norb, trial.norb),
)
mf_shifts_r = (1.0j * ham_data["mf_shifts"]).real
v1 = jnp.einsum(
"g,gik->ik",
mf_shifts_r,
ham_data["chol"].reshape(-1, trial.norb, trial.norb),
)
h1_mod = ham_data["h1"] - jnp.array([v0 + v1, v0 + v1])
ham_data["exp_h1"] = jnp.array(
Expand Down

0 comments on commit 433bb18

Please sign in to comment.