From 9b43dad514b57014cd0607cdc68fd751eebe9a68 Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Sat, 21 Dec 2024 12:19:51 +0100 Subject: [PATCH 1/3] Fix wrong contrations in ctmrg_contractions.jl --- src/algorithms/contractions/ctmrg_contractions.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/algorithms/contractions/ctmrg_contractions.jl b/src/algorithms/contractions/ctmrg_contractions.jl index a6ae00ac..1c024f9a 100644 --- a/src/algorithms/contractions/ctmrg_contractions.jl +++ b/src/algorithms/contractions/ctmrg_contractions.jl @@ -202,8 +202,8 @@ function right_projector(E_1, C, E_2, U, isqS, ket::PEPSTensor, bra::PEPSTensor= return @autoopt @tensor P_right[χ_in; χ_out D_outabove D_outbelow] := isqS[χ_in; χ1] * conj(U[χ1; χ2 D1 D2]) * - ket[d; D1 D5 D_outabove D1] * - conj(bra[d; D2 D6 D_outbelow D2]) * + ket[d; D3 D5 D_outabove D1] * + conj(bra[d; D4 D6 D_outbelow D2]) * E_2[χ2 D3 D4; χ3] * C[χ3; χ4] * E_1[χ4 D5 D6; χ_out] @@ -912,8 +912,8 @@ function renormalize_south_edge( ) return @autoopt @tensor edge[χ_E D_Nab D_Nbe; χ_W] := E_south[χ1 D1 D2; χ2] * - bra[d; D_Nab D5 D1 D3] * - conj(ket[d; D_Nbe D6 D2 D4]) * + ket[d; D_Nbe D6 D2 D4] * + conj(bra[d; D_Nab D5 D1 D3]) * P_left[χ2 D3 D4; χ_W] * P_right[χ_E; χ1 D5 D6] end From f80e2b41f1e052131be381c8d1ab4eed83276cfd Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Sat, 21 Dec 2024 12:29:41 +0100 Subject: [PATCH 2/3] Fix docstrings and renormalize_south_edge labeling --- src/algorithms/contractions/ctmrg_contractions.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/algorithms/contractions/ctmrg_contractions.jl b/src/algorithms/contractions/ctmrg_contractions.jl index 1c024f9a..3654f9f4 100644 --- a/src/algorithms/contractions/ctmrg_contractions.jl +++ b/src/algorithms/contractions/ctmrg_contractions.jl @@ -739,7 +739,7 @@ Alternatively, provide the constituent tensors and perform the complete contract ``` | [~~~~~P_right~~~~~] - || | + || || E_west == ket-bra == |~~~~~~| | || |P_left| -- C_southwest -- E_south -- |~~~~~~| @@ -820,7 +820,7 @@ Absorb a bra-ket pair into the north edge using the given projectors and environ |~~~~~~| -- E_north -- |~~~~~~~| -- |P_left| || |P_right| -- |~~~~~~| == ket-bra == |~~~~~~~| - + || ``` """ function renormalize_north_edge( @@ -890,10 +890,10 @@ end Absorb a bra-ket pair into the south edge using the given projectors and environment tensors. ``` + || |~~~~~~~| == ket-bra == |~~~~~~| -- |P_right| || |P_left| -- |~~~~~~~| -- E_south -- |~~~~~~| - ``` """ function renormalize_south_edge( @@ -912,8 +912,8 @@ function renormalize_south_edge( ) return @autoopt @tensor edge[χ_E D_Nab D_Nbe; χ_W] := E_south[χ1 D1 D2; χ2] * - ket[d; D_Nbe D6 D2 D4] * - conj(bra[d; D_Nab D5 D1 D3]) * + ket[d; D_Nab D5 D1 D3] * + conj(bra[d; D_Nbe D6 D2 D4]) * P_left[χ2 D3 D4; χ_W] * P_right[χ_E; χ1 D5 D6] end From 1014306acaf9ef0fcdf96f7cf1d8d250f0a121cc Mon Sep 17 00:00:00 2001 From: Paul Brehmer Date: Sat, 21 Dec 2024 21:42:10 +0100 Subject: [PATCH 3/3] Correct rotate_north docstring --- src/utility/rotations.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utility/rotations.jl b/src/utility/rotations.jl index 634e6199..d83d4356 100644 --- a/src/utility/rotations.jl +++ b/src/utility/rotations.jl @@ -11,6 +11,6 @@ const SOUTHWEST = 4 """ rotate_north(t, dir) -Rotate north direction of `t` to `dir` by successive applications of `rotl90`. +Rotate the `dir` direction of `t` to face north by successive applications of `rotl90`. """ rotate_north(t, dir) = mod1(dir, 4) == NORTH ? t : rotate_north(rotl90(t), dir - 1)