Skip to content

Commit 099e2fe

Browse files
committed
optimize renomarlize_south_edge
1 parent b7a2ede commit 099e2fe

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/algorithms/contractions/ctmrg_contractions.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,16 @@ function renormalize_south_edge(E_south, P_left, P_right, A)
10241024
return renormalize_west_edge(E_south, P_left, P_right, A_west)
10251025
end
10261026

1027+
function renormalize_south_edge(E_south::CTMRG_PF_EdgeTensor, P_left, P_right, A::PFTensor)
1028+
# specialize to avoid extra permute on A when calling renormalize_west_edge
1029+
return @tensor begin
1030+
temp[χ_W D_W; χSW] := P_left[χSW D_W; χ_W] # impose χ_W as 1st leg
1031+
PE[χ_W χSE; D_W D_S] := temp[χ_W D_W; χSW] * E_south[χSE D_S; χSW]
1032+
PEA[χ_W D_N; χSE D_E] := PE[χ_W χSE; D_W D_S] * A[D_W D_S; D_N D_E]
1033+
edge[χ_E D_N; χ_W] := PEA[χ_W D_N; χSE D_E] * P_right[χ_E; χSE D_E]
1034+
end
1035+
end
1036+
10271037
"""
10281038
renormalize_west_edge((row, col), env, P_top, P_bottom, network::InfiniteSquareNetwork{P})
10291039
renormalize_west_edge(E_west, P_top, P_bottom, A::P)

0 commit comments

Comments
 (0)