Computing in Physics#

Course Logistics#

  • Lectures: MW 10:00-11:20am, 3018 Campus Instructional Facility

  • Professor: Bryan Clark

  • TA: Matthew Thibodeau

    • email: mt24@illinois.edu

    • Office: ESB 3109

    • Office Hours: Wednesday 3pm and Friday 2pm, ESB Third Floor Lounge


Course Announcements#


Course Information#

Syllabus will be uploaded soon.

This is an immersive advanced computational physics course. Your goals in this class are to program, simulate, and understand the physics within four (plus one) projects described below — these projects will span much of class-time and all of your homework. My goal is to help you accomplish those tasks. To the extent necessary this will include some lecturing (usually \(\ll 30\) minutes per class), some one-on-one interaction in class, and a lot of individual work in and out of class. This is inverted from the typical approach where lectures are designed to teach and problem sets are designed to test your understanding of the material. You should come to class (and office hours). These projects are not designed to be do-able without our help; trying to do them without asking questions and having us help you will make your life much harder.

While there will be some lecturing, lectures will not cover all the information you need to complete the projects. Instead, you will need to use resources mentioned on the web-site (and others) to make progress, especially depending on your physics and computing background.

You will write programs and run simulations. Programming will be done in python and C++ (maybe we will optionally test Julia — come see me if you are interested in that). You need to get python and C++ running on your computer; see help in project 0 below.

This is one of the first times this course has been run, meaning it is a work in progress. Projects will be a little rough as many bumps are still being worked out. Let us know if there is a problem or something we can do to improve things. Don’t read too literally, and try to answer the questions we are asking, not the ones we’ve necessarily written. As a rule of thumb, don’t spend more than 30 minutes trying to decipher a problem on your own; come to us for clarification.


Conceptual objectives:#

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#

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


This course is set up primarily to help you get through the projects. The physics that you will work with is broad, and so we will cover a very narrow (albeit important) path through it. My heurestic will be to tell you things that

  • You need to know to accomplish this projects;

  • I think is sufficiently cool that you should know it if you’re in computational physics.

There will be information, though, that won’t be covered in lecture but might be necessary to succeed in the 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.

Approach I recommend: Start making progress, get stuck, learn what you need to know to overcome your problem, continue.


Project 0: Getting up and Running - Cellular Automata#

Due: January 22 (5% of grade)

  • Getting Started

  • Cellular Automata

  • Cellular Automata (C++ version)


Project 1: 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.

  • Quantum Computing Project Overview


Project 2: Statistical Mechanics, Universality, and the Renormalization group#

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

  • Stat Mech Project Overview


Project 3: Generative Modeling#

Emergent Models of Thinking

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

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

  • Thinking Overview


Make Up Week#

Week of April 3


Project 4: Condensed Matter#

From simple laws, come exotic materials

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

  • Condensed Matter Project Overview


Frequently asked questions#

What will I learn in this course?

This course is simultaneously three things:

  • An immersive how-to approach for doing computational physics. This means 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. In other words, this course will teach you how to be a computational physicist.

  • 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 to renormalize.

  • A long lesson on how to think computationally. In other words, it will teach you how to think like a computational physicist.

Most of the examples in this course will focus on the emergence of complicated behavior from a large collection of simple things following simple rules.

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.).


Grading and Submission#

The grading in this class is somewhat atypical. 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 on your own whether your code produces the correct result and to be able to make a convincing argument that you have the right answer. Therefore you should tell us that your code is correct and explain how you know that (maybe you’ve done some tests or validated it somehow). You can get graded either when the project is over or as you complete separate pages of the project.

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 (including your git repository) 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.


Grading Rubric#

  • 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

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.


Scheduling Details#