Skip to content

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' / '2-site' / 'two-site': two-site VUMPS, the default.
  • '1s' / '1-site' / 'one-site': one-site VUMPS. Cheaper per iteration, but confined to the bond dimension of the initial state.
  • '1sp' / '1-site-plus' / 'one-site-plus': one-site VUMPS on a bond expanded by controlled bond expansion. It grows the bond dimension as '2s' does, but its eigenproblem stays the one-site one, so the local solve is d times smaller on each side. See expand_k and expand_alpha.
'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 means no limit, in which case the state grows until trunc_thresh stops it: under '2s' every split multiplies the bond dimension by the physical dimension, and under '1sp' it adds expand_k. Ignored by '1s', which never splits anything.

None
trunc_thresh float

Smallest singular value a split may keep, applied before max_bond. Ignored by '1s'.

1e-15
davidson_tol float

Residual norm tolerance for the Davidson eigensolver. Keep it well below grad_tol. The gradient measures how far AC and C disagree, so neither can be trusted beyond the accuracy it was solved to and the gradient cannot fall below this value. Loosening it to save work backfires: the run then needs more iterations than the cheaper solves save, and stalls at a gradient around davidson_tol without ever converging.

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 |AC - AL C| and |AC - C AR| maximized over the cell. Cannot be met unless davidson_tol is smaller. Under either scheme that splits, against a bond cap that bites, it cannot be met at all: the solve keeps asking for a wider bond than it is allowed, and the gradient settles at a floor set by the discarded weight instead of falling. A run that has grown to max_bond and stopped improving is converged in every sense that matters.

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 iMPS.set_canonical.

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 env_tol needs is roughly the correlation length in unit cells times log(1 / env_tol), and the default covers a correlation length of about seven cells. On a gapped model that rate saturates once the bond dimension captures the correlation length, and expanding the state further does not slow it down. A critical model has no such saturation, since there the correlation length is cut off by the bond dimension itself. Running out logs a warning and continues with the best estimate, and does not abandon the run and the nearly converged environment with it.

200
env_warm_start bool

If True (default), each environment solve starts from the block the previous pass came back around with instead of from the entering channel alone. The state moves less and less as a run proceeds, so that block is close to the answer and the solver absorbs far fewer unit cells to reach env_tol. It cannot change what is converged to, only how long that takes. Set to False to solve cold every time.

True
env_cache_dir Optional[str]

Root directory for environment block cache files. When set, run() creates a unique subdirectory inside it (first 8 hex characters of a UUID4, e.g. {env_cache_dir}/a1b2c3d4/) so that concurrent runs sharing the same config do not overwrite each other's blocks. Inside it, right/{k:05d}.pt files are written and dropped from memory once they leave the sliding window, keeping the footprint proportional to env_window instead of to the length of the cell. Only the right side appears there: the left side is carried one block at a time and never reaches disk. The subdirectory is removed when run() returns or raises. None (default) keeps every block in memory. Stored as str for TOML compatibility.

None
env_async_io bool

If True (default), environment block I/O is submitted to a background thread so it overlaps with the Davidson solves. Only relevant when env_cache_dir is set.

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, which is the smallest value any of the schemes can run at. Only relevant when env_cache_dir is set.

2
expand_k int

Largest number of complement directions added to a bond per expansion. Only used when scheme = '1sp', where it is also the most the bond dimension can grow by in one iteration. Larger values give a richer expanded space at higher cost. A typical choice is round(sqrt(max_bond)).

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 scheme = '1sp'. None keeps the full bond, which is the expansion's largest cost; truncating it makes the expansion cheap against the Davidson solve it precedes. A typical choice is expand_alpha ≈ expand_k ≈ round(sqrt(max_bond)).

None
checkpoint_dir Optional[str]

Directory to write checkpoint files into. An vumps.ckpt file (PyTorch format, loadable via vumps.Summary.load) is written after every iteration using an atomic write: the data is first serialized to vumps_lock.ckpt in the same directory, then renamed to vumps.ckpt on success, so a failed write cannot corrupt the previous checkpoint. Once run() finishes successfully, the final Summary is archived under artifacts_dir (see below) and vumps.ckpt is removed, since it is redundant with the archived artifact. None (default) resolves to Path.cwd() at the time run() is called, mirroring .logging. Pass an explicit path string to write elsewhere. Stored as str for TOML compatibility.

None
artifacts_dir Optional[str]

Directory for the final Summary artifact, written as state.ckpt when run() finishes successfully. None (default) resolves to artifacts/ under checkpoint_dir. Pass an explicit path string to archive the final state elsewhere, independent of checkpoint_dir. Stored as str for TOML compatibility.

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:

[heisenberg.algorithm]
scheme        = "1sp"
max_bond      = 32
expand_k      = 6
expand_alpha  = 6

See Also

  • Summary — output dataclass.
  • run — pass Options here.