Artifact¶
Density-matrix snapshot at one XTRG cooling step (ρ(β), beta, step).
Artifact
dataclass
¶
Bases: AlgorithmSummary
Density-matrix snapshot at one XTRG cooling step.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rho
|
NormalMPO
|
Thermal density matrix |
required |
beta
|
float
|
Inverse temperature of this snapshot. |
required |
step
|
int
|
Step index: |
required |
Methods:¶
serialize
¶
Serialize the artifact to a plain dict compatible with torch.save.
Returns:
| Type | Description |
|---|---|
dict
|
Serialized artifact. |
deserialize
classmethod
¶
Reconstruct an Artifact from a dict produced by serialize.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
dict
|
Dict previously returned by |
required |
device
|
str
|
Device to place all tensor blocks on. Defaults to |
'cpu'
|
Returns:
| Type | Description |
|---|---|
Artifact
|
Reconstructed artifact with the density matrix on |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
On-disk layout¶
Under the checkpoint directory (Options.checkpoint_dir, or cwd) and the
artifacts directory (Options.artifacts_dir, or artifacts/ under the
checkpoint directory):
checkpoint_dir/
thermal.ckpt # latest Summary (kept after success)
xtrg.ckpt # latest Artifact while running (removed on success)
artifacts/ # or Options.artifacts_dir, when set
step_00.ckpt # when Options.save_artifacts is True
step_01.ckpt
...
- Step
0is after Taylor init (ρ(τ₀)). - Step
k(1 … n_steps) is after thek-th squaring. - Files use two-digit zero padding (
step_{k:02d}.ckpt). xtrg.ckptis overwritten each step and deleted whenrun()finishes successfully; a crash leaves it on disk for inspection.
from alice.algorithm.xtrg import Artifact
artifact = Artifact.load("artifacts/step_05.ckpt")
rho = artifact.rho
print(artifact.beta, artifact.step)