Options¶
TDVP run options.
Options
dataclass
¶
Options(
scheme: str = "2s",
dt: float = 0.05,
n_steps: int = 20,
order: int = 2,
max_bond: Optional[int] = None,
trunc_thresh: float = 1e-12,
expand_k: int = 4,
expand_alpha: Optional[int] = None,
krylov_dim: int = 16,
krylov_tol: float = 1e-12,
renormalize: bool = False,
env_cache_dir: Optional[str] = None,
env_async_io: bool = True,
env_window: int = 2,
checkpoint_dir: Optional[str] = None,
artifacts_dir: Optional[str] = None,
save_artifacts: bool = True,
save_artifacts_every: int = 1,
)
Bases: AlgorithmOptions
TDVP run options.
All fields have sensible defaults so Options() is a valid minimal
configuration. Use Options.from_toml to load from a TOML section, or
Options.load_toml to read directly from a file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scheme
|
str
|
Update scheme per time step. Canonical values and aliases:
|
'2s'
|
dt
|
float
|
Time increment per step. May be negative to evolve backwards, which is how a run is reversed to check accumulated error. |
0.05
|
n_steps
|
int
|
Target step index counted from the start of the history, not a number
of additional steps to perform. A run from |
20
|
order
|
int
|
Integrator order,
Both are globally second order at equal cost — two consecutive
|
2
|
max_bond
|
Optional[int]
|
Maximum bond dimension. |
None
|
trunc_thresh
|
float
|
Singular value truncation threshold (relative to the largest singular
value per charge sector). As for |
1e-12
|
expand_k
|
int
|
Maximum number of complement directions added to each bond per local
update. Only used when |
4
|
expand_alpha
|
Optional[int]
|
Internal bond dimension of the cheap factorization of Θ inside the
expansion, which keeps the complement search cheaper than a 2-site
step. Only used when |
None
|
krylov_dim
|
int
|
Maximum Krylov subspace dimension per local exponential. The solver
stops earlier on happy breakdown or once |
16
|
krylov_tol
|
float
|
Convergence tolerance for the local matrix exponential, measured as the weight the propagator places on the newest Krylov direction. |
1e-12
|
renormalize
|
bool
|
If |
False
|
env_cache_dir
|
Optional[str]
|
Root directory for environment disk caching. When set, |
None
|
env_async_io
|
bool
|
If |
True
|
env_window
|
int
|
Number of environment blocks to keep in memory at once when disk caching is enabled. |
2
|
checkpoint_dir
|
Optional[str]
|
Directory for checkpoint files. After every time step an
|
None
|
artifacts_dir
|
Optional[str]
|
Directory for archived |
None
|
save_artifacts
|
bool
|
If |
True
|
save_artifacts_every
|
int
|
Stride between archived steps: step A run never evolves past the last grid point. When |
1
|
TOML Loading¶
Options can be loaded directly from a TOML section:
import tomllib
from alice.algorithm import tdvp
with open("config.toml", "rb") as f:
cfg = tomllib.load(f)
opts = tdvp.Options.from_toml(cfg["quench"]["algorithm"])
Example TOML block:
[quench.algorithm]
scheme = "2s"
dt = 0.05
n_steps = 40
order = 2
max_bond = 64
trunc_thresh = 1e-12
expand_k = 8
expand_alpha = 8
krylov_dim = 16
save_artifacts_every = 4
Choosing dt and max_bond¶
The two parameters fail in opposite directions and are best converged separately.
Truncation error is set by max_bond and is independent of dt, so a run
limited by bond dimension shows no improvement when the step is halved.
Integration error scales as dt² for order=2 and is independent of
max_bond. A scan that halves dt and sees the error drop by four is
integration-limited; one that sees no change is truncation-limited and needs a
larger max_bond.
Entanglement grows roughly linearly in time after a quench, so the bond dimension needed grows exponentially. This, not the step size, sets the reachable time horizon.
Choosing expand_k¶
expand_k matters only for scheme='1sp', where it caps how many directions a
bond may gain per local update. The cap is an upper bound and frequently not
the binding one: what a bond receives is however many directions its complement
holds above the scale the discarded-space projection cancelled on, and for a
short-range Hamiltonian that is typically one or two. A typical choice for the
cap is round(sqrt(max_bond)).
Too small a value is visible as a max_bonds history that climbs step by step
over a stretch where the physics is not changing that fast, and as observables
that improve when expand_k is raised at fixed max_bond and dt. Too large
a value costs a slightly bigger SVD per update and changes nothing else — if
raising it does not move the answer, the complement, not the cap, was the
limit. Setting expand_k = 0 disables the expansion and reproduces '1s'
exactly, a useful control when attributing an error to the expansion instead
of to the integrator.
expand_alpha truncates the two-site tensor the complement search is built
from, which keeps the search cheaper than a 2-site step; None leaves the
bond intact, making the search exact and the step no cheaper than '2s'. A
typical choice is round(sqrt(max_bond)), the same scale as expand_k.