estimating integrals by random sampling. The key insight is to rewrite the energy expectation value as: