Here are the python programs related to Week 5:

And here are some sections of the SMAC book (Krauth W., "Statistical mechanics: algorithms and computations". OUP Oxford, 2006) related to the topics treated in Week 5:

3.1.1 (quantum harmonic oscillator, wave functions, energy levels, density matrix), 3.1.2 (density matrix in free space and in a periodic box), 3.1.3 (density matrix in a box with periodic/open boundary conditions), 3.2.1 (Trotter formula, convolution of density matrices), 3.3 (path-integral formulation), 3.3.1 (path integral Monte Carlo)