Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix faulty CTMRG contractions #110

Merged
merged 3 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/algorithms/contractions/ctmrg_contractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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 -- |~~~~~~|
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -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_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
Expand Down
2 changes: 1 addition & 1 deletion src/utility/rotations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading