Options¶
VUMPS run options.
Options
dataclass
¶
Options(
scheme: str = "2s",
n_iters: int = 100,
max_bond: Optional[int] = None,
trunc_thresh: float = 1e-15,
davidson_tol: float = 1e-10,
davidson_max_iter: int = 100,
davidson_max_subspace: int = 20,
grad_tol: float = 1e-10,
gauge_tol: float = 1e-12,
gauge_maxiter: int = 200,
env_tol: float = 1e-12,
env_maxiter: int = 200,
env_warm_start: bool = True,
env_cache_dir: Optional[str] = None,
env_async_io: bool = True,
env_window: int = 2,
expand_k: int = 4,
expand_alpha: Optional[int] = None,
checkpoint_dir: Optional[str] = None,
artifacts_dir: Optional[str] = None,
)
Bases: AlgorithmOptions
VUMPS run options.
All fields have sensible defaults so Options() is a valid minimal
configuration. Use Options.from_toml to load from an [algorithm]
TOML section, or Options.load_toml to read directly from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scheme
|
str
|
Update scheme. Canonical values and their aliases:
|
'2s'
|
n_iters
|
int
|
Maximum number of VUMPS iterations. Each one solves every position of the cell against one set of environments. |
100
|
max_bond
|
Optional[int]
|
Largest bond dimension a split may keep. |
None
|
trunc_thresh
|
float
|
Smallest singular value a split may keep, applied before
|
1e-15
|
davidson_tol
|
float
|
Residual norm tolerance for the Davidson eigensolver. Keep it well
below |
1e-10
|
davidson_max_iter
|
int
|
Maximum Davidson iterations per local problem. |
100
|
davidson_max_subspace
|
int
|
Maximum Krylov subspace size before a thick restart. |
20
|
grad_tol
|
float
|
Convergence criterion on the VUMPS gradient norm, the larger of
|
1e-10
|
gauge_tol
|
float
|
Convergence tolerance for the unit-cell gauge iteration. Used only
to canonicalize the initial state: every iteration after that
installs its own gauge through |
1e-12
|
gauge_maxiter
|
int
|
Maximum number of gauge sweeps around the unit cell, for that same initial canonicalization. |
200
|
env_tol
|
float
|
Convergence tolerance for the environment fixed point. The environments are re-solved every iteration, so this is among the more expensive settings. The energy is the least sensitive thing it controls, converging well before the environment tensor does; a one-site run is the case that wants it tight, since its gradient tracks the environments directly. |
1e-12
|
env_maxiter
|
int
|
Maximum number of unit cells absorbed by the environment solver.
The residual falls geometrically at a rate set by the subleading
eigenvalue of the MPS transfer operator, so the budget |
200
|
env_warm_start
|
bool
|
If |
True
|
env_cache_dir
|
Optional[str]
|
Root directory for environment block cache files. When set,
|
None
|
env_async_io
|
bool
|
If |
True
|
env_window
|
int
|
Number of right environment blocks kept in memory at once, the
one being read plus those prefetched ahead. Defaults to |
2
|
expand_k
|
int
|
Largest number of complement directions added to a bond per
expansion. Only used when |
4
|
expand_alpha
|
Optional[int]
|
Internal bond dimension used when forming the cheap two-site tensor
the expansion applies the iMPO to. Only used when
|
None
|
checkpoint_dir
|
Optional[str]
|
Directory to write checkpoint files into. An |
None
|
artifacts_dir
|
Optional[str]
|
Directory for the final |
None
|
Notes
An environment block scales as chi^2 * w, and a pass over the cell
needs one on every bond from each side. On a chain that amounts to
2N small tensors, and the defaults keep them all in memory. On a
quasi-1D cylinder the unit cell is one column, so N runs to dozens
while chi and w both grow with the circumference, and that is
the case env_cache_dir exists for.
Half of those blocks were never needed. A pass produces its left
blocks in the order it consumes them, so one running tensor does the
work of N, and that is now how every scheme runs whether or not
anything is cached. Only the right side is stored, and only it can be
evicted. See alice.algorithm.vumps.sweep for the argument.
TOML Loading¶
Options can be loaded directly from an [algorithm] TOML section:
import tomllib
from alice import vumps
with open("config.toml", "rb") as f:
cfg = tomllib.load(f)
opts = vumps.Options.from_toml(cfg["heisenberg"]["algorithm"])
Example TOML block:
[heisenberg.algorithm]
scheme = "2s"
n_iters = 50
max_bond = 32
trunc_thresh = 1e-15
grad_tol = 1e-10
env_tol = 1e-8
Under scheme = "1sp", two further keys govern the bond expansion: