Summary¶
TgTRG thermodynamic summary: β grid, log Z, and derived observables at each
cooling step. Density matrices are returned separately as
Artifact.
Summary
dataclass
¶
Summary(
betas: List[float] = list(),
taus: List[float] = list(),
log_z: List[float] = list(),
free_energies: List[float] = list(),
energies: List[float] = list(),
specific_heats: List[float] = list(),
entropies: List[float] = list(),
exact_energies: List[float] = list(),
discarded_weights: List[float] = list(),
krylov_errors: List[float] = list(),
max_bonds: List[int] = list(),
finished: bool = True,
n_steps: int = 0,
)
Bases: AlgorithmSummary
TgTRG thermodynamic summary (no density matrix).
Density matrices are returned separately as Artifact (and optionally
archived under artifacts/ when Options.save_artifacts is enabled).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
betas
|
List[float]
|
Inverse temperature at each cooling step, starting from the Taylor state's own β. |
list()
|
taus
|
List[float]
|
Increment each entry was reached with, aligned with |
list()
|
log_z
|
List[float]
|
|
list()
|
free_energies
|
List[float]
|
Free energy per site, |
list()
|
energies
|
List[float]
|
Internal energy per site, |
list()
|
specific_heats
|
List[float]
|
Specific heat per site, |
list()
|
entropies
|
List[float]
|
Entropy per site, |
list()
|
exact_energies
|
List[float]
|
Internal energy per site measured directly as
|
list()
|
discarded_weights
|
List[float]
|
Per-step discarded weight at the mid-chain bond ( |
list()
|
krylov_errors
|
List[float]
|
Per-step largest Krylov error estimate over all local propagators. One entry per step. |
list()
|
max_bonds
|
List[int]
|
Largest bond dimension of |
list()
|
finished
|
bool
|
|
True
|
n_steps
|
int
|
Number of cooling steps reflected in this summary. |
0
|
Methods:¶
serialize
¶
Serialize the summary to a plain dict compatible with torch.save.
Returns:
| Type | Description |
|---|---|
dict
|
Serialized summary (version 1; no density matrix). |
deserialize
classmethod
¶
Reconstruct a Summary from a dict produced by serialize.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
Dict previously returned by |
required |
device
|
str
|
Unused; the summary holds no tensors. Accepted for API
compatibility with |
'cpu'
|
Returns:
| Type | Description |
|---|---|
Summary
|
Reconstructed thermodynamic summary. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Serialization¶
Summary supports save/load via torch.save / torch.load:
# Save after a run.
summary.save("cooling_result.ckpt")
# Load later.
from alice.algorithm.tgtrg import Summary
summary = Summary.load("cooling_result.ckpt")
During run(), the latest summary is written to thermal.ckpt under
Options.checkpoint_dir (or the current working directory when that option is
unset). Serialization version is 1 (no density matrix in the payload).
thermal.ckpt is also where a resumed or continued run recovers its β/log Z
history from, and finished is False on the mid-run snapshots. A continued
run appends to that history, so a single summary may merge segments computed
under different options — the two phases of a stacked exponential-then-linear
schedule, or a second pass at a larger max_bond. taus is the one column
that records where the step size changed; the u and c_V finite differences
spanning a junction mix both spacings, and are correspondingly worse there.
Which columns to trust¶
| Column | Source | Accuracy |
|---|---|---|
log_z |
NormalMPO.log_trace() |
roundoff, when the rank suffices |
free_energies |
log_z directly |
same as log_z |
energies |
first differences of log_z |
limited by grid spacing |
specific_heats |
second differences | limited by grid spacing, worst of the three |
entropies |
β (u - f) |
inherits the energies error |
exact_energies |
Tr[ρH] / (Tr[ρ] L) |
roundoff; empty unless Options.obs_exact |
Comparing energies against exact_energies on the same run measures the
grid's discretization error directly.