Quantum Monte Carlo Methods in Equilibrium and Nonequilibrium Systems