diff --git a/index.html b/index.html index 41a0ad4..56f2990 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +[0/3]
Last things to do[0/3]
Last things to doThis website contains the QMC tutorial of the 2021 LTTC winter school @@ -513,8 +513,8 @@ coordinates, etc).
For a given system with Hamiltonian \(\hat{H}\) and wave function \(\Psi\), we define the local energy as @@ -578,7 +578,7 @@ where the probability density is given by the square of the wave function:
-\[ P(\mathbf{r}) = \frac{|Psi(\mathbf{r}|^2)}{\int \left |\Psi(\mathbf{r})|^2 d\mathbf{r}}\,. \] +\[ P(\mathbf{r}) = \frac{|Psi(\mathbf{r}|^2)}{\int |\Psi(\mathbf{r})|^2 d\mathbf{r}}\,. \]
@@ -592,8 +592,8 @@ If we can sample \(N_{\rm MC}\) configurations \(\{\mathbf{r}\}\) distributed as
In this section, we consider the hydrogen atom with the following @@ -622,8 +622,8 @@ To do that, we will compute the local energy and check whether it is constant.
You will now program all quantities needed to compute the local energy of the H atom for the given wave function. @@ -650,8 +650,8 @@ to catch the error.
@@ -695,8 +695,8 @@ and returns the potential.
Python @@ -736,8 +736,8 @@ and returns the potential.
@@ -772,8 +772,8 @@ input arguments, and returns a scalar.
Python @@ -800,8 +800,8 @@ input arguments, and returns a scalar.
@@ -882,8 +882,8 @@ Therefore, the local kinetic energy is
Python @@ -924,8 +924,8 @@ Therefore, the local kinetic energy is
@@ -968,8 +968,8 @@ local kinetic energy.
Python @@ -999,8 +999,8 @@ local kinetic energy.
@@ -1010,8 +1010,8 @@ Find the theoretical value of \(a\) for which \(\Psi\) is an eigenfunction of \(
@@ -1043,8 +1043,8 @@ choose a grid which does not contain the origin.
@@ -1127,8 +1127,8 @@ plot './data' index 0 using 1:2 with lines title 'a=0.1', \
Python @@ -1203,8 +1203,8 @@ plt.savefig("plot_py.png")
If the space is discretized in small volume elements \(\mathbf{r}_i\) @@ -1234,8 +1234,8 @@ The energy is biased because:
@@ -1304,8 +1304,8 @@ To compile the Fortran and run it:
Python @@ -1420,8 +1420,8 @@ a = 2.0000000000000000 E = -8.0869806678448772E-002
The variance of the local energy is a functional of \(\Psi\) @@ -1448,20 +1448,20 @@ energy can be used as a measure of the quality of a wave function.
Prove that : -\[\left( \langle E - \langle E \rangle_{\Psi^2} \rangle_{\Psi^2} \right)^2 = \langle E^2 \rangle_{\Psi^2} - \langle E \rangle_{\Psi^2}^2 \] +\[\langle \left( E - \langle E \rangle_{\Psi^2} \right)^2\rangle_{\Psi^2} = \langle E^2 \rangle_{\Psi^2} - \langle E \rangle_{\Psi^2}^2 \]
\(\bar{E} = \langle E \rangle\) is a constant, so \(\langle \bar{E} @@ -1469,7 +1469,7 @@ Prove that :
\begin{eqnarray*} -\langle E - \bar{E} \rangle^2 & = & +\langle (E - \bar{E})^2 \rangle & = & \langle E^2 - 2 E \bar{E} + \bar{E}^2 \rangle \\ &=& \langle E^2 \rangle - 2 \langle E \bar{E} \rangle + \langle \bar{E}^2 \rangle \\ &=& \langle E^2 \rangle - 2 \langle E \rangle \bar{E} + \bar{E}^2 \\ @@ -1480,8 +1480,8 @@ Prove that :@@ -1555,8 +1555,8 @@ To compile and run:
Python @@ -1693,8 +1693,8 @@ a = 2.0000000000000000 E = -8.0869806678448772E-002 s2 = 1.8068814
Numerical integration with deterministic methods is very efficient @@ -1710,8 +1710,8 @@ interval.
To compute the statistical error, you need to perform \(M\) @@ -1726,7 +1726,7 @@ The estimate of the energy is
\[ - E = \frac{1}{M} \sum_{i=1}^M E_M + E = \frac{1}{M} \sum_{i=1}^M E_i \]
@@ -1736,7 +1736,7 @@ The variance of the average energies can be computed as\[ - \sigma^2 = \frac{1}{M-1} \sum_{i=1}^{M} (E_M - E)^2 + \sigma^2 = \frac{1}{M-1} \sum_{i=1}^{M} (E_i - E)^2 \]
@@ -1751,8 +1751,8 @@ And the confidence interval is given by@@ -1790,8 +1790,8 @@ input array.
Python @@ -1850,8 +1850,8 @@ input array.
We will now perform our first Monte Carlo calculation to compute the @@ -1912,8 +1912,8 @@ compute the statistical error.
@@ -2013,8 +2013,8 @@ well as the index of the current step.
Python @@ -2128,14 +2128,14 @@ E = -0.49518773675598715 +/- 5.2391494923686175E-004
We will now use the square of the wave function to sample random points distributed with the probability density \[ - P(\mathbf{r}) = \frac{|Psi(\mathbf{r})|^2)}{\int |\Psi(\mathbf{r})|^2 d\mathbf{r}}\,. + P(\mathbf{r}) = \frac{|\Psi(\mathbf{r})|^2}{\int |\Psi(\mathbf{r})|^2 d\mathbf{r}}\,. \]
@@ -2195,7 +2195,7 @@ probability\[ - A(\mathbf{r}_{n}\rightarrow\mathbf{r}_{n+1}) = \min\left(1,\frac{T(\mathbf{r}_{n},\mathbf{r}_{n+1}) P(\mathbf{r}_{n+1})}{T(\mathbf{r}_{n+1},\mathbf{r}_n)P(\mathbf{r}_{n})}\right)\,, + A(\mathbf{r}_{n}\rightarrow\mathbf{r}_{n+1}) = \min\left(1,\frac{T(\mathbf{r}_{n+1}\rightarrow\mathbf{r}_{n}) P(\mathbf{r}_{n+1})}{T(\mathbf{r}_{n}\rightarrow\mathbf{r}_{n+1})P(\mathbf{r}_{n})}\right)\,, \]
@@ -2268,8 +2268,8 @@ the same variable later on to store a time step.@@ -2376,8 +2376,8 @@ Can you observe a reduction in the statistical error?
Python @@ -2522,8 +2522,8 @@ A = 0.51695266666666673 +/- 4.0445505648997396E-004
To obtain Gaussian-distributed random numbers, you can apply the
@@ -2586,8 +2586,8 @@ In Python, you can use the
-
One can use more efficient numerical schemes to move the electrons by choosing a smarter expression for the transition probability.
@@ -2719,8 +2719,8 @@ Evaluate \(\Psi\) and \(\frac{\nabla \Psi(\mathbf{r})}{\Psi(\mathbf{r})}\) at th
@@ -2754,8 +2754,8 @@ Write a function to compute the drift vector \(\frac{\nabla \Psi(\mathbf{r})}{\P
Python
@@ -2788,8 +2788,8 @@ Write a function to compute the drift vector \(\frac{\nabla \Psi(\mathbf{r})}{\P
@@ -2883,8 +2883,8 @@ Modify the previous program to introduce the drift-diffusion scheme.
Python
@@ -3070,12 +3070,12 @@ A = 0.78839866666666658 +/- 3.2503783452043152E-004
Consider the time-dependent Schrödinger equation:
@@ -3083,12 +3083,12 @@ Consider the time-dependent Schrödinger equation:
\[
- i\frac{\partial \Psi(\mathbf{r},t)}{\partial t} = (\hat{H} -E_T) \Psi(\mathbf{r},t)\,.
+ i\frac{\partial \Psi(\mathbf{r},t)}{\partial t} = (\hat{H} -E_{\rm ref}) \Psi(\mathbf{r},t)\,.
\]
-where we introduced a shift in the energy, \(E_T\), which will come useful below.
+where we introduced a shift in the energy, \(E_{\rm ref}\), which will come useful below.
@@ -3108,7 +3108,7 @@ The solution of the Schrödinger equation at time \(t\) is
\[
- \Psi(\mathbf{r},t) = \sum_k a_k \exp \left( -i\, (E_k-E_T)\, t \right) \Phi_k(\mathbf{r}).
+ \Psi(\mathbf{r},t) = \sum_k a_k \exp \left( -i\, (E_k-E_{\rm ref})\, t \right) \Phi_k(\mathbf{r}).
\]
\[
- -\frac{\partial \psi(\mathbf{r}, \tau)}{\partial \tau} = (\hat{H} -E_T) \psi(\mathbf{r}, \tau)
+ -\frac{\partial \psi(\mathbf{r}, \tau)}{\partial \tau} = (\hat{H} -E_{\rm ref}) \psi(\mathbf{r}, \tau)
\]
-where \(\psi(\mathbf{r},\tau) = \Psi(\mathbf{r},-i\,)\)
+where \(\psi(\mathbf{r},\tau) = \Psi(\mathbf{r},-i\,t)\)
and
For large positive values of \(\tau\), \(\psi\) is dominated by the
-\(k=0\) term, namely, the lowest eigenstate. If we adjust \(E_T\) to the running estimate of \(E_0\),
+\(k=0\) term, namely, the lowest eigenstate. If we adjust \(E_{\rm ref}\) to the running estimate of \(E_0\),
we can expect that simulating the differetial equation in
imaginary time will converge to the exact ground state of the
system.
@@ -3143,8 +3143,8 @@ system.
The imaginary-time Schrödinger equation can be explicitly written in terms of the kinetic and
@@ -3153,7 +3153,7 @@ potential energies as
\[
- \frac{\partial \psi(\mathbf{r}, \tau)}{\partial \tau} = \left(\frac{1}{2}\Delta - [V(\mathbf{r}) -E_T]\right) \psi(\mathbf{r}, \tau)\,.
+ \frac{\partial \psi(\mathbf{r}, \tau)}{\partial \tau} = \left(\frac{1}{2}\Delta - [V(\mathbf{r}) -E_{\rm ref}]\right) \psi(\mathbf{r}, \tau)\,.
\]
In a molecular system, the potential is far from being constant
@@ -3271,7 +3271,7 @@ Defining \(\Pi(\mathbf{r},\tau) = \psi(\mathbf{r},\tau) \Psi_T(\mathbf{r})\), (s
-\frac{\partial \Pi(\mathbf{r},\tau)}{\partial \tau}
= -\frac{1}{2} \Delta \Pi(\mathbf{r},\tau) +
\nabla \left[ \Pi(\mathbf{r},\tau) \frac{\nabla \Psi_T(\mathbf{r})}{\Psi_T(\mathbf{r})}
- \right] + (E_L(\mathbf{r})-E_T)\Pi(\mathbf{r},\tau)
+ \right] + (E_L(\mathbf{r})-E_{\rm ref})\Pi(\mathbf{r},\tau)
\]
-Since, for large \(\tau\), we have that
+For large \(\tau\), we have that
@@ -3316,7 +3316,7 @@ Since, for large \(\tau\), we have that
-and, using that \(\hat{H}\) is Hermitian and that \(\Phi_0\) is an eigenstate of the Hamiltonian, we obtain
+and, using that \(\hat{H}\) is Hermitian and that \(\Phi_0\) is an eigenstate of the Hamiltonian, we obtain for large \(\tau\)
@@ -3325,8 +3325,8 @@ and, using that \(\hat{H}\) is Hermitian and that \(\Phi_0\) is an eigenstate of
{\langle \psi_\tau | \Psi_T \rangle}
= \frac{\langle \Psi_T | \hat{H} | \psi_\tau \rangle}
{\langle \Psi_T | \psi_\tau \rangle}
- \rightarrow E_0 \frac{\langle \Psi_T | \psi_\tau \rangle}
- {\langle \Psi_T | \psi_\tau \rangle}
+ \rightarrow E_0 \frac{\langle \Psi_T | \Phi_0 \rangle}
+ {\langle \Psi_T | \Phi_0 \rangle}
= E_0
\]
\[
@@ -3400,13 +3400,13 @@ Defining \(\Pi(\mathbf{r},t) = \psi(\mathbf{r},\tau)
Instead of having a variable number of particles to simulate the
branching process, one can consider the term
-\(\exp \left( -\delta t\,( E_L(\mathbf{r}) - E_T} \right)\) as a
+\(\exp \left( -\delta t\,( E_L(\mathbf{r}) - E_{\rm ref}) \right)\) as a
cumulative product of weights:
@@ -3604,8 +3604,8 @@ energy of H for any value of \(a\).
Python
@@ -3821,8 +3821,8 @@ A = 0.98788066666666663 +/- 7.2889356133441110E-005
We will now consider the H2 molecule in a minimal basis composed of the
@@ -3843,8 +3843,8 @@ the nuclei.
3.5 Generalized Metropolis algorithm
+3.5 Generalized Metropolis algorithm
3.5.1 Exercise 1
+3.5.1 Exercise 1
3.5.1.1 Solution solution
+3.5.1.1 Solution solution
3.5.2 Exercise 2
+3.5.2 Exercise 2
3.5.2.1 Solution solution
+3.5.2.1 Solution solution
4 Diffusion Monte Carlo solution
+4 Diffusion Monte Carlo solution
4.1 Schrödinger equation in imaginary time
+4.1 Schrödinger equation in imaginary time
4.2 Diffusion and branching
+4.2 Diffusion and branching
4.3 Importance sampling
+4.3 Importance sampling
4.3.1 Appendix : Details of the Derivation
+4.3.1 Appendix : Details of the Derivation
4.4 Pure Diffusion Monte Carlo (PDMC)
+4.4 Pure Diffusion Monte Carlo (PDMC)
4.5 Hydrogen atom
+4.5 Hydrogen atom
4.5.1 Exercise
+4.5.1 Exercise
4.5.1.1 Solution solution
+4.5.1.1 Solution solution
4.6 TODO H2
+4.6 TODO H2
5 TODO
+[0/3]
Last things to do5 TODO
[0/3]
Last things to do
[ ]
Give some hints of how much time is required for each section