pytc.vmc.metropolis.metropolis_hastings¶
- pytc.vmc.metropolis.metropolis_hastings(ansatz, walker, step_size, key, params, move_type='one', batch_ansatz=None)[source]¶
Perform one step of Metropolis-Hastings sampling for quantum wavefunction.
- Parameters:
ansatz – Wavefunction object with __call__ method that returns ψ(R)
walker – Walker dataclass with current state
step_size – Standard deviation of Gaussian proposal
key – PRNG key
params – contains jastrow_params and linear_coeffs
move_type – “all” to move all electrons at once, “one” to move one electron at a time
batch_ansatz – Optional pre-vmapped ansatz function
- Returns:
new_walker: New walker state after one sampling step
acceptance_rate: Fraction of proposals that were accepted
- Return type:
Tuple containing