Skip to content

Commit

Permalink
Update defaults and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jul 14, 2024
1 parent 792a7a0 commit f9fa606
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/algorithms/ctmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@ The projector bond dimensions are set via `trscheme` which controls the truncati
properties inside of `TensorKit.tsvd`. Each CTMRG run is converged up to `tol`
where the singular value convergence of the corners as well as the norm is checked.
The maximal and minimal number of CTMRG iterations is set with `maxiter` and `miniter`.
Different levels of output information are printed depending on `verbosity` (0, 1 or 2).
Different levels of output information are printed depending on `verbosity`, where
`0` is silent, `1` only prints warnings, `2` prints start and end of the run, and `3`
displays information each iteration.
Regardless of the truncation scheme, the space can be kept fixed with `fixedspace`.
"""
@kwdef struct CTMRG
trscheme::TruncationScheme = TensorKit.notrunc()
tol::Float64 = Defaults.ctmrg_tol
maxiter::Int = Defaults.ctmrg_maxiter
miniter::Int = Defaults.ctmrg_miniter
verbosity::Int = 0
verbosity::Int = 1
fixedspace::Bool = false
end

Expand Down
6 changes: 4 additions & 2 deletions src/algorithms/peps_opt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ based on the CTMRG gradient and updates the PEPS parameters. In this optimizatio
the CTMRG runs can be started on the converged environments of the previous optimizer
step by setting `reuse_env` to true. Otherwise a random environment is used at each
step. The CTMRG gradient itself is computed using the `gradient_alg` algorithm.
Different levels of output verbosity can be activated using `verbosity` (0, 1 or 2).
Different levels of output information are printed depending on `verbosity`, where
`0` is silent, `1` only prints warnings, `2` prints start and end of the run, and `3`
displays information each iteration.
"""
@kwdef struct PEPSOptimize{G}
boundary_alg::CTMRG = CTMRG() # Algorithm to find boundary environment
Expand All @@ -49,7 +51,7 @@ Different levels of output verbosity can be activated using `verbosity` (0, 1 or
)
reuse_env::Bool = true # Reuse environment of previous optimization as initial guess for next
gradient_alg::G = GeomSum() # Algorithm to solve gradient linear problem
verbosity::Int = 0
verbosity::Int = 1 # currently unused?
end

"""
Expand Down

0 comments on commit f9fa606

Please sign in to comment.