pytc.vmc.metropolis.metropolis_hastings_importance_sampling

pytc.vmc.metropolis.metropolis_hastings_importance_sampling(ansatz, walkers, time_step, key, params)[source]

Perform one step of Metropolis-Hastings with importance sampling (drift).

Parameters:
  • ansatz – Wavefunction object with __call__ method that returns ψ(R) Should also have a quantum_force method

  • walkers – Batched walker configurations with shape (n_walkers, n_electrons, 3)

  • time_step – Time step for the drift-diffusion process

  • key – PRNG key

  • params – Parameters for the ansatz, including jastrow and linear coefficients

Returns:

  • new_walkers: New walker configurations after one sampling step

  • acceptance_rate: Fraction of proposals that were accepted

Return type:

Tuple containing