Monte Carlo wave function method