Computational Physics PHY480/905, Department of Physics and Astronomy, Michigan State University
Date: Spring semester 2017
The aim of this project is to solve Schroedinger's equation for two electrons in a three-dimensional harmonic oscillator well with and without a repulsive Coulomb interaction. Your task is to solve this equation by reformulating it in a discretized form as an eigenvalue equation to be solved with Jacobi's method. To achieve this you will have to write your own code which implements Jacobi's method.
Electrons confined in small areas in semiconductors, so-called quantum dots, form a hot research area in modern solid-state physics, with applications spanning from such diverse fields as quantum nano-medicine to the contruction of quantum gates. The article on quantum computing with quantum dots by Loss and DiVincenzo is an excellent read.
Here we will assume that these electrons move in a three-dimensional harmonic
oscillator potential (they are confined by for example quadrupole fields)
and repel each other via the static Coulomb interaction.
We assume spherical symmetry.
We are first interested in the solution of the radial part of Schroedinger's equation for one electron. This equation reads
In our case $V(r)$ is the harmonic oscillator potential $(1/2)kr^2$ with $k=m\omega^2$ and $E$ is the energy of the harmonic oscillator in three dimensions. The oscillator frequency is $\omega$ and the energies are
with $n=0,1,2,\dots$ and $l=0,1,2,\dots$.
Since we have made a transformation to spherical coordinates it means that
$r\in [0,\infty)$.
The quantum number
$l$ is the orbital momentum of the electron.
Then we substitute $R(r) = (1/r) u(r)$ and obtain
We will set in this project $l=0$. Inserting $V(\rho) = (1/2) k \alpha^2\rho^2$ we end up with
We multiply thereafter with $2m\alpha^2/\hbar^2$ on both sides and obtain
The constant $\alpha$ can now be fixed so that
or
Defining
we can rewrite Schroedinger's equation as
This is the first equation to solve numerically. In three dimensions the eigenvalues for $l=0$ are $\lambda_0=3,\lambda_1=7,\lambda_2=11,\dots .$
We use the by now standard expression for the second derivative of a function $u$
where $h$ is our step. Next we define minimum and maximum values for the variable $\rho$, $\rho_{\mathrm{min}}=0$ and $\rho_{\mathrm{max}}$, respectively. You need to check your results for the energies against different values $\rho_{\mathrm{max}}$, since we cannot set $\rho_{\mathrm{max}}=\infty$.
With a given number of mesh points, $N$, we define the step length $h$ as, with $\rho_{\mathrm{min}}=\rho_0$ and $\rho_{\mathrm{max}}=\rho_N$,
The value of $\rho$ at a point $i$ is then
We can rewrite the Schroedinger equation for a value $\rho_i$ as
or in a more compact way
where $V_i=\rho_i^2$ is the harmonic oscillator potential.
We define first the diagonal matrix element
and the non-diagonal matrix element
In this case the non-diagonal matrix elements are given by a mere constant. All non-diagonal matrix elements are equal. With these definitions the Schroedinger equation takes the following form
where $u_i$ is unknown. We can write the latter equation as a matrix eigenvalue problem
Since the values of $u$ at the two endpoints are known via the boundary conditions, we can skip the rows and columns that involve these values. Inserting the values for $d_i$ and $e_i$ we have the following matrix
We assume that the basis is orthogonal, that is
Show that an orthogonal or unitary transformation
preserves the dot product and orthogonality.
Your task now is to write a function which implements Jacobi's rotation algorithm (see Lecture notes chapter 7) in order to solve Eq. (eq:sematrix). We define the quantities $\tan\theta = t= s/c$, with $s=\sin\theta$ and $c=\cos\theta$ and
We can then define the angle $\theta$ so that the non-diagonal matrix elements of the transformed matrix $a_{kl}$ become non-zero and we obtain the quadratic equation (using $\cot 2\theta=1/2(\cot \theta-\tan\theta)$
resulting in
and $c$ and $s$ are easily obtained via
and $s=tc$.
Check how many mesh points $N$ you need in order to get the lowest three eigenvalues with approximately four leading digits after the decimal point. Remember to check the eigenvalues for the dependency on the choice of $\rho_{\mathrm{max}}=\rho_N$.
How many similarity transformations are needed before you reach a result where all non-diagonal matrix elements are essentially zero? Try to estimate the number of transformations and extract a behavior as function of the dimensionality of the matrix.
You can check your results against the Armadillo function for solving eigenvalue problems. The armadillo function eigsys can be used to find eigenvalues and eigenvectors. A Python program which solves this part of the project is available under the project writing slides.
Comment your results (here you could for example compute the time needed for both algorithms for a given dimensionality of the matrix).
In this project (and later ones as well) we will implement so-called unit tests. Our unit tests are mainly meant to test mathematical properties of our algorithm. During the development phase of a program it is useful to devise tests that your program should pass. One of these is to make sure that for a given simple test matrix (say a $5\times 5$ matrix) our algorithm for searching for the largest non-diagonal element always returns the correct answer. Furthermore, for a known simple matrix, irrespective of changes made, we should always get the same and correct eigenvalues. Another test is to make sure that the orthogonality shown in exercise (a) is preserved. Try to figure out other tests your code should pass, based either on the mathematical properties of the algorithms or more program specific tests. Implement at least two unit tests in this project.
We will now study two electrons in a harmonic oscillator well which also interact via a repulsive Coulomb interaction. Let us start with the single-electron equation written as
where $E^{(1)}$ stands for the energy with one electron only. For two electrons with no repulsive Coulomb interaction, we have the following Schroedinger equation
Note that we deal with a two-electron wave function $u(r_1,r_2)$ and two-electron energy $E^{(2)}$.
With no interaction this can be written out as the product of two single-electron wave functions, that is we have a solution on closed form.
We introduce the relative coordinate $\mathbf{r} = \mathbf{r}_1-\mathbf{r}_2$ and the center-of-mass coordinate $\mathbf{R} = 1/2(\mathbf{r}_1+\mathbf{r}_2)$. With these new coordinates, the radial Schroedinger equation reads
The equations for $r$ and $R$ can be separated via the ansatz for the wave function $u(r,R) = \psi(r)\phi(R)$ and the energy is given by the sum of the relative energy $E_r$ and the center-of-mass energy $E_R$, that is
We add then the repulsive Coulomb interaction between two electrons, namely a term
with $\beta e^2=1.44$ eVnm.
Adding this term, the $r$-dependent Schroedinger equation becomes
This equation is similar to the one we had previously in (b) and we introduce again a dimensionless variable $\rho = r/\alpha$. Repeating the same steps as above, we arrive at
We want to manipulate this equation further to make it as similar to that in (a) as possible. We define a new 'frequency'
and fix the constant $\alpha$ by requiring
or
Defining
we can rewrite Schroedinger's equation as
We treat $\omega_r$ as a parameter which reflects the strength of the oscillator potential.
Here we will study the cases $\omega_r = 0.01$, $\omega_r = 0.5$, $\omega_r =1$,
and $\omega_r = 5$
for the ground state only, that is the lowest-lying state.
With no repulsive Coulomb interaction
you should get a result which corresponds to
the relative energy of a non-interacting system.
Make sure your results are
stable as functions of $\rho_{\mathrm{max}}$ and the number of steps.
We are only interested in the ground state with $l=0$. We omit the center-of-mass energy.
You can reuse the code you wrote for part (b), but you need to change the potential from $\rho^2$ to $\omega_r^2\rho^2+1/\rho$.
Comment the results for the lowest state (ground state) as function of varying strengths of $\omega_r$.
For specific oscillator frequencies, the above equation has answers in an analytical form, see the article by M. Taut, Phys. Rev. A 48, 3561 (1993).
In this exercise we want to plot the wave function for two electrons as functions of the relative coordinate $r$ and different values of $\omega_r$. With no Coulomb interaction you should have a result which corresponds to the non-interacting case. Plot either the function itself or the probability distribution (the function squared) with and without the repulsion between the two electrons. Varying $\omega_r$, the shape of the wave function will change.
We are only interested in the wave function for the ground state with $l=0$ and omit again the center-of-mass motion.
The eigenvectors are normalized. Plot then the normalized wave functions for different values of $\omega_r$ and comment the results.
This exercise is optional and is meant more as a challenge for those of you with an interest in other algorithms for solving eigenvalue problems. Implement the iterative Lanczos' algorithm discussed in the lecture notes and compute the lowest eigenvalues as done in exercise (d) above. Compare your results and discuss faults and merits of the iterative method versus direct methods like Jacobi's method.
This exercise is also optional and is an algorithmic challenge. Your matrix is already tridiagonal. Can you devise a more efficient way to find the eigenvalues and eigenvectors instead of the brute force application of Jacobi's method?
Here follows a brief recipe and recommendation on how to write a report for each project.
Give a short description of the nature of the problem and the eventual numerical methods you have used.
Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself.
Include the source code of your program. Comment your program properly.
If possible, try to find analytic solutions, or known limits in order to test your program when developing the code.
Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes.
Try to evaluate the reliabilty and numerical stability/precision of your results. If possible, include a qualitative and/or quantitative discussion of the numerical stability, eventual loss of precision etc.
Try to give an interpretation of you results in your answers to the problems.
Critique: if possible include your comments and reflections about the exercise, whether you felt you learnt something, ideas for improvements and other thoughts you've made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it.
Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work, especially when you don't properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise, various algorithms you may have tested or other topics which you feel worthy of mentioning.
The preferred format for the report is a PDF file. You can also use DOC or postscript formats or as an ipython notebook file. As programming language we prefer that you choose between C/C++, Fortran2008 or Python. The following prescription should be followed when preparing the report:
Use your github repository to upload your report. Indicate where the report is by creating for example a Report folder. Please send us as soon as possible your github username.
Place your programs in a folder called for example Programs or src, in order to indicate where your programs are. You can use a README file to tell us how your github folders are organized.
In your git repository, please include a folder which contains selected results. These can be in the form of output from your code for a selected set of runs and input parameters.
In this and all later projects, you should include tests (for example unit tests) of your code(s).
Comments from us on your projects, with score and detailed feedback will be emailed to you.
Finally, we encourage you to work two and two together. Optimal working groups consist of 2-3 students. You can then hand in a common report.