Skip to content

Commit

Permalink
fix discrepancy between sequential and simultaneous ctmrg
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Aug 13, 2024
1 parent 88c208f commit 071a92b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/algorithms/contractions/ctmrg_contractions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,8 @@ function renormalize_west_edge( # For sequential CTMRG scheme
)
return renormalize_west_edge(
envs.edges[WEST, row, _prev(col, end)],
projectors[1][_prev(row, end), col],
projectors[2][row, col],
projectors[1][row, col],
projectors[2][_next(row, end), col],
ket[row, col],
bra[row, col],
)
Expand Down
10 changes: 5 additions & 5 deletions src/algorithms/ctmrg/ctmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ function ctmrg_projectors(
# @fwdthreads for (r, c) in directions
for (r, c) in directions
# SVD half-infinite environment
r′ = _next(r, size(envs.corners, 2))
QQ = halfinfinite_environment(enlarged_envs[1][r, c], enlarged_envs[2][r, c])
r′ = _prev(r, size(envs.corners, 2))
QQ = halfinfinite_environment(enlarged_envs[1][r, c], enlarged_envs[2][r, c])

trscheme = truncation_scheme(projector_alg, envs.edges[WEST, _prev(r, end), c])
svd_alg = svd_algorithm(projector_alg, (WEST, r, c))
trscheme = truncation_scheme(projector_alg, envs.edges[WEST, r′, c])
svd_alg = svd_algorithm(projector_alg, (WEST, r, c))
U, S, V, ϵ_local = PEPSKit.tsvd!(QQ, svd_alg; trunc=trscheme)
ϵ = max(ϵ, ϵ_local / norm(S))

Expand All @@ -255,7 +255,7 @@ function ctmrg_projectors(

# Compute projectors
P_bottom[r, c], P_top[r, c] = build_projectors(
U, S, V, enlarged_envs[1][r, c], enlarged_envs[2][r, c]
U, S, V, enlarged_envs[1][r, c], enlarged_envs[2][r, c]
)
end

Expand Down

0 comments on commit 071a92b

Please sign in to comment.