# Computing in Physics

This is currently a draft web-site and may change between now and the start of class.

# Course Logistics

• Lectures: MW 10:00-11:30 Loomis 158
• Professor: Bryan Clark
• email: bkclark@illinois.edu
• Office: 2111 Engineering Science Building (ESB)
• Office Hours: Thursday 3-4PM
• Grading Office Hours: 4PM the day after an assignment is due.
• TA: Eli Chertkov
• TA: Garrett Vanacore (fraction of a TA)
• email: vanacor2

# Course Information

This is an immersive advanced computational physics course. Your goals in this class are to program, simulate, and understand the physics within six (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 ($\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.

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 the first time 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:55 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 and Coffee Mixing

Due: Tuesday 9/5 (5% of grade)

#### Project 1: Quantum Computing

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

Due: Sunday September 24 (20% of 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.

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

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

Due: Sunday October 21 (15% of grade)
(Note: There are three intermediate deadlines. Your final score for the project is your total score times the penalty for missing intermediate deadlines. This pentalty is 0.94 for misisng one deadline and 0.88 for missing two deadlines.)

October 7: You must have the Ising model code running and producing the correct magnetization for a single temperature
October 15: You must have the probability distribution graphed, the parallelization working, and the RG critical exponent computed.

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

#### Project 3: Thinking

Things Think
(Note: There are three intermediate deadlines. Your final score for the project is your total score times the penalty for missing intermediate deadlines. This pentalty is 0.94 for misisng one deadline and 0.88 for missing two deadlines.)

After Week 2: You must have page 1 or 2 done

1. Hopfield Networks (50% of the grade)
2. Restricted Botlzmann Machines (25% of the grade)
3. Feed-forward Neural Networks (25% of the grade)

Things think

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

#### Project 4: Condensed Matter

From simple laws, come exotic materials

Due: (Day of Final) (15% of grade)

Compute properties of topological insulators and superconductors

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

The grading in this class is somewhat atypical. There are 7 projects, each about two weeks long. Project-0 is worth $5\%$ of your grade, project-1 $20\%$, and all others $15\%$.

Each project has multiple graded checkpoints, which must be completed in order. You receive either full or zero credit for a checkpoint. To receive full credit for a checkpoint, you must convince one of us (me, Eli, Garrett) that your work is correct. It is important for you to be able to determine on your own whether your code produces the correct result and be able to make a convincing argument that you have the right answer. Therefore, you should tell us why your code is correct and explain how you know that (maybe you've done some tests or validated it somehow). In the course notes, the checkpoints will be marked with a percentage. Completing all of the checkpoints up to and including that checkpoint means you have earned that percentage of the grade for the project.

In addition to getting your code checked by us, you have to submit your code to the physics upload site with each checkpoint marked in git. See below for submission details. This submission is designed to make sure you've followed the rules (indicated who you've collaborated with, marked code from online, etc.) as well as let us look into more detail in your code, etc.

Note: At the deadline, you should submit your code to the physics upload site even if it has not been checked by one of us. This will count as submitted in time and then you can get it checked off (if it's correct) the following Monday during grading office hours (each Monday after a deadline, there will be a grading office hours so you can get things checked off).

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.

# How to submit

To submit, you should

1. Do a "git commit -a -m "This message should be the text (including the percent) of the checkpoint" (If you messed something up and need to submit it again append v2 or v3 or whatever at the end of the message)

2. Collect all the files for submission by doing

git archive -o fileName.zip HEAD