jaxrens.state.ns¶
NSState: full state of a nested sampling run.
Carries the live walker population (as a batched MCState), the log-evidence accumulator, an iteration counter, and RNG state. Registered as a JAX pytree for compatibility with JIT/vmap.
Dead points are not on NSState — the algorithm never reads them, only
emits them via ns_step’s info dict at cull time, so they don’t
belong on the state. Per-iteration callbacks (EnergyLogger,
TrajectoryCallback) consume info["dead_walker"] (a WalkerState
pytree) and persist the values straight to disk — there is no in-memory
dead-point buffer.
NSState is ensemble-agnostic — it doesn’t know about pressure, chemical potentials, or ensemble type. The full ensemble potential is stored in MCState.energy (via EnsembleTerm), and ns_step reads it directly.
Classes
Algorithm-only state of a nested sampling run. |