The Monte Carlo algorithm
The Algorithm for performing a variational Monte Carlo calculations runs as this
- Initialisation: Fix the number of Monte Carlo steps. Choose an initial \( \boldsymbol{R} \) and variational parameters \( \alpha \) and calculate \( \left|\psi_T^{\alpha}(\boldsymbol{R})\right|^2 \).
- Initialise the energy and the variance and start the Monte Carlo calculation.
- Calculate a trial position \( \boldsymbol{R}_p=\boldsymbol{R}+r*step \) where \( r \) is a random variable \( r \in [0,1] \).
- Metropolis algorithm to accept or reject this move \( w = P(\boldsymbol{R}_p)/P(\boldsymbol{R}) \).
- If the step is accepted, then we set \( \boldsymbol{R}=\boldsymbol{R}_p \).
- Update averages
- Finish and compute final averages.
Observe that the jumping in space is governed by the variable step. This is often referred to as the brute-force sampling and is normally replaced by what is called importance sampling, discussed in more detail next week..