Skip to content

Commit

Permalink
fix tenes_std for complex but hermite hamiltonian
Browse files Browse the repository at this point in the history
  • Loading branch information
yomichi committed Sep 4, 2024
1 parent b3ef5fb commit 3c3de9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tool/tenes_std.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,8 @@ def make_evolution_onesite(
result_cutoff: float = 1e-15,
) -> List[SiteOperator]:
D, V = np.linalg.eigh(hamiltonian.elements)
evo = np.einsum("il, l, jl -> ij", V, np.exp(-tau * D), V)
evo = np.einsum("il, l, jl -> ij", V, np.exp(-tau * D), V.conjugate())

return [SiteOperator(hamiltonian.site, evo, group=group)]


Expand All @@ -904,7 +905,7 @@ def make_evolution_twosite(
H = hamiltonian.elements.reshape((dims[0] * dims[1], dims[0] * dims[1]))
D, V = np.linalg.eigh(H)
evo = np.reshape(
np.dot(V, np.dot(np.diag(np.exp(-tau * D)), V.transpose())),
np.einsum("il, l, jl -> ij", V, np.exp(-tau * D), V.conjugate()),
hamiltonian.elements.shape,
)
bonds = graph.make_path(hamiltonian.bond)
Expand Down

0 comments on commit 3c3de9f

Please sign in to comment.