Numerical Methods in Quantum Mechanics - Dipartimento di Fisica
Numerical Methods in Quantum Mechanics - Dipartimento di Fisica
Numerical Methods in Quantum Mechanics - Dipartimento di Fisica
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Possible code extensions:<br />
• Mo<strong>di</strong>fy the code <strong>in</strong> such a way that open boundary con<strong>di</strong>tions (that is: the<br />
system is a f<strong>in</strong>ite cha<strong>in</strong>) are used <strong>in</strong>stead of perio<strong>di</strong>c boundary con<strong>di</strong>tions.<br />
You may f<strong>in</strong>d the follow<strong>in</strong>g data useful to verify your results: E/N =<br />
−0.375 for N = 2, E/N = −1/3 for N = 3, E/N = −0.404 per N = 4,<br />
E/N → −0.44325 per N → ∞<br />
• Mo<strong>di</strong>fy the code <strong>in</strong> such a way that the entire Hamiltonian matrix is no<br />
longer stored. There are two possible ways to do this:<br />
– Calculate the Hψ product “on the fly”, without ever stor<strong>in</strong>g the<br />
matrix;<br />
– Store only nonzero matrix elements, plus an <strong>in</strong>dex keep<strong>in</strong>g track of<br />
their position.<br />
Of course, you cannot any longer use dspev to <strong>di</strong>agonalize the Hamiltonian.<br />
Note that <strong>di</strong>agonalization packages for sparse matrices, such as<br />
ARPACK, exist.<br />
84