Skip to content

Commit

Permalink
project 2 ML added
Browse files Browse the repository at this point in the history
  • Loading branch information
mhjensen committed Apr 4, 2024
1 parent 33ceeed commit 1bff090
Show file tree
Hide file tree
Showing 8 changed files with 2,654 additions and 2 deletions.
492 changes: 492 additions & 0 deletions doc/Projects/2024/Project2/Project2ML/html/Project2ML-bs.html

Large diffs are not rendered by default.

517 changes: 517 additions & 0 deletions doc/Projects/2024/Project2/Project2ML/html/Project2ML.html

Large diffs are not rendered by default.

806 changes: 806 additions & 0 deletions doc/Projects/2024/Project2/Project2ML/ipynb/Project2ML.ipynb

Large diffs are not rendered by default.

Binary file not shown.
428 changes: 428 additions & 0 deletions doc/Projects/2024/Project2/Project2ML/pdf/Project2ML.p.tex

Large diffs are not rendered by default.

Binary file not shown.
400 changes: 400 additions & 0 deletions doc/Projects/2024/Project2/Project2ML/pdf/Project2ML.tex

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions doc/src/Projects/2024/Project2/Project2ML.do.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ two electrons (or bosons) in a quantum dot with a frequency of $\hbar\omega = 1$
The reason for this is that we have exact closed form expressions
for the ground state energy from Taut's work for selected values of $\omega$,
see M. Taut, Phys. Rev. A \textbf{48}, 3561 (1993).
The energy is given by $3$ a.u. (atomic units) when the interaction between the electrons is included. We can however easily extend our system to say interacting bosons, and in particualr to more than two, as we did in project 1.
The energy is given by $3$ a.u. (atomic units) when the interaction between the electrons is included. We can however easily extend our system to say interacting bosons, and in particular to more than two, as we did in project 1.
Thus, _ss an alternative, you can replace the electron system with the same system of Bosons from project 1._



If only the harmonic oscillator part of the Hamiltonian is included,
the so-called unperturbed part,
Expand Down Expand Up @@ -81,6 +84,10 @@ this specific total spin.

Many of the needed details can be found in the "lecture notes on Boltzmann machines and neural networks":"http://compphysics.github.io/ComputationalPhysics2/doc/LectureNotes/_build/html/boltzmannmachines.html". We recommend also to take a look at the code at the end of these notes.





=== Representing the wave function with a neural network ===

Our neural network of choice is the restricted Boltzmann machine. It
Expand Down Expand Up @@ -148,6 +155,7 @@ If $\sigma_i = \sigma$ then
Here $\mathbf{X}$ are the visible nodes (the position coordinates), $\mathbf{H}$ are the hidden nodes, $\mathbf{a}$ are the visible biases, $\mathbf{b}$ are the hidden biases and $\mathbf{W}$ is a matrix containing the weights characterizing the connection of each visible node to a hidden node.

=== The Wave Function ===

To find the marginal probability $F_{rbm}(X)$ we set:
!bt
\begin{align}
Expand Down Expand Up @@ -230,6 +238,7 @@ Add importance sampling to improve your method. Document the results and compare
Include a proper statistical analysis by use of the blocking method for your results.



=== Project 2 e): Interaction ===

Include the interaction. Remember that for the interacting case we
Expand All @@ -238,7 +247,7 @@ dimensions (the energy shoud be 3 a.u.).
As before, experiment with the learning rate and
number of hidden values and document how well the network reproduces
the analytical value.
For bosons you can easily extend the code in order to handle more particles. For fermions we would need to include properly the anti-symmetry of the wave function.
For bosons you can easily extend the code in order to handle more particles. For fermions we would need to include properly the anti-symmetry of the wave function. As an optional part, you could use the same Hamiltonian for Bosons as you did in project 1.

=== Project 2 f): Replacing a Boltzmann machine with a neural network (optional part) ===

Expand Down

0 comments on commit 1bff090

Please sign in to comment.