1
0
mirror of https://github.com/TREX-CoE/qmc-lttc.git synced 2024-11-04 05:04:01 +01:00
This commit is contained in:
scemama 2021-01-13 17:19:08 +00:00
parent 208633f5ba
commit 0b68f33e86

View File

@ -3,7 +3,7 @@
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<!-- 2021-01-13 Wed 17:16 -->
<!-- 2021-01-13 Wed 17:19 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Quantum Monte Carlo</title>
@ -257,63 +257,63 @@ for the JavaScript code in this tag.
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org4a9ddbc">1. Introduction</a></li>
<li><a href="#orge0ff9ff">2. Numerical evaluation of the energy</a>
<li><a href="#orga6c4680">1. Introduction</a></li>
<li><a href="#orgbd9cf5e">2. Numerical evaluation of the energy</a>
<ul>
<li><a href="#orgdeb59a5">2.1. Local energy</a>
<li><a href="#org4602d4d">2.1. Local energy</a>
<ul>
<li><a href="#orgaf7c81d">2.1.1. Exercise 1</a></li>
<li><a href="#orgb1539ef">2.1.2. Exercise 2</a></li>
<li><a href="#orgdd1b9ad">2.1.3. Exercise 3</a></li>
<li><a href="#org5d94e2f">2.1.4. Exercise 4</a></li>
<li><a href="#org2edcc8c">2.1.1. Exercise 1</a></li>
<li><a href="#orgcb78b9e">2.1.2. Exercise 2</a></li>
<li><a href="#orgc33dd0f">2.1.3. Exercise 3</a></li>
<li><a href="#org431cb51">2.1.4. Exercise 4</a></li>
</ul>
</li>
<li><a href="#org42a6623">2.2. Plot of the local energy along the \(x\) axis</a>
<li><a href="#org6d7f64c">2.2. Plot of the local energy along the \(x\) axis</a>
<ul>
<li><a href="#orgaead419">2.2.1. Exercise</a></li>
<li><a href="#orgf1fd2c9">2.2.1. Exercise</a></li>
</ul>
</li>
<li><a href="#org378ff7e">2.3. Numerical estimation of the energy</a>
<li><a href="#org173d9a9">2.3. Numerical estimation of the energy</a>
<ul>
<li><a href="#org75cd008">2.3.1. Exercise</a></li>
<li><a href="#org5e04e85">2.3.1. Exercise</a></li>
</ul>
</li>
<li><a href="#orgfc011fc">2.4. Variance of the local energy</a>
<li><a href="#org432407c">2.4. Variance of the local energy</a>
<ul>
<li><a href="#org6d57935">2.4.1. Exercise</a></li>
<li><a href="#org6ab07ed">2.4.1. Exercise</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orga306082">3. Variational Monte Carlo</a>
<li><a href="#org5efc5c3">3. Variational Monte Carlo</a>
<ul>
<li><a href="#org099cca1">3.1. Computation of the statistical error</a>
<li><a href="#org2728444">3.1. Computation of the statistical error</a>
<ul>
<li><a href="#orgc19f8b1">3.1.1. Exercise</a></li>
<li><a href="#orgb486adb">3.1.1. Exercise</a></li>
</ul>
</li>
<li><a href="#org1368841">3.2. Uniform sampling in the box</a>
<li><a href="#orga26ebef">3.2. Uniform sampling in the box</a>
<ul>
<li><a href="#org3d3960f">3.2.1. Exercise</a></li>
<li><a href="#org1074e59">3.2.1. Exercise</a></li>
</ul>
</li>
<li><a href="#org06f5918">3.3. Gaussian sampling</a>
<li><a href="#orgeae4a90">3.3. Gaussian sampling</a>
<ul>
<li><a href="#org4d51250">3.3.1. Exercise</a></li>
<li><a href="#orga61b663">3.3.1. Exercise</a></li>
</ul>
</li>
<li><a href="#orge173139">3.4. Sampling with \(\Psi^2\)</a>
<li><a href="#orgbb2e4ee">3.4. Sampling with \(\Psi^2\)</a>
<ul>
<li><a href="#orgc4e7b06">3.4.1. Importance sampling</a></li>
<li><a href="#org6e6e902">3.4.2. Metropolis algorithm</a></li>
<li><a href="#org1fab989">3.4.1. Importance sampling</a></li>
<li><a href="#org3bb9660">3.4.2. Metropolis algorithm</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#orgbf88afc">4. <span class="todo TODO">TODO</span> Diffusion Monte Carlo</a>
<li><a href="#org450a6fd">4. <span class="todo TODO">TODO</span> Diffusion Monte Carlo</a>
<ul>
<li><a href="#org6800963">4.1. Hydrogen atom</a></li>
<li><a href="#orgf162a0f">4.2. Dihydrogen</a></li>
<li><a href="#org04ef686">4.1. Hydrogen atom</a></li>
<li><a href="#orgac9e630">4.2. Dihydrogen</a></li>
</ul>
</li>
</ul>
@ -321,8 +321,8 @@ for the JavaScript code in this tag.
</div>
<div id="outline-container-org4a9ddbc" class="outline-2">
<h2 id="org4a9ddbc"><span class="section-number-2">1</span> Introduction</h2>
<div id="outline-container-orga6c4680" class="outline-2">
<h2 id="orga6c4680"><span class="section-number-2">1</span> Introduction</h2>
<div class="outline-text-2" id="text-1">
<p>
We propose different exercises to understand quantum Monte Carlo (QMC)
@ -364,8 +364,8 @@ interpreted as a single precision value
</div>
<div id="outline-container-orge0ff9ff" class="outline-2">
<h2 id="orge0ff9ff"><span class="section-number-2">2</span> Numerical evaluation of the energy</h2>
<div id="outline-container-orgbd9cf5e" class="outline-2">
<h2 id="orgbd9cf5e"><span class="section-number-2">2</span> Numerical evaluation of the energy</h2>
<div class="outline-text-2" id="text-2">
<p>
In this section we consider the Hydrogen atom with the following
@ -439,13 +439,13 @@ E & = & \frac{\langle \Psi| \hat{H} | \Psi\rangle}{\langle \Psi |\Psi \rangle}
\end{eqnarray*}
</div>
<div id="outline-container-orgdeb59a5" class="outline-3">
<h3 id="orgdeb59a5"><span class="section-number-3">2.1</span> Local energy</h3>
<div id="outline-container-org4602d4d" class="outline-3">
<h3 id="org4602d4d"><span class="section-number-3">2.1</span> Local energy</h3>
<div class="outline-text-3" id="text-2-1">
</div>
<div id="outline-container-orgaf7c81d" class="outline-4">
<h4 id="orgaf7c81d"><span class="section-number-4">2.1.1</span> Exercise 1</h4>
<div id="outline-container-org2edcc8c" class="outline-4">
<h4 id="org2edcc8c"><span class="section-number-4">2.1.1</span> Exercise 1</h4>
<div class="outline-text-4" id="text-2-1-1">
<div class="exercise">
<p>
@ -489,8 +489,8 @@ and returns the potential.
</div>
</div>
<div id="outline-container-orgb1539ef" class="outline-4">
<h4 id="orgb1539ef"><span class="section-number-4">2.1.2</span> Exercise 2</h4>
<div id="outline-container-orgcb78b9e" class="outline-4">
<h4 id="orgcb78b9e"><span class="section-number-4">2.1.2</span> Exercise 2</h4>
<div class="outline-text-4" id="text-2-1-2">
<div class="exercise">
<p>
@ -525,8 +525,8 @@ input arguments, and returns a scalar.
</div>
</div>
<div id="outline-container-orgdd1b9ad" class="outline-4">
<h4 id="orgdd1b9ad"><span class="section-number-4">2.1.3</span> Exercise 3</h4>
<div id="outline-container-orgc33dd0f" class="outline-4">
<h4 id="orgc33dd0f"><span class="section-number-4">2.1.3</span> Exercise 3</h4>
<div class="outline-text-4" id="text-2-1-3">
<div class="exercise">
<p>
@ -607,8 +607,8 @@ So the local kinetic energy is
</div>
</div>
<div id="outline-container-org5d94e2f" class="outline-4">
<h4 id="org5d94e2f"><span class="section-number-4">2.1.4</span> Exercise 4</h4>
<div id="outline-container-org431cb51" class="outline-4">
<h4 id="org431cb51"><span class="section-number-4">2.1.4</span> Exercise 4</h4>
<div class="outline-text-4" id="text-2-1-4">
<div class="exercise">
<p>
@ -651,14 +651,14 @@ local energy.
</div>
</div>
<div id="outline-container-org42a6623" class="outline-3">
<h3 id="org42a6623"><span class="section-number-3">2.2</span> Plot of the local energy along the \(x\) axis</h3>
<div id="outline-container-org6d7f64c" class="outline-3">
<h3 id="org6d7f64c"><span class="section-number-3">2.2</span> Plot of the local energy along the \(x\) axis</h3>
<div class="outline-text-3" id="text-2-2">
</div>
<div id="outline-container-orgaead419" class="outline-4">
<h4 id="orgaead419"><span class="section-number-4">2.2.1</span> Exercise</h4>
<div id="outline-container-orgf1fd2c9" class="outline-4">
<h4 id="orgf1fd2c9"><span class="section-number-4">2.2.1</span> Exercise</h4>
<div class="outline-text-4" id="text-2-2-1">
<div class="exercise">
<p>
@ -775,8 +775,8 @@ plot './data' index 0 using 1:2 with lines title 'a=0.1', \
</div>
</div>
<div id="outline-container-org378ff7e" class="outline-3">
<h3 id="org378ff7e"><span class="section-number-3">2.3</span> Numerical estimation of the energy</h3>
<div id="outline-container-org173d9a9" class="outline-3">
<h3 id="org173d9a9"><span class="section-number-3">2.3</span> Numerical estimation of the energy</h3>
<div class="outline-text-3" id="text-2-3">
<p>
If the space is discretized in small volume elements \(\mathbf{r}_i\)
@ -806,8 +806,8 @@ The energy is biased because:
</div>
<div id="outline-container-org75cd008" class="outline-4">
<h4 id="org75cd008"><span class="section-number-4">2.3.1</span> Exercise</h4>
<div id="outline-container-org5e04e85" class="outline-4">
<h4 id="org5e04e85"><span class="section-number-4">2.3.1</span> Exercise</h4>
<div class="outline-text-4" id="text-2-3-1">
<div class="exercise">
<p>
@ -917,8 +917,8 @@ a = 2.0000000000000000 E = -8.0869806678448772E-002
</div>
</div>
<div id="outline-container-orgfc011fc" class="outline-3">
<h3 id="orgfc011fc"><span class="section-number-3">2.4</span> Variance of the local energy</h3>
<div id="outline-container-org432407c" class="outline-3">
<h3 id="org432407c"><span class="section-number-3">2.4</span> Variance of the local energy</h3>
<div class="outline-text-3" id="text-2-4">
<p>
The variance of the local energy is a functional of \(\Psi\)
@ -940,8 +940,8 @@ energy can be used as a measure of the quality of a wave function.
</p>
</div>
<div id="outline-container-org6d57935" class="outline-4">
<h4 id="org6d57935"><span class="section-number-4">2.4.1</span> Exercise</h4>
<div id="outline-container-org6ab07ed" class="outline-4">
<h4 id="org6ab07ed"><span class="section-number-4">2.4.1</span> Exercise</h4>
<div class="outline-text-4" id="text-2-4-1">
<div class="exercise">
<p>
@ -1083,8 +1083,8 @@ a = 2.0000000000000000 E = -8.0869806678448772E-002 s2 = 1.806881
</div>
<div id="outline-container-orga306082" class="outline-2">
<h2 id="orga306082"><span class="section-number-2">3</span> Variational Monte Carlo</h2>
<div id="outline-container-org5efc5c3" class="outline-2">
<h2 id="org5efc5c3"><span class="section-number-2">3</span> Variational Monte Carlo</h2>
<div class="outline-text-2" id="text-3">
<p>
Numerical integration with deterministic methods is very efficient
@ -1100,8 +1100,8 @@ interval.
</p>
</div>
<div id="outline-container-org099cca1" class="outline-3">
<h3 id="org099cca1"><span class="section-number-3">3.1</span> Computation of the statistical error</h3>
<div id="outline-container-org2728444" class="outline-3">
<h3 id="org2728444"><span class="section-number-3">3.1</span> Computation of the statistical error</h3>
<div class="outline-text-3" id="text-3-1">
<p>
To compute the statistical error, you need to perform \(M\)
@ -1141,8 +1141,8 @@ And the confidence interval is given by
</p>
</div>
<div id="outline-container-orgc19f8b1" class="outline-4">
<h4 id="orgc19f8b1"><span class="section-number-4">3.1.1</span> Exercise</h4>
<div id="outline-container-orgb486adb" class="outline-4">
<h4 id="orgb486adb"><span class="section-number-4">3.1.1</span> Exercise</h4>
<div class="outline-text-4" id="text-3-1-1">
<div class="exercise">
<p>
@ -1191,8 +1191,8 @@ input array.
</div>
</div>
<div id="outline-container-org1368841" class="outline-3">
<h3 id="org1368841"><span class="section-number-3">3.2</span> Uniform sampling in the box</h3>
<div id="outline-container-orga26ebef" class="outline-3">
<h3 id="orga26ebef"><span class="section-number-3">3.2</span> Uniform sampling in the box</h3>
<div class="outline-text-3" id="text-3-2">
<p>
We will now do our first Monte Carlo calculation to compute the
@ -1226,8 +1226,8 @@ statistical error.
</p>
</div>
<div id="outline-container-org3d3960f" class="outline-4">
<h4 id="org3d3960f"><span class="section-number-4">3.2.1</span> Exercise</h4>
<div id="outline-container-org1074e59" class="outline-4">
<h4 id="org1074e59"><span class="section-number-4">3.2.1</span> Exercise</h4>
<div class="outline-text-4" id="text-3-2-1">
<div class="exercise">
<p>
@ -1337,8 +1337,8 @@ E = -0.49588321986667677 +/- 7.1758863546737969E-004
</div>
</div>
<div id="outline-container-org06f5918" class="outline-3">
<h3 id="org06f5918"><span class="section-number-3">3.3</span> Gaussian sampling</h3>
<div id="outline-container-orgeae4a90" class="outline-3">
<h3 id="orgeae4a90"><span class="section-number-3">3.3</span> Gaussian sampling</h3>
<div class="outline-text-3" id="text-3-3">
<p>
We will now improve the sampling and allow to sample in the whole
@ -1434,8 +1434,8 @@ average energy can be computed as
</div>
<div id="outline-container-org4d51250" class="outline-4">
<h4 id="org4d51250"><span class="section-number-4">3.3.1</span> Exercise</h4>
<div id="outline-container-orga61b663" class="outline-4">
<h4 id="orga61b663"><span class="section-number-4">3.3.1</span> Exercise</h4>
<div class="outline-text-4" id="text-3-3-1">
<div class="exercise">
<p>
@ -1546,8 +1546,8 @@ E = -0.49517104619091717 +/- 1.0685523607878961E-004
</div>
</div>
<div id="outline-container-orge173139" class="outline-3">
<h3 id="orge173139"><span class="section-number-3">3.4</span> Sampling with \(\Psi^2\)</h3>
<div id="outline-container-orgbb2e4ee" class="outline-3">
<h3 id="orgbb2e4ee"><span class="section-number-3">3.4</span> Sampling with \(\Psi^2\)</h3>
<div class="outline-text-3" id="text-3-4">
<p>
We will now use the square of the wave function to make the sampling:
@ -1572,8 +1572,8 @@ the local energies, each with a weight of 1.
</div>
<div id="outline-container-orgc4e7b06" class="outline-4">
<h4 id="orgc4e7b06"><span class="section-number-4">3.4.1</span> Importance sampling</h4>
<div id="outline-container-org1fab989" class="outline-4">
<h4 id="org1fab989"><span class="section-number-4">3.4.1</span> Importance sampling</h4>
<div class="outline-text-4" id="text-3-4-1">
<p>
To generate the probability density \(\Psi^2\), we consider a
@ -1686,7 +1686,7 @@ variance \(\tau\,2D\).
</div>
<ol class="org-ol">
<li><a id="org9d10285"></a>Exercise 1<br />
<li><a id="org6f5d328"></a>Exercise 1<br />
<div class="outline-text-5" id="text-3-4-1-1">
<div class="exercise">
<p>
@ -1722,7 +1722,7 @@ Write a function to compute the drift vector \(\frac{\nabla \Psi(\mathbf{r})}{\P
</div>
</li>
<li><a id="orgc6b3c6b"></a><span class="todo TODO">TODO</span> Exercise 2<br />
<li><a id="org0582e3c"></a><span class="todo TODO">TODO</span> Exercise 2<br />
<div class="outline-text-5" id="text-3-4-1-2">
<div class="exercise">
<p>
@ -1834,8 +1834,8 @@ E = -0.48584030499187431 +/- 1.0411743995438257E-004
</ol>
</div>
<div id="outline-container-org6e6e902" class="outline-4">
<h4 id="org6e6e902"><span class="section-number-4">3.4.2</span> Metropolis algorithm</h4>
<div id="outline-container-org3bb9660" class="outline-4">
<h4 id="org3bb9660"><span class="section-number-4">3.4.2</span> Metropolis algorithm</h4>
<div class="outline-text-4" id="text-3-4-2">
<p>
Discretizing the differential equation to generate the desired
@ -1896,7 +1896,7 @@ the simulation.
</div>
<ol class="org-ol">
<li><a id="orgb2a508c"></a>Exercise<br />
<li><a id="org06ee82b"></a>Exercise<br />
<div class="outline-text-5" id="text-3-4-2-1">
<div class="exercise">
<p>
@ -2052,17 +2052,17 @@ A = 0.78861366666666655 +/- 3.5096729498002445E-004
</div>
<div id="outline-container-orgbf88afc" class="outline-2">
<h2 id="orgbf88afc"><span class="section-number-2">4</span> <span class="todo TODO">TODO</span> Diffusion Monte Carlo</h2>
<div id="outline-container-org450a6fd" class="outline-2">
<h2 id="org450a6fd"><span class="section-number-2">4</span> <span class="todo TODO">TODO</span> Diffusion Monte Carlo</h2>
<div class="outline-text-2" id="text-4">
</div>
<div id="outline-container-org6800963" class="outline-3">
<h3 id="org6800963"><span class="section-number-3">4.1</span> Hydrogen atom</h3>
<div id="outline-container-org04ef686" class="outline-3">
<h3 id="org04ef686"><span class="section-number-3">4.1</span> Hydrogen atom</h3>
<div class="outline-text-3" id="text-4-1">
</div>
<ol class="org-ol">
<li><a id="org9b45536"></a>Exercise<br />
<li><a id="orgd28ec31"></a>Exercise<br />
<div class="outline-text-5" id="text-4-1-0-1">
<div class="exercise">
<p>
@ -2221,8 +2221,8 @@ A = 0.78861366666666655 +/- 3.5096729498002445E-004
</div>
<div id="outline-container-orgf162a0f" class="outline-3">
<h3 id="orgf162a0f"><span class="section-number-3">4.2</span> Dihydrogen</h3>
<div id="outline-container-orgac9e630" class="outline-3">
<h3 id="orgac9e630"><span class="section-number-3">4.2</span> Dihydrogen</h3>
<div class="outline-text-3" id="text-4-2">
<p>
We will now consider the H<sub>2</sub> molecule in a minimal basis composed of the
@ -2244,7 +2244,7 @@ the nuclei.
</div>
<div id="postamble" class="status">
<p class="author">Author: Anthony Scemama, Claudia Filippi</p>
<p class="date">Created: 2021-01-13 Wed 17:16</p>
<p class="date">Created: 2021-01-13 Wed 17:19</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>