From 3c3de9f02e2b00a047a7a8e056847589e68cbf15 Mon Sep 17 00:00:00 2001 From: Yuichi Motoyama Date: Wed, 4 Sep 2024 16:50:19 +0900 Subject: [PATCH] fix tenes_std for complex but hermite hamiltonian --- tool/tenes_std.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/tenes_std.py b/tool/tenes_std.py index 0f8ef803..25a69de4 100644 --- a/tool/tenes_std.py +++ b/tool/tenes_std.py @@ -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)] @@ -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)