Skip to content

Commit 2e259f7

Browse files
committed
Make transfer matrices hermitian after each step
1 parent 5c760c4 commit 2e259f7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

peps_ad/ctmrg/absorption.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ def do_left_absorption(
202202
[working_tensor_obj],
203203
[T4_projector_top, T4_projector_bottom],
204204
)
205+
206+
new_T4_tmp += new_T4_tmp.conj().transpose(0, 2, 1, 3)
207+
new_T4_tmp /= 2
208+
205209
new_T4.append(_post_process_CTM_tensors(new_T4_tmp, config))
206210

207211
C4_projector = left_projectors.get_projector(x, y, 0, 0).top
@@ -298,6 +302,10 @@ def do_right_absorption(
298302
[working_tensor_obj],
299303
[T2_projector_top, T2_projector_bottom],
300304
)
305+
306+
new_T2_tmp += new_T2_tmp.conj().transpose(1, 0, 2, 3)
307+
new_T2_tmp /= 2
308+
301309
new_T2.append(_post_process_CTM_tensors(new_T2_tmp, config))
302310

303311
C3_projector = right_projectors.get_projector(x, y, 0, 0).top
@@ -390,6 +398,10 @@ def do_top_absorption(
390398
[working_tensor_obj],
391399
[T1_projector_left, T1_projector_right],
392400
)
401+
402+
new_T1_tmp += new_T1_tmp.conj().transpose(0, 2, 1, 3)
403+
new_T1_tmp /= 2
404+
393405
new_T1.append(_post_process_CTM_tensors(new_T1_tmp, config))
394406

395407
C2_projector = top_projectors.get_projector(x, y, 0, 0).left # type: ignore
@@ -484,6 +496,10 @@ def do_bottom_absorption(
484496
[working_tensor_obj],
485497
[T3_projector_left, T3_projector_right],
486498
)
499+
500+
new_T3_tmp += new_T3_tmp.conj().transpose(0, 1, 3, 2)
501+
new_T3_tmp /= 2
502+
487503
new_T3.append(_post_process_CTM_tensors(new_T3_tmp, config))
488504

489505
C3_projector = bottom_projectors.get_projector(x, y, 0, 0).left # type: ignore

0 commit comments

Comments
 (0)