Scientific Programming in Python with Applications in Physics

5 credits

Syllabus, Master's level, 1FA453

Code
1FA453
Education cycle
Second cycle
Main field(s) of study and in-depth level
Computer Science A1N, Physics A1N
Grading system
Fail (U), Pass (3), Pass with credit (4), Pass with distinction (5)
Finalised by
The Faculty Board of Science and Technology, 26 March 2021
Responsible department
Department of Physics and Astronomy

Entry requirements

120 credits in science/engineering with Quantum Physics. Proficiency in English equivalent to the Swedish upper secondary course English 6.

Learning outcomes

On completion of the course, the student should be able to:

  • account for basic components in a Python programme
  • use fundamental Python packages
  • implement numerical algorithms in Python
  • use Python for solving computational problems from different fields of physics

Content

The course gives an introduction into programming in Python and programming related solution methods.

Introduction to Python: Installation, Anaconda3, Python3, NumPy, SciPy, Spyder.

Python components: Variables (integers, floats, strings, Booleans, complex). Containers (lists, dictionaries, sets, tuples, arrays). Operators. Input/output (open, read, write, append, print). Control flow (indentation, if, while, for, else, try). Functions (def, parameters, keywords, docstrings, return).

Programming: Basic concepts. Numerical integration. Solutions for non-linear equations. Approximation of data. Least squares approximation. Convergence analysis and optimization. Solution methods: Break-up of problems in sub-problems, implementation in Python, debugging. Central examples for applications are taken from physics main fields like classical mechanics, electromagnetism, thermodynamics and quantum physics.

Instruction

Lectures and computer exercises.

Assessment

Computer exercises and hand-in exercises.

If there are special reasons for doing so, an examiner may make an exception from the method of assessment indicated and allow a student to be assessed by another method. An example of special reasons might be a certificate regarding special pedagogical support from the disability coordinator of the university.

FOLLOW UPPSALA UNIVERSITY ON

facebook
instagram
twitter
youtube
linkedin