pytc.vmc.mcmc_utils.resample_walkers¶
- pytc.vmc.mcmc_utils.resample_walkers(ansatz, walkers, target_n_walkers, step_size, jitter_scale=1.0, key=None)[source]¶
Bootstrap-resample a smaller (already-equilibrated) walker ensemble up to a larger target size, inheriting its equilibration instead of paying a full cold-start burn-in.
- Parameters:
ansatz – Wavefunction object with molecular info.
walkers – Source Walker (any size), typically already equilibrated.
target_n_walkers – Desired walker count (sampled with replacement).
step_size – The SOURCE ensemble’s adapted MCMC step size; jitter sigma is tied to it so duplicates separate on the chain’s own scale rather than an arbitrary constant.
jitter_scale – Multiplier on step_size for the jitter std dev.
key – PRNG key.
- Returns:
A fresh Walker at target_n_walkers (cached fields zeroed, move_mask all-True). Duplicates are not independent samples: run a short decorrelation pass afterward, counting sweeps since the resample when applying any stability criterion.