Python For Quantum Mechanics#

Description#

This is the online textbook for the course Introduction to Python for Quantum Mechanics. The course provides a practical introduction to Python programming, with a focus on both core and applied libraries relevant to Quantum Physics. It is designed to support students in developing the coding skills necessary to carry out their MSc and further projects effectively.

The course covers essential scientific libraries such as NumPy, SciPy, and Matplotlib, as well as specialized quantum computation tools like QuTiP and Qiskit. It also includes a short tutorial on creating and managing Conda virtual environments, along with basic Git usage for reliable version control of scripts and programs.

Course goals#

The main goals of this course are to:

  • Develop a solid foundation in Python programming, basic skills in managing virtual environments using conda and using basic Git commands for effective version control and remote/local repository management.

  • Gain practical knowledge of core scientific libraries, including NumPy, SciPy, and Matplotlib, essential for numerical computing, linear algebra and data visualization.

  • Provide the fundamentals of Python libraries for quantum computation, with an introduction to QuTiP.

  • Develop a critical perspective on AI-assisted programming tools, such as Copilot, understanding their benefits, limitations, and responsible use.

Overview#

Monday sessions will be lectures introducing new concepts and libraries, while Tuesday sessions will be face-to-face (F2F) tutorials where students can work on exercises and receive assistance.

  • Monday: 3pm - 6pm

  • Tuesday: 10am - 11pm

Week

Day

Format

Topic

1

Mo. Sept. 15th

Lecture

Conda envs., Git and Python fundamentals

1

Tu. Sept. 16th

F2F

Exercises and tutorial asistance

2

Mo. Sept. 22nd

Lecture

Flow control, comprehensions & I/O

2

Tu. Sept. 23rd

F2F

Exercises and tutorial asistance

3

Mo. Sept. 29th

Lecture

Functions and classes

3

Tu. Sept. 30th

F2F

Exercises and tutorial asistance

4

Mo. Oct. 6th

Lecture

Numpy and Matplotlib

4

Tu. Oct. 7th

F2F

Exercises and tutorial asistance

5

Mo. Oct. 13th

Lecture

Scipy and Scientific writing tools

5

Tu. Oct. 14th

F2F

Exercises and tutorial asistance

6

Mo. Oct. 20th

Lecture

Qutip - Quantum Toolbox in Python

6

Tu. Oct. 21st

F2F

Exercises and tutorial asistance

Installation & Requirements#

Contact#

License#

This content is licensed under Creative Commons Attribution-NonCommercial-ShareAlike (CC BY-NC-SA) license. This license allows others to remix, tweak, and build upon this work non-commercially, as long as they credit the original creator and license their new creations under the same terms. See LICENSE for details.

alt