Skip to content

MesoHOPS 1.7.0#5

Closed
alexiahartzell wants to merge 1 commit intomasterfrom
release-v1.7.0
Closed

MesoHOPS 1.7.0#5
alexiahartzell wants to merge 1 commit intomasterfrom
release-v1.7.0

Conversation

@alexiahartzell
Copy link
Copy Markdown
Collaborator

MesoHOPS 1.7.0

This commit upgrades MesoHOPS to support million-state-class adaptive simulations, expands nonlinear spectroscopy to full third-order rephasing/non-rephasing pathways, and includes stability and quality improvements across checkpointing, storage, and core numerical routines.

Key improvements and features:

  1. Million-state-class scalability: Adaptive-basis construction, operator-assembly, and noise-memory bookkeeping were redesigned to remain size-invariant on million-state-class systems. The new HopsNoiseMemory class manages z-memory indexing with O(1) updates as the adaptive basis grows; modes that have left the basis but not yet decayed below precision persist in z_mem until they do, with separate index lists tracking the full set vs. the active subset. Reduced/masked sparse paths were strengthened to avoid full-system constructions in critical routines.

  2. HOPS Nonlinear Spectroscopy (NLS): DyadicSpectra now supports full third-order rephasing and non-rephasing pathways (GSB / SE / ESA) in a unified workflow.

  3. Dyadic checkpoint robustness: Strengthened save/load validation and restore behavior for DyadicTrajectory checkpoints. Selective permanent-state / adaptive interactions added and validated for stable spectroscopy-focused adaptive runs.

  4. Checkpoint storage-time fix: HopsStorage.storage_time is now correctly reloaded from checkpoint data; previously it reset on restore.

  5. Storage default refinement: list_aux_norm is no longer saved by default in HopsStorage; users who depend on it must opt in via storage_dic={'list_aux_norm': True}. Reduces default RAM cost. When z_mem is saved (adaptive checkpoints), list_zmemmodeidx_abs is now auto-enabled so the mode-index mapping survives checkpoint round-trips.

  6. General Brownian-oscillator BCF: bcf_convert_dl_ud_to_exp is removed. Use bcf_convert_bo_to_exp(lambda_bo, gamma_bo, omega_bo, temp, k_matsubara=0) instead. The new function uses an exact contour integration over the upper half-plane and handles both underdamped (γ < Ω) and overdamped (γ > Ω) regimes in one workflow, with optional Matsubara corrections. Critical damping (γ = Ω) raises ValueError; near-critical damping warns. Numerical results for simulations that previously used bcf_convert_dl_ud_to_exp will differ from 1.6.x; re-run convergence checks against the new implementation.

  7. Numerical robustness guards: Divide-by-zero protection added to system and hierarchy timescale calculations.

  8. Vestigial code removal: The unused NoiseTrajectory class was removed.

These enhancements collectively improve the scalability, spectroscopic capability, and numerical robustness of MesoHOPS for current and future applications.

Imported from MesoscienceLab/pyhops master at commit 10beb3f4 via the
release_to_mesohops.py tool. Identifier renames (pyhops -> mesohops) and
display-string renames (PyHOPS -> MesoHOPS) applied during import; private
files (README.md, LICENSE, .gitignore) preserved from mesohops master.

Highlights of v1.7.0 (vs. mesohops 1.6.0):

Build stability:
- pyproject.toml: pin all dependency ranges. numba and numpy pinned tight
  (numba >=0.63,<0.64; numpy >=2.3,<2.4) to guard against a history of
  stochastic test failures and memory issues that tracked numba minor bumps;
  numba binds against a specific numpy ABI per release. Other deps loose-
  pinned at the major.
- pyproject.toml: tighten requires-python to >=3.12,<3.14 (matches what CI
  validates and what the numba pin allows).
- pyproject.toml: replace malformed "Development Status :: full release
  1.6.0" classifier with the standard trove classifier.
- .github/workflows/coverage.yml: matrix CI on Python 3.12 + 3.13 and add
  a gating clean-install smoke job that runs `pip install .` (non-editable)
  + level-1 tests; catches packaging bugs the editable-install coverage
  job hides.

Cleanup:
- src/mesohops/noise/hops_noise.py: fix __title__ casing typo.
- tests/test_git_utils.py: skip test_get_git_commit_hash_success when the
  installed package is not inside a git working tree (the function returns
  the git error message string in that case, by design).
- Remove two orphan test fixtures (pyhops_testing_noise{,_v0}.npy) that
  were never referenced by any test.

Test results on the imported snapshot: level-2 suite passes 319/319 in a
fresh venv with the pinned dep ranges resolving cleanly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant