Course outline

WarningFeedback

Please fill out the feedback form before 16th March.

These are the materials for the Part II Physics course Computational Physics, taught in Lent Term 2026 at the University of Cambridge.

1 Schedule

The course of eight Lectures will take place at 10.00 on Mondays and Wednesdays in the Ray Dolby Auditorium in the Ray Dolby Centre. After the lectures there will be four computing exercises to be completed. The exercises count for 0.2 units or further work, or roughly 2% of your final mark for the year. Thus each exercise should only take you a few hours.

The schedule is as follows:

  • First lecture: Monday 26th January
  • Eighth lecture: Wednesday 18th February
  • First exercise: Friday 20th February – Friday 27th February
  • Second exercise: Friday 27th February – Friday 6th March
  • Third exercise: Friday 6th March – Friday 13th March
  • Fourth exercise: Friday 13th March – Friday 20th March (last day of full Lent term)

1.1 Computing Project

Additionally, you may choose to offer a Computational Physics project for one unit of further work. This involves choosing a problem from the project list. You will analyse the problem, write and test Python code to investigate it, then write up your work in a report. 

Students may start their project work once the project list is published by 20th February. The deadline for submission of the project report is 16:00 on the first Monday of Full Easter term (4th May 2026).

2 Prerequisites

This course assumes a basic knowledge of the Python language, including variables, control flow, and writing and using functions, at the level of last year’s IB course (which has an excellent handout).

If you want an absolute bare bones intro to Python try the first half of this tutorial (which then goes on to introduce NumPy).

3 Learning outcomes

In this course you will learn

  1. About the Python scientific stack (based on the NumPy library)
  2. Its use in implementing some common algorithms in computational physics.
  3. Basic ideas of computational complexity used in the analysis of algorithms

4 Outline

Here’s a list of topics that I’d like to cover. We make not have time for all of them.

  1. Setup. Running Python. Notebooks. Language overview
  2. NumPy and friends
  3. Floating point and all that
  4. Soving differential equations with SciPy
  5. Monte Carlo methods
  6. Introduction to algorithms and complexity
  7. The fast Fourier transform
  8. Automatic differentiation
  9. Linear algebra with NumPy

4.1 These notes…

…were prepared using Quarto. Each chapter should be thought of as a Jupyter notebook (actually, they are Jupyter notebooks), so you’ll probably only see import numpy as np once in each chapter, for example.

The code used to generate this site is in this GitHub repo. Please use issues to submit any typos and discussions to discuss the content.

In several places I’ve used examples from an earlier version of the course by David Buscher.