Computational Methods I
USOSThis is the mandatory Computational Methods I course of the Master in Theoretical Physics at the University of Wrocław. It is tailored towards master and PhD students who are familiar with
- computers and their operating systems (Linux is preferred, but Windows or MacOS will work, too)
- at least one programming language, ideally Python which we will use in the course
- classical and quantum mechanics.
There are many good books on the subject, four that I like are
- Landau , Páez, Bordeianu: Computational Physics: Problem Solving with Python
- Scherer: Computational Physics - Simulation of Classical and Quantum Systems
- Matthes: Python Crash Course - A Hands-On, Project-Based Introduction to Programming
- Johansson: Numerical Python
There will be 2 hours of lectures and 2 hours of labs each week. Exercises will be posted here a week before the tutorial they are discussed in. Please keep in mind that active participation in the labs and especially submitting the solution to the posed problems is important to pass the course. M.Sc. Biplab Mahato will be the assistant for this course. Please fell free to contact him () or me if you have any questions. For information about credits points, please refer to the syllabus or contact me directly.
Location: There have been some changes of lecture room. We are now in the computer lab 120 for both, the lectures and the labs.
Recordings/hybrid participation: The lectures will be streamed on YouTube with the link for each of them given below. This should help if you are not able to physically attend.
Exam: As discussed during the first lecture, we will have individual projects for the exam. If you have any project idea, we are very happy to hear about it and then decide together how to best implement it. Here are a couple of ideas which might help you
-
Molecular Dynamics Simulations
Simulate the behavior of a gas or liquid using molecular dynamics. For example implement the Lennard-Jones potential and study properties like diffusion, temperature, or phase transitions.
-
Quantum Mechanics Simulations
Solve the Schrödinger equation for a coherent state in the stadium billiard and compare its time evolution with the classical trajectory. Plot some of the eigenfunctions and discuss their properties.
-
Monte Carlo Methods
Implement a Monte Carlo simulation of the 2-dimensional Ising model or percolation. Explore random sampling techniques, convergence properties and/or phase transitions.
-
Astrophysical Simulations
which is either a) N-body simulations or b) solve the TOV equation
-
Electromagnetic Wave Propagation
Model the propagation of electromagnetic waves in various media. Implement the Finite-Difference Time-Domain (FDTD) method to study wave behavior, reflection, and refraction.
-
Chaos and Dynamical Systems
Explore chaotic systems, such as the logistic map or Lorenz attractor. Focus: Analyze stability, bifurcations, and strange attractors (other than the Lorenz attractor) using numerical methods.
-
Quantum Computing Simulations
Simulate simple quantum algorithms (e.g. Grover's, and Shor's algorithm or quantum teleportation). Implement quantum gates and circuits using Python with libraries such as Qiskit.
Once you have chosen a project and it is approved by us, you will prepare your Python code, a small documentation and some of the most important results and submit them to us by January the 31st 2025. Please send everything to Biplab and me via email. After this, you will have a 10-minute presentation of your results during the exam session (dates and times will be coordinated) followed by 5 minutes of discussion.
For the last three tutorials, there will be no assignments. Instead you have the chance to discuss challenges you encounter in your project.
Development environment: In this course we will use the programming language Python with a notebook interface, called Jupyter notebooks. To get all this running, and avoid possible problems with incompatible versions of Python packages, we will use a standardized development environment. To set it up, please first install Visual Studio Code. On Linux, you will most likely have it already in your package manager. Alternatively, you can also download it here. Next, you need to clone the git repository for this course. To this end, open VS Code and click on the two documents (Explorer, Ctrl+Shift+E) to find something which looks like this
Now, click on "Clone Repository" and enter the URL of our git repository
https://www.fhassler.de/git/public/ComputationalMethodsI
like this
Finally you have to install all packages for the virtual environment, we use to run our Python code and notebooks. In the main menu, click on Terminal and then Run Build Task... (Ctrl+Shift+B). After this you should see some activity in the terminal on the bottom of the screen. If there are no errors, you have successfully installed the virtual environment. Now you are ready to add your own notebooks or run some of the already provided.
Additional material for the individual lectures, including the exercises which we discuss in the labs, is given below:
- A quick introduction to PythonTutorial04.10.2024 08:15, exercise
- Different representations of numbers and their numerical errorsTutorial11.10.2024 08:15, exercise
- Numerical differentiation and integrationTutorial18.10.2024 09:15, exercise
I have updated the virtual environment to include the libraries scipy and sympy. You can just pull the most recent version from the git and run the build task again (like described above) to be able to use these libraries.
- Ordinary differential equationsTutorial25.10.2024 09:15, exercise
- Classical dynamics with regular and chaotic behaviorTutorial08.11.2024 10:15, exercise
You might be interested to see a real, physical double pendulum after this lecture. Moreover you can play with the corresponding Poincare-map.
- Methods to solve non-linear equationsTutorial20.11.2024 10:15, exercise
- Iteration, bifurcation, self-similarity and chaosTutorial22.11.2024 10:15, exercise
- Linear algebra, in particular finding eigenvalues and eigenvectorsTutorial29.11.2024 10:15, exercise
- Quantum dynamics, tunneling in a double-well potentialLecture06.12.2024 07:30, show recording
- Generating random numbersLecture13.12.2024 09:15, show recording
- Brownian motion and the random walkLecture20.12.2024 07:30, show recording
- Monte-Carlo simulationsLecture10.01.2025 07:00
- The two dimensional Ising modelLecture17.01.2025 07:00
- Partial differential equationsLecture24.01.2025 07:30
- Neural networksLecture31.01.2025 07:30