Skip to content

Commit 333df09

Browse files
committed
Make full projectors more symmetric in triangular CTMRG
1 parent 5326b94 commit 333df09

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

varipeps/ctmrg/triangular_projectors.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ def _corner_workhorse(
2525
tensor_left_1.shape[3] * tensor_left_1.shape[4] * tensor_left_1.shape[5],
2626
)
2727

28+
left_matrix_1 /= jnp.linalg.norm(left_matrix_1)
29+
30+
third_U, third_S, third_Vh = gauge_fixed_svd(left_matrix_1)
31+
32+
third_S = jnp.where(
33+
third_S / third_S[0] < truncation_eps,
34+
0,
35+
jnp.sqrt(jnp.where(third_S / third_S[0] < truncation_eps, 1, third_S)),
36+
)
37+
38+
third_left = third_S[:, jnp.newaxis] * third_Vh
39+
third_right = third_U * third_S[jnp.newaxis, :]
40+
2841
left_matrix_2 = tensor_left_2.reshape(
2942
tensor_left_2.shape[0] * tensor_left_2.shape[1] * tensor_left_2.shape[2],
3043
tensor_left_2.shape[3] * tensor_left_2.shape[4] * tensor_left_2.shape[5],
@@ -36,7 +49,8 @@ def _corner_workhorse(
3649
)
3750

3851
if tensor_left_1 is not None:
39-
left_matrix = left_matrix_1 @ left_matrix_2
52+
left_matrix = third_left @ left_matrix_2
53+
right_matrix = right_matrix @ third_right
4054
else:
4155
left_matrix = left_matrix_2
4256

0 commit comments

Comments
 (0)