Skip to content

Alice 0.1.5

Choose a tag to compare

@Phy-David-Zhang Phy-David-Zhang released this 08 Jun 13:11
· 8 commits to stable since this release

Alice 0.1.5 — Cache Isolation and Thermal MPO

Release Date: June 8, 2026

Version 0.1.5 brings two targeted improvements: DMRG environment-block caching is now
safe for concurrent runs sharing the same configuration directory, and the early-stopping
criterion in thermal_mpo is corrected to account for the operator norm of H.
No breaking changes.

📦 DMRG Environment Cache Isolation

  • dmrg.run() now creates a unique subdirectory inside env_cache_dir for each
    invocation — the first 8 hex characters of a freshly generated UUID4
    (e.g. {env_cache_dir}/a1b2c3d4/). Previously, all runs sharing the same
    env_cache_dir wrote to the same left/ and right/ subdirectories, so launching
    two DMRG jobs with the same configuration could corrupt each other's cached blocks.
  • The unique subdirectory and all its contents are removed automatically in a finally
    block when run() returns or raises, so no stale files are left behind even after an
    exception.
  • Options.env_cache_dir documentation updated to describe the subdirectory scheme and
    the automatic cleanup.

🌡️ thermal_mpo Early-Stopping Correction

  • The early-stopping test in thermal_mpo previously compared the bare Taylor
    coefficient |β^n / n!| against coeff_thresh. This is insufficient for Hamiltonians
    with a large operator norm: ‖H^n‖_F can be many orders of magnitude larger than 1,
    so the actual contribution |β^n / n!| × ‖H^n‖_F can remain significant long after
    the bare coefficient falls below coeff_thresh.
  • The criterion is now |β^n / n!| × H_pow.scale < coeff_thresh, where H_pow.scale
    is the running Frobenius norm of H^n tracked by NormalMPO. This ensures the loop
    exits only when the contribution of the next term is genuinely negligible.
  • A related redundant guard that conditionally skipped the power-update step has been
    removed; H_pow is now always advanced when n < order, which is correct because the
    decision to exit is made at the top of the next iteration.
  • Docstrings for the order and coeff_thresh parameters updated to describe the
    corrected criterion.

📊 Statistics

  • ~795 tests across 23 test modules (up from ~740 / 23 modules in v0.1.4)
  • 3 commits since v0.1.4
  • 4 files changed, 141 insertions, 19 deletions
  • 22 source modules in three subpackages: alice.network, alice.physics,
    alice.algorithm.dmrg

✅ Compatibility

Breaking Changes: None — fully backward compatible with v0.1.4. All import paths,
function signatures, TOML configuration keys, and geometry APIs are unchanged.

Requirements:

  • Python ≥ 3.11
  • PyTorch ≥ 2.5
  • Nicole ≥ 0.3.7

📝 Notes

The subdirectory isolation in env_cache_dir is a strict improvement: existing
configurations that set env_cache_dir to a shared path will now work correctly across
parallel DMRG jobs without any change to their TOML files or call sites.

The thermal_mpo fix matters whenever ‖H‖_F > 1, which is the common case for
physical Hamiltonians on chains of more than a handful of sites. With the old criterion
the loop could exit prematurely — stopping before the series had converged — producing
a silent accuracy regression for larger systems or higher temperatures.