2022 March 19,

CS 358: Quantum Computing

Carleton College, Winter 2022, Joshua R. Davis, , CMC 324, x4095

Introduction

A quantum computer is a machine that exploits the strange phenomena of quantum physics — superposition, measurement, entanglement, etc. — to solve computational problems. For some problems, quantum computers can vastly out-perform non-quantum computers. However, identifying these problems and devising quantum algorithms for them is difficult.

This course is an introduction to quantum computing. We focus on the computer-scientific problem of how to devise and analyze algorithms, rather than the physical problem of how to engineer the hardware. After learning some background material, we study key exchange (cryptography), Shor's period-finding algorithm, and Grover's search algorithm. As time permits, we also study sparse matrix algorithms, error correction, and adiabatic computing.

The prerequisites are Data Structures (CS 201), Linear Algebra (Math 232), and a proof course (CS 202 or Math 236). We do a lot of math — so much, that this course sometimes seems like a math course. However, the course also includes a significant programming component, where we build a quantum computer simulator in Python. If you don't know Python, then study it on your own (using the links below or other tutorials). For what it's worth, Python is one of the easiest languages to learn, and we use only the basics. Talk to me if you are concerned about your background.

Responsibilities

My understanding of the college's accreditation is that this course requires 150 hours of work. That amounts to about four hours outside of class, for each class meeting. If you find yourself spending much more or less than that, then talk to me.

Your numerical course grade is a weighted average of six scores: participation (5%), homework (5%), Exam A (25%), Exam B (25%), Exam C (25%), and project (15%).

Numerical grades are converted to letter grades only at the end of the term. There are no predetermined percentages (90%, 80%, 70%, etc.) required for specific grades (A, B, C, etc.), because I cannot write problems that are so precisely and reliably tuned. Instead, I assign letter grades by comparing students' scores to the course goals. Roughly speaking, a student who meets most of the goals earns a B. A student who meets almost all goals — and sometimes exceeds them — earns an A. A student who demonstrates effort but meets only a few of the goals earns a C. Students, for whom I have insufficient evidence of learning and effort, might earn grades below C.

An advantage of this system is that students are not in competition with each other. Also, students don't suffer when I accidentally write a difficult exam. The disadvantage is that you cannot compute your own grade. Send me e-mail, if you want me to estimate your current grade for you.

If some medical condition affects your participation in class or your taking of exams, let me know in the first week of class. You may need to make official arrangements with Accessibility Resources.

Participation

Our class meets in CMC 304 during period 2A (MonWed 9:50-11:00, Fri 9:40-10:40). I view each meeting as an "interactive lecture" or a "lecture/discussion". You are expected to do your fair share of asking and answering questions. You are expected to let other people do their fair share. Sometimes you do group work with one or two classmates.

You are expected to take notes on paper or a tablet. (Typing on a laptop is not recommended, because of all the math and drawing.) The act of taking notes helps get the information into your brain. No photography or other recording is permitted. Except in emergencies, phones should not appear in class.

I try to make the lectures self-contained, but I don't always succeed. So I also give you textbook sections and sometimes my personal notes or tutorials. Conversely, not everything we do is in the textbook.

If you miss class, then e-mail me explaining why. Obtain notes from another student. If you have questions after studying the notes, then we can meet to discuss your specific questions.

Homework

Homework consists of working examples, solving problems, and writing proofs, as in other theoretical CS and math courses. You are encouraged to figure out the problems with other students. However, you should always write/type your solutions individually, in your own words. You may not copy someone else's work or allow them to copy yours. Presenting someone else's work as your own is a violation of Carleton's Academic Integrity standards.

Writing is not just for English and history majors. Communication skills are essential to every academic discipline and highly prized by employers. In this course, your written work is evaluated both for correctness and for presentation. Consider typing the problem sets in LaTeX, so that you can compose and edit your solutions. I give you some LaTeX examples below.

Homework is handed in on paper. If you need to hand in homework late, then do so. Put it in a separate pile from the on-time homework. Depending on the grader's schedule, it might be graded for full credit, or it might not be graded at all.

Depending on time constraints in any given week, perhaps not all of your homework is graded. In order to ensure full credit, do all of the assigned problems. Although homework itself counts for not much of your grade, it can have a huge effect on your exam grades.

Exams

We have three exams.

Project

The goal of the project is to build a library of Python functions that simulate almost all of our quantum computations. In a sense, this project is tangential — the whole point of quantum computers is that they don't work like Python — but implementing abstract mathematical ideas in code is a good way to check that we understand them.

Roughly speaking, project work alternates with homework. That is, every second class day there is no homework, but instead a set of Python functions for you to implement, with unit tests to help you debug. The entire project is due at 5:00 PM on the last day of final exams. However, you are expected to implement and test these functions promptly as they are assigned. Questions about the project might show up on exams. I reserve the right to add progress checks during the term.

Resources

Office hours are essentially extra, optional class meetings. No appointment is necessary; just show up. They are now

in my office, which is CMC 324. No photography or other recording is permitted. If you want to schedule an appointment outside office hours, then consult my weekly schedule and e-mail me with several times, at which we are both available.

Our official textbook is Introduction to Quantum Algorithms via Linear Algebra by Lipton and Regan, 2nd edition. It is optional. I do not assign readings or problems out of it. Nonetheless, you might enjoy reading it, to get a treatment different from mine. Here are five other textbooks, which I have placed on two-hour reserve in the library.

Here are some resources about quantum computing and the requisite math.

Here is the start of our Python library for simulating quantum computations.

Here are some Python resources.

Here are some resources for students who choose to use LaTeX.

Tentative Schedule

To help you decode the schedule, let's talk through an example. Friday January 7 is Day 02 of the course. On that day, we learn about complex numbers. I supply you with notes called complex.pdf. You optionally read the notes. You have a homework assignment called Day 02. You make a serious attempt to complete it immediately (before Day 03), but it is due at the start of class on Day 04.

DateDayTopicsReadingHomework/ProjectDueNotes
W 1/0501overview, outlinesyllabusDay 0101
F 1/0702complex numbersnotesDay 0204complex.pdf
M 1/1003vectors, unitary matrices, one qbitnotesDay 0305complex.py
W 1/1204one qbit, Bennett (1992) cryptosystemDay 0406
F 1/1405BennettDay 0507
M 1/1706two qbits, entanglement, partial measurementDay 0608
W 1/1907partial measurement, gatesDay 07end
F 1/2108no cloning, Deutsch (1985) problem6.2, 8.1, 8.2Day 0810
M 1/2409Deutsch, many qbits2.0, 3.5Day 09end
W 1/2610entanglement, partial measurement, tensor powers6.5, 6.6Day 1012
F 1/2811Exam A
M 1/3112classical vs. quantum, Bernstein-Vazirani (1992) problem5.1, 5.3Day 12end
W 2/0213Bernstein-Vazirani, Simon (1994) problem10Day 1315
F 2/0414Simon10Day 14end
M 2/07midterm break
W 2/0915modular powers, periods11.1, 11.2Day 1517
F 2/1116Fourier transform, Shor (1994) algorithm5.2, 11.3Day 16endfourier.pdf, .nb
M 2/1417Shor11.4, 11.5Day 1719
W 2/1618finding periods11.6, 11.7Day 18endperiodsFactors.pdf
F 2/1819factoring, Grover (1996) algorithm13.0, 5.5Exam B20
M 2/2120Grover13.1, 13.2Day 2022
W 2/2321Grover known k13.1, 13.2Day 21end
F 2/2522Grover unknown k, implementing large gates13.3Day 2224
M 2/2823implementing large gatesDay 23end
W 3/0224implementing large gatesDay 2426
F 3/0425adiabatic quantum computingnotesDay 25endcomplex.pdf
M 3/0726adiabaticnotesDay 26Farhi et al. (2000)
W 3/0927adiabaticnotes
F 3/1128Exam C
W 3/16project due at 5:00 PM