Skip to content

Commit

Permalink
add flag for RMF in zipper
Browse files Browse the repository at this point in the history
  • Loading branch information
annamariadziubyna committed Nov 23, 2023
1 parent 7c55a2e commit 250b4e3
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions src/zipper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ function zipper(
iters_svd = 1,
iters_var = 1,
Dtemp_multiplier = 2,
mode::Symbol = :Ising,
kwargs...
) where R <: Real
onGPU = ψ.onGPU && ϕ.onGPU
Expand Down Expand Up @@ -124,25 +125,49 @@ function zipper(
update_env_left!(env, :central)
_left_sweep_var_site!(env, :central; kwargs...)
for k in reverse.sites)
if k < i
_left_sweep_var_site!(env, k; kwargs...)
if mode == :RMF
if (i - 5) <= k < i
_left_sweep_var_site!(env, k; kwargs...)
end
else
if k < i
_left_sweep_var_site!(env, k; kwargs...)
end
end
end
for k in ϕ.sites
if k < i
_right_sweep_var_site!(env, k; kwargs...)
if mode == :RMF
if (i - 5) <= k < i
_right_sweep_var_site!(env, k; kwargs...)
end
else
if k < i
_right_sweep_var_site!(env, k; kwargs...)
end
end
end
_right_sweep_var_site!(env, :central; kwargs...)

for k in ϕ.sites
if k >= i
_right_sweep_var_site!(env, k; kwargs...)
if mode == :RMF
if (i+5) >= k >= i
_right_sweep_var_site!(env, k; kwargs...)
end
else
if k >= i
_right_sweep_var_site!(env, k; kwargs...)
end
end
end
for k in reverse.sites)
if k >= i
_left_sweep_var_site!(env, k; kwargs...)
if mode == :RMF
if (i+5) >= k >= i
_left_sweep_var_site!(env, k; kwargs...)
end
else
if k >= i
_left_sweep_var_site!(env, k; kwargs...)
end
end
end
update_env_right!(env, :central)
Expand Down

0 comments on commit 250b4e3

Please sign in to comment.