' PY 502, Computational Physics

PY 502, Computational Physics, Fall 2025

Department of Physics, Boston University

Instructor: Anders Sandvik

Lectures: Tuesday, Thursday 5:00-6:15 PM, in SCI B58
Discussion meetings, Friday 2:30-3:20 PM, in SCI B58
Office hours: Wednesday 2:30-3:30 PM and Thursday 3:00-4:00 PM in SCI 450A

This course introduces some of the most widely used methods of computational physics, including numerical solutions of differential equations (initial and boundary value problems) in classical and quantum mechanics, Monte Carlo simulations, and numerical diagonalization of quantum many-body Hamiltonians. Beyond providing a basic working knowledge of these particular techniques, the goal is to create the foundations for ``computational thinking''---the ability to create models of physical phenomena and devise suitable numerical methods to study their properties. The Julia programming languages will be used---the first few lectures will introduce the language. The full syllabus is available here.

Course News

Homework #3 posted, due Oct 14.

Lecture Notes and Program Examples

0) Course Introduction
     Lecture slides: [Sep 2]
1) Introduction to the Julia programming language [Program examples]
     Lecture slides: [Sep 2] [Sep 4] [Sep 9] [Sep 11] [Sep 16]
2) Numerical integration and Monte Carlo integration [Notes] [Program examples]
     Lecture slides: [Sep 16] [Sep 18(anim)] [Sep 23]
3) Solving classical equations of motion [Notes] [Program examples]
     Lecture slides: [Sep 23] [Sep 25] [Sep 30 (anim)(anim)] /td>
4) Quantum mechanics: solving the Schroedinger equation [Instructor's notes] [Program examples]
     Lecture slides: [Oct 2]

Materials for (some) discussion meetings

[Sep 5] [Sep 12] [Sep 19] [Sep 26a] [Sep 26b]

Homework assignments

1) Due: Sep 25 [Problem text] [Solutions]
2) Due: Oct 2 [Problem text] [Solutions]
3) Due: Oct 14 [Problem text] [Solutions]

Online Julia resources

Home page of the Julia language; download, documentation
Julia Express; brief introduction to the Julia language

Other resources

[color2d.f90] 2D plot program (Fortran)