Teachers

Canvas

This course uses Canvas. See tips and guides for Canvas.

Log into Canvas

Dear all welcome to FYS4411/9411 and please have me excused for this late update.

The plan this week is to discuss codes and implementations of restricted Boltzmann machines and neural networks to quantum mechanical many-body systems. The lecture this week develops the theory and implementation of Neural Quantum States (NQS), starting from the probabilistic foundations of Boltzmann machines and ending with fully-trained deep neural-network wave functions for the quantum harmonic oscillator.

We will also discuss project 2 and its variants. The jupyter-notebook for this week is at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week12/ipynb/week12.ipynbLinks to an external site.

There are also additional notes on stochastic reconfiguration at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week12/ipynb/sg1.pdf

Outline:

Section Topic

1 Boltzmann Machines ...

Apr. 17, 2026 7:24 AM

Dear all, welcome back and we hope all is well after heroic efforts with project 1.? We hope to be able to send feedback by the end of next week.

This week we plan to start discussions of project 2 and our plans are

Discussions of various variants of project 2

Depending on your interests, we will start discussing the path about Neural Networks and Boltzmann Machines, with an introduction to Boltzmann machines this week (partly also next week) and neural networks next week.

You find the lecture notes at?https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week11/ipynb/week11.ipynb

Similarly, all four variants of project 2 are listed at?https://github.com/CompPhysics/ComputationalPhysics2/tree/gh-pages/doc/Projects/2026/Project2

During our lectures we will mainly discuss the variants with Boltzmann machines and how to simulate Fermionic systems.?

See you soon and best wishes,

Aleksander and Morten

Apr. 9, 2026 2:46 PM

Dear all, welcome back to FYS4411/9411. This week we will dedicated the lecture and the lab sessions of March 27 to project 1 only. Thus there is no lecture, only lab. Since many of you program in Python, we will not lecture about parallelization and vectorization. However, for those of you working with C++ and/or Fortran, there is a detailed set of lectures discussion OpenMP and MPI and vectorization at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week10/ipynb/week10.ipynb

For those of you who wish to discuss and study these notes, we can discuss this material during the time we have this Friday, from 915am to 2pm.

Best wishes to you all,

Aleksander and Morten

Mar. 23, 2026 8:36 AM

Dear all, welcome back to FYS4411/9411. We hope you are enjoying your weekend.

This coming week our focus will be on deriving the equations for the bootstrap algorithm and the blocking algorithm. We will start with a reminder from last Friday on the central limit theorem and the equation for the final total variance defined in terms of the covariance. We will link this expression with that of the blocking method and how we can use this method to estimate correctly the standard deviation, without computing the covariance! As example, we will use a well-known test data set, random numbers generated from the uniform distribution. This will serve us in computing the standard deviation without thinking of correlations in the data sets, including the covariance and the autocorrelation function, the bootstrap method and finally the blocking method. Hopefully, this example allows us to get a better handle on various resampling methods, their pros and cons.

The...

Mar. 15, 2026 12:42 PM

Dear all and welcome back to FYS4411/9411. This week the plans are to discuss in more details how to evaluate the best possible (from a statistical point of view) the mean value of the energy and its standard deviation. This will lead us to two famous resampling methods, the bootstrap method and the Blocking method. But we will also discuss the stochastic reconfiguration method (more relevant for project 2).

The plan this week is thus to?

Stochastic reconfiguration, from last week, see slides at?https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week7/pdf/week7.pdf

Resampling Techniques and statistics: Bootstrap and Blocking

Discussion of codes

The lecture notes this week are at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week8/ipynb/week8.ipynb

We will continue with a discussion of these methods next week as well. By then we should have covered all e...

Mar. 10, 2026 3:16 PM

Welcome back to FYS4411/9411. The plans for this week involve

1) a repetition from last week (see the notebook from week 6)? about the implementation of gradient descent and the equations we need to encode.? Here we will mainly focus on the elements we need to have in our codes.

2) Then we will discuss in more detail various quasi-newton methods. The plan for the lecture is to discuss methods beyond the so-called brute force gradient descent and discuss their suitability for project 1 and project 2 eventually. We will thus discuss

Gradient methods:

Quasi-Newton methods (Broyden's algorithm, Broyden-Farberg-Goldberg-Shanno algorithm, and Powell's algorithm)

Steepest descent and conjugate gradient descent

Stochastic reconfiguration if we get time

The slides/jupyter-notebook are at https://github.com/CompPhysics/ComputationalPhysics2/tree/gh-pages/doc/pub/week7

The lecture this week i...

Mar. 5, 2026 4:39 PM

Dear all, since we did not have a regular lecture last week (only lab), this week we will try to catch up what we did not do last week. We will thus extend the lecture to 12pm, starting at 915am as usual.? ?The lecture will be recorded as usual. We will try to wrap up the discussions we did not finish last week on the Fokker-Planck equation, but the main emphasis will be on the optimization part. Thus, the aim is to discuss

Here are the plans with the link to the jupyter-notebook for this week, see https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week6/ipynb/week6.ipynb

Topics.

Finalizing the discussion of the Fokker-Planck equation (whiteboard notes mainly and additional notes at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week4/pdf/fokkerplanck.pdf

Start discussion? of the optimization process and derivation of equations for the gradients of the energy

Gradie...

Feb. 26, 2026 5:15 PM

Dear all, welcome back to FYS4411/9411.?

Note that this week the lecture will be in the form of a recoding only due to Morten being at a meeting.

The recording will be uploaded later during the weekend (unfortunately, I apologize the delay). Thus, this week, there is no in-person nor direct zoom lecture. However, the lab session starts at our regular time 1115am and ends at 2pm. Aleksander will be there for the lab session. Else, the material this week will cover

1) Reminder on Fokker-Planck equation and Langevin equations (partly from last week)

2) Programming elements of correlation function (needed later)

We will send an email as soon as the recording has been uploaded.

The slides (jupyter-notebook) are at?https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week5/ipynb/week5.ipynb

Best wishes to you all,

Aleksander and Morten

Feb. 19, 2026 3:20 PM

Dear all, welcome back to FYS4411.

The plans for this week are?

Topics.

Short repetition from last week

Mathematical and computational details of importance sampling and Fokker-Planck and Langevin equations

For the lab session we will continue our discussions on how to build a VMC code for project 1

The jupyter-notebook for this week is at at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week4/ipynb/week4.ipynb (alternatively you can use the pdf file) and we will cover some of the mathematical details on how to compute the trial wave functions with importance sampling as well as the more mathematical (technicalities) of importance sampling such as the Fokker-Planck equation and how we? derive the actual expression for the quantum force.

To read more about Metropolis, Markov Chains, importance sampling, Fokker-Planck and Langevin equations, we recommend Becca and So...

Feb. 12, 2026 4:34 PM

Dear all and welcome back to Comp Phys 2.

Since Morten is away for a workshop in Sweden, the lecture will via zoom only tomorrow. However, the lab session from 11.15am to 2pm will take place as usual. Aleksander will be there for the whole lab session.

Our plans this week are

Markov Chain Monte Carlo and repetition from last week

Metropolis-Hastings sampling and introducing importance sampling

Importance sampling will allow us to sample more reliably from a transition probability that mimics the physics at play. This will lead us to a discussion of what is called the Fokker-Plank equation and the Langevin equation in actual implementations of importance sampling.

We start with a top-down approach first where we present the equations we have to implement and show how to program this. Thereafter we will discuss the mathematical foundation. In the lab session we continue on implementing the variational Monte...

Feb. 5, 2026 8:34 PM

Dear all, welcome back to FYS4411/9411.??Here are the plans for the lecture and lab session this week.

You will find the lecture notes for this week at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week2/ipynb/week2.ipynb

The topics this week are?

Repetition from last week and discussions of code templates in python and C++

Essential ingredients: Variational Monte Carlo methods, Metropolis Algorithm, statistics and Markov Chain theory

How to structure the VMC code

Sections 3.1-3.9 of Sorella and Becca's text follow to a large extent the topics for the lecture. Chapter 2 gives a good review of central statistics elements and can serve as background literature.

You can download the book for free from the university library by accessing it via oria.no or simply use the link https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/Literature/MCbookSorella...

Jan. 29, 2026 5:04 PM

Dear all, welcome to a new semester and FYS4411/9411.

Our first session is January 23 at 915am, room F?434 at the Department of Physics, UiO.

All lectures will be recorded and the videos will be posted asap online here. Our first lab session follows right after the first lecture. You can attend the lectures remotely as well via zoom at https://uio.zoom.us/my/mortenhj

The link to the teaching material is at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week1/ipynb/week1.ipynb or as a PDF file at https://github.com/CompPhysics/ComputationalPhysics2/blob/gh-pages/doc/pub/week1/pdf/week1.pdf

Note that for codes the jupyter-notebook is better suited than the pdf file.

Best wishes to you all and welcome.

Aleksander and Morten

Dec. 29, 2025 8:50 AM