Computing in Physics#

Welcome to Computing in Physics. This is the online text designed for an immersive advanced computational physics course, Physics-446, offered by the Physics Department at the University of Illinois. I’ve developed this course to teach you some of the coolest physics I know. This text should be thought of not as a textbook but more as a workbook which guides you through four (plus one) computational projects. This is inverted from the typical approach to learning where lectures or textbooks are designed to teach and problem sets are designed for testing. Here the problem sets are where you learn. This approach comes from the philosphy that learning happens by doing! That said, these projects are not designed to be do-able on your own: ask questions and get help! You can download the course syllabus here.


Overall Learning Objectives#

The general learning objectives for this course are

  • How to be a computational physicist taught through an immersive hands-on approach. We will learn everything from good software engineering, to how to go from a model to working simulation code, to how to collect and analyze computational data.

  • A computational perspective on physics. There are various ways to learn physics, but one of the best is to understand it sufficiently well that you can teach a computer how to do it. You will understand the physics of quantum mechanics by teaching your laptop to simulate a quantum computer; you will understand renormalization group by teaching your computer how to do block-spin decimation.

  • Computational Thinking. In your standard physics curriculum, you have learned how to approach problems analytically (and often experimentally). Thinking about the world computationally is a different skill which give an alternative tool to approach and understanding problems in the world including scientific ones.


Broad Themes#

There are three broad themes that we will see throughout these projects. They are:

From simple rules, comes complicated phenomena: One quantum mechanical equation gives us all of chemistry, superconductivity, topological insulators, etc.; from firing neurons arises thinking; from evolution arises complicated life. Computation is the best way I know how to shed insight on all of these topics. Computers allow you to simulate the emergence of complex phenomena from simple laws, and I know no better way to understand physics than by teaching your computer how to do physics.

You can understand the universe from simple models: By this time in your physics career you’re probably used to this truism, but think about it for a minute; why don’t you need string theory to understand the pressure in a balloon? There is a deep reason for this which goes by the names universality and the renormalization group. The statistical mechanics section of this course is designed to provide a first pass at universality by having you write simulations that compute universal critical exponents and numerically implement a renormalization group calculation on the Ising model.

Quantum computers are more powerful than classical computers: Or in other words, quantum mechanics is hard to simulate. For many years, the idea that all computing machines in the universe computed equally well (the modified Church–Turing thesis) was one of the core tenets of computer science. This means that anything that is computatable in the universe is computable at (about) the same speed on your macbook. Quantum computing broke this paradigm, for reasons which you will come to deeply understand both by writing a quantum computing simulator as well as trying to simulate quantum mechanics!



Projects#

Your goals are to program, simulate, and understand the physics in the four (plus one) projects described below. This work will span much of class-time and all your homework. Reading/working carefully through this text, coming to class and office-hours, and asking questionsare the most effective ways to accomplish this. My goal is to help you accomplish these projects through this text, lectures (usually \(\ll 30\) minutes per class), and one-on-one interaction throughout class. The physics that you will work with is broad, and so we will cover a very narrow (albeit important) path through it. This follows a just-in-time approach to teaching: you’ll learn information that you need as you need it.

Neither the text nor the lectures will cover all the information you need to complete these projects. Depending on the strength of your physics and computation background, you may need to fill in those information gaps (with our guidance, of course). As you advance in your career in either academia or industry, this will become more common. Learning how to correct an information deficit is an important skill. Use the books and links we mention liberally.

You will write programs and run simulations. Programming can be done in essentially any langauge with a strong preference for python (with C++ and Julia as reasonable alternatives). To get yourself up and running logistically with programming, see Getting Started.

As a rule of thumb, don’t spend more than 30 minutes trying to decipher a problem on your own; come get clarification. Approach I recommend: Start making progress, get stuck, learn what you need to know to overcome your problem, continue.


Cellular Automata (project 0)#

Due: January 22 (5% of grade)


Quantum Computing#

Quantum mechanics allows you to compute some things exponentially faster than classical physics.

Due: February 12 (23.75% of the grade)

Build a quantum computer simulator and simulate Shor’s algorithm to factor 21.

Quantum computing is probably the most important revolution in computing in the last fifty years….

If you’ve seen quantum mechanics, great! If not, in my (slightly biased) viewpoint, this is the amongst the best ways to learn quantum mechanics.


Statistical Mechanics, Universality, and Renormalization#

The world is comprehensible even if we don’t know the basic rules.

Due: March 5 (23.75% of the grade)

Simulate the Ising model using Monte Carlo and the Renormalization group

Statistical Mechanics is the study of how you go from microscopic to macroscopic phenomena. Renormalization group is the deepest idea in physics


Generative Modeling#

Emergent Models of Thinking Many of the most interesting machine learning models are essentially simulations of physical systems.

*Due: April 2 (23.75% of the grade)

Physics …

Neural networks: Build a minimal model of memory; learn about machine learning.


Make Up Week#

Week of April 3


Condensed Matter#

From simple laws, come exotic materials

Due: (Day of Final) (23.75% of the grade)


(All projects are due at 11:59 PM of the date listed.) (Project narratives are considered drafts until we actually assign the project)



Grading and Submission Policies#

The grading in this course is somewhat atypical. It is designed for a mastery-based approach where you get credit for what you’ve accomplished and learned. These projects are difficult and so this course is designed with a low floor and a high ceiling. The grading scheme helps facilitate this.

There are 4+1 projects, each about three weeks long.

You will get points for the parts of the project that you complete successfully, but there will be no partial credit for incorrect results. To compensate for this we are going to spend a lot of class-time + office hours trying to help you get through these projects.

Grading will be done in person. You will need to show one of the course staff your work in person and convince them it’s right. It is an important skill that you learn to determine whether your code produces the correct result. Projects will be graded during a grading office-hour.

Two additional points:

  • It is required that you put together a document (we have a template) that shows the summary of your results. It will mainly consist of pasted plots and output. This is primarily to expedite and facilitate grading. When you show us your assignment for grading, we will look through your document as well as ask you other questions/look at aspects of your code/etc.

  • It is required that you submit your code and document by the time of the project’s deadline. Each of you will have a separate box folder set up for you where you will place these files.

The grading is not linear. Getting through \(40\%\) of the points for a project does not mean you’ve made it through 40% of the material for the project. Grading is designed to give you more points early on in the project.

There is no late submission.

We will not post solutions.

Extra credit will be added to the relevant project and so is weighted the same as the given project.


Grading Rubric#

Grades on the border are rounded up - i.e. 90% is an A.

  • 100+: A+

  • 90-100: A

  • 80-90: A-

  • 70-80: B+

  • 60-70: B

  • 50-60: B-

  • 40-50: C+

  • 35-40: C

  • 30-35: C-

  • 25-30: D+

  • 20-25: D

  • 10-20: D-

  • 0-10: F



Course Staff and Office Hours#

  • Lectures: MW 10:00-11:20am, 158 Loomis Laboratory

  • Professor: Bryan Clark

  • Professor: Lucas Wagner

  • TA: Pin-yi Li



Attendance#

There is no attendance required for class (although we believe that coming to class will be helpful!) That said, please do not attend class if you are sick. In such a case, we will work with you to make sure you get caught up. No notes for sickness, etc are required.


Frequently asked questions#

What is the difficulty level of this course: This course is designed to be tractable but challenging. Place it in your mind on the same level of difficulty as other upper-level physics courses like quantum and statistical mechanics. You will spend a lot of time out of class working on assignments.

What preparation do I need for this course? The primary requirements are a willingness to work hard and some programming experience (you will get much better at it throughout the course). Most of the physics you need to know will be introduced as needed. If you don’t know a lot of quantum mechanics, there is no better way to learn than emulating a quantum computer. If you don’t know statistical mechanics, you’ll learn from simulating the Ising model.

Who is this course for? Those who are interested in learning some of the coolest physics I know through a computational lens; those who want to improve their computational skills; those who are interested in mastering the art of computational physics. I think it is a good course both for those interested in going to graduate school and for those going into industry.

What this course is not? A programming course, a numerical methods course, a software engineering course, etc. That said you will get better at programming and learn plenty of tools and techniques (git, parallel programming, machine learning, etc.).


Collaboration and resource-use policy#

  • You are allowed to collaborate with others but must write and submit your own work. Please write on top of your work with whom you’ve collaborated.

  • You are allowed to look things up online (including coding things). If you are using code from online, you must

    • make sure that it is freely available to be used;

    • document in your code when and where you are using it.

  • While you can look up things online, you’re not allowed to directly look up an answer. So if we ask “write code that simulates a quantum computer in python” you’re not allowed to type into google “python code for simulating a quantum computer” and then copy it.

  • You are not allowed to use github copilot or chatgpt.

  • Please do not post your code on a public website, such as a public github page.


Text and course designed by Bryan Clark