[WIP] Add single-particle Worm and partition improved estimators - #192
Draft
weiyiguo9 wants to merge 18 commits into
Draft
[WIP] Add single-particle Worm and partition improved estimators#192weiyiguo9 wants to merge 18 commits into
weiyiguo9 wants to merge 18 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This work-in-progress PR adds two single-particle improved-estimator paths:
F_tauandF_l;F_tauandF_l, with fused accumulation and a configurable measurement stride. This strategy follows the general approach used in ComCTQMC.It also includes the associated solver plumbing, post-processing for the improved self-energy, HDF5 serialization, generated Python bindings, documentation, and focused tests. Time-translation-invariant density-matrix changes are based from Casitel‘s PR, but this PR doesn’t depend on it. (So feature per PR)
Status
This is an early Draft PR. The implementation and tests are still preliminary, and there’re some validation but not that complete. I am publishing it now because these estimator paths may already be useful for discussion and testing by others.
Production use should be cross-checked carefully against independent implementations and against the original Fourier-basis measurement of
G(tau).Feedback on the API, estimator conventions, and validation strategy is welcome.
Further context on the scope of this PR
The Worm implementation in this draft is deliberately minimal. The admissible single-particle F-worm components are enumerated during setup, while the relative visitation of the Z and F sectors still needs to be tuned in short pilot runs through
worm_etaand, in practice, the Worm-move proposal weightworm_probbefore production runs.The implementation adds estimator-specific Z/F-sector bookkeeping, moves, and measurement gating on top of the existing
mc_genericworkflow. It does not attempt to introduce a unified multi-sector Worm framework that could support arbitrary correlators. A fully general solution would require substantially broader changes to the Monte Carlo core, including generic sector/component handling and potentially adaptive sector-weight determination, for example through a Wang–Landau-type procedure.Such a general framework would be valuable future work, but it would considerably increase the scope and review workload of this PR. The present approach is intentionally less invasive: it keeps the existing partition-sector workflow as the default and makes the new estimators opt-in. In my view, this may make this feature useful to existing CT-HYB users sooner (and most of users are only measure the self-energy then), while allowing a unified Monte Carlo-core design to be developed and evaluated later as an alternative path rather than as a prerequisite replacement.
Base and cherry-pick
This work is based on
TRIQS/cthyb@fe3a94a3adb36cbf6f6e09ac427d7d853b05b708, which was the liveunstablehead when this branch was created.The changes are organized as 18 logical commits, from
e6c0a54through1685974. The series separates the Worm trace/moves, estimator containers and post-processing, partition and Legendre paths, stabilization and fused measurement work, focused tests, and binding regeneration.To cherry-pick the complete series after fetching this branch:
Preliminary validation
impurity_trace_op_insertandworm_F_atomicpass, including simultaneous ordinary density-matrix and Worm-F measurements;Py_h5_read_write_morepasses;unstableTRIQS stack is still pending.Generative AI Use Declaration
This PR was co-authored with an OpenAI Codex agent.