Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrehmer committed Jul 12, 2024
1 parent 2f4db74 commit 4c0ba28
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
14 changes: 5 additions & 9 deletions src/algorithms/peps_opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ struct GeomSum{F} <: GradMode{F}
verbosity::Int
end
function GeomSum(;
maxiter=Defaults.fpgrad_maxiter,
tol=Defaults.fpgrad_tol,
verbosity=0,
iterscheme=:fixed,
maxiter=Defaults.fpgrad_maxiter, tol=Defaults.fpgrad_tol, verbosity=0, iterscheme=:fixed
)
return GeomSum{iterscheme}(maxiter, tol, verbosity)
end
Expand All @@ -44,10 +41,7 @@ struct ManualIter{F} <: GradMode{F}
verbosity::Int
end
function ManualIter(;
maxiter=Defaults.fpgrad_maxiter,
tol=Defaults.fpgrad_tol,
verbosity=0,
iterscheme=:fixed,
maxiter=Defaults.fpgrad_maxiter, tol=Defaults.fpgrad_tol, verbosity=0, iterscheme=:fixed
)
return ManualIter{iterscheme}(maxiter, tol, verbosity)
end
Expand Down Expand Up @@ -219,7 +213,9 @@ function _rrule(
svd_alg_fixed = SVDAdjoint(;
fwd_alg=FixedSVD(Ufix, info.S, Vfix), rrule_alg=alg.projector_alg.svd_alg.rrule_alg
)
alg_fixed = CTMRG(; svd_alg=svd_alg_fixed, trscheme=notrunc(), ctmrgscheme=:simultaneous)
alg_fixed = CTMRG(;
svd_alg=svd_alg_fixed, trscheme=notrunc(), ctmrgscheme=:simultaneous
)

function leading_boundary_fixed_pullback(Δenvs′)
Δenvs = unthunk(Δenvs′)
Expand Down
2 changes: 1 addition & 1 deletion test/ctmrg/ctmrgschemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ unitcells = [(1, 1), (3, 4)]
H = square_lattice_heisenberg(; unitcell)
E_sequential = costfun(psi, env_sequential, H)
E_simultaneous = costfun(psi, env_simultaneous, H)
@test E_sequential E_simultaneous rtol=1e-4
@test E_sequential E_simultaneous rtol = 1e-4
end
4 changes: 3 additions & 1 deletion test/ctmrg/fixed_iterscheme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ unitcells = [(1, 1), (3, 4)]
# fix gauge of SVD
U_fix, V_fix = fix_relative_phases(info.U, info.V, signs)
svd_alg_fix = SVDAdjoint(; fwd_alg=FixedSVD(U_fix, info.S, V_fix))
ctm_alg_fix = CTMRG(; svd_alg=svd_alg_fix, trscheme=notrunc(), ctmrgscheme=:simultaneous)
ctm_alg_fix = CTMRG(;
svd_alg=svd_alg_fix, trscheme=notrunc(), ctmrgscheme=:simultaneous
)

# do iteration with FixedSVD
env_fixedsvd, = ctmrg_iter(psi, env_conv1, ctm_alg_fix)
Expand Down
2 changes: 1 addition & 1 deletion test/heisenberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ctm_alg = CTMRG(;
verbosity=1,
trscheme=truncdim(χenv),
svd_alg=SVDAdjoint(; fwd_alg=TensorKit.SVD(), rrule_alg=GMRES(; tol=1e-10)),
ctmrgscheme=:simultaneous
ctmrgscheme=:simultaneous,
)
opt_alg = PEPSOptimize(;
boundary_alg=ctm_alg,
Expand Down

0 comments on commit 4c0ba28

Please sign in to comment.