Students implement a finite-difference approximation for the kinetic energy operator as a matrix, and then use numpy
to solve for eigenvalues and eigenstates, which they visualize.
This activity introduces finite difference approximations, follows Position operator.
We have already seens several representations of the state of a particle moving in one dimension. We looked at wave functions and representation in a set of sinusoidal basis functions. The sinusoidal basis set had the advantage that we could use a finite amount of information to describe a smooth function at least approximately.
There is another very effective finite representation for wave functions, which you've actually been using for weeks now (at least in effect), but we haven't talked about as a representation. That is the value of the function on a grid of regularly spaced points separated by a distance \(\Delta x\). \begin{align} |\psi\rangle &\,\dot= \begin{pmatrix} \psi(\Delta x) \\ \psi(2\Delta x) \\ \psi(3\Delta x) \\ \psi(4\Delta x) \\ \vdots \\ \psi(L-2\Delta x) \\ \psi(L-\Delta x) \end{pmatrix} \end{align} This “discretized wave function” representation is what you have already been using when you create a plot, and also for numerically integrating to find inner products.
Note: I am not including in this vector \(\psi(0)\) (or \(\psi(L)\) at the other end). This is because the boundary condition at the edge of the box requires that the wave function have a zero value at those two points. We could instead have chosen to include those two points, and then manually forced their values to be zero.
The kinetic energy of a particle in one dimension is given by \begin{align} \hat T &= \frac{\hat p^2}{2m} = -\frac{\hbar^2}{2m\Delta x^2}\frac{d^2}{dx^2} \end{align} Now this is a new beast for you, which we call a differential operator. Whenever you are confused by an operator, it helps to operate it on something. \begin{align} \hat T\psi(x) &= -\frac{\hbar^2}{2m}\left.\frac{d^2\psi}{dx^2}\right|_x \end{align} Our question for today is how we can represent this operator in our new “discretized wave function” representation. This requires us to think about what a derivative means, and I'll start with a first derivative: \begin{align} \left.\frac{d\psi}{dx}\right|_x &= \lim_{\Delta x\rightarrow 0}\frac{\psi(x+\Delta x/2) - \psi(x-\Delta x/2)}{\Delta x} \end{align} where I have used a centered difference, because it is symmetric. Now if \(\Delta x\) is reasonably small, we can just omit the limit, which is called a finite difference approximation. Now we want a second derivative, so we need to repeat this. \begin{align} \frac{d^2\psi}{dx^2}(x) &= \lim_{\Delta x\rightarrow 0}\frac{\left.\frac{d\psi}{dx}\right|_{x+\Delta x/2} - \left.\frac{d\psi}{dx}\right|_{x-\Delta x/2}}{\Delta x} \\ &\approx \frac{\left(\psi(x+\Delta x) - \psi(x)\right)-\left(\psi(x)-\psi(x-\Delta x)\right)}{\Delta x^2} \\ &= \frac{\psi(x+\Delta x) +\psi(x-\Delta x)- 2\psi(x)}{\Delta x^2} \end{align} So you can see that the second derivative at \(x\) is sort of a difference between the average of \(\psi\) at the surrounding points and the value of \(\psi(x)\). We can now plug this approximation into our definition for the kinetic energy operator to find: \begin{align} \hat T\psi(x) &\approx \frac{\hbar^2}{2m\Delta x^2}\left(2\psi(x)-\psi(x+\Delta x)-\psi(x-\Delta x)\right) \label{eq:finite-diff} \end{align} This equation is sufficient to express the kinetic energy operator as a matrix in terms of our discretized wave function representation. I will give you the result here, and ask you to prove it in a moment: \begin{align} \hat T &\,\dot= \frac{\hbar^2}{2m\Delta x^2} \begin{pmatrix} 2 & -1 & 0 & 0 & \cdots \\ -1 & 2 & -1 & 0 & \cdots \\ 0 & -1 & 2 & -1 & \cdots \\ 0 & 0 & -1 & 2 & \cdots \\ \vdots & \vdots & \vdots & \vdots & \ddots \end{pmatrix} \label{eq:T-matrix} \\ \begin{pmatrix} \hat T\psi(\Delta x) \\ \hat T\psi(2\Delta x) \\ \hat T\psi(3\Delta x) \\ \hat T\psi(4\Delta x) \\ \vdots \end{pmatrix} &= \frac{\hbar^2}{2m\Delta x^2} \begin{pmatrix} 2 & -1 & 0 & 0 & \cdots \\ -1 & 2 & -1 & 0 & \cdots \\ 0 & -1 & 2 & -1 & \cdots \\ 0 & 0 & -1 & 2 & \cdots \\ \vdots & \vdots & \vdots & \vdots & \ddots \end{pmatrix} \begin{pmatrix} \psi(\Delta x) \\ \psi(2\Delta x) \\ \psi(3\Delta x) \\ \psi(4\Delta x) \\ \vdots \end{pmatrix} \end{align}
Construct a matrix for a harmonic potential energy operator \begin{align} \hat V &= \frac12 k \hat x^2 \end{align} This will require you to make use of the fact that \begin{align} \hat x \left|{\psi}\right\rangle \dot=\, x\psi(x) \end{align} which means that \begin{align} \begin{pmatrix} (\Delta x)\psi(\Delta x) \\ (2\Delta x)\psi(2\Delta x) \\ (3\Delta x)\psi(3\Delta x) \\ (4\Delta x)\psi(4\Delta x) \\ \vdots \end{pmatrix} &= \begin{pmatrix} x_{11} & x_{12} & x_{13} & \cdots \\ x_{21} & x_{22} & x_{23} & \cdots \\ x_{31} & x_{32} & x_{33} & \cdots \\ \vdots & \vdots & \vdots & \ddots \end{pmatrix} \begin{pmatrix} \psi(\Delta x) \\ \psi(2\Delta x) \\ \psi(3\Delta x) \\ \psi(4\Delta x) \\ \vdots \end{pmatrix} \end{align} where \(x_{11}\) etc are unknowns that you must determine.
Once you have created a matrix representation for \(\hat x\) and \(\hat V\) in the discretized wavefunction representation, solve for the eigenvectors and eigenvalues of \(\hat V\) and visualize its eigenvectors.
Then on a separate figure plot the potential \(V(x)\) and visualize the eigenvalues as horizontal lines.
Construct a matrix for a Hamiltonian \begin{align} \hat H &= \hat T + \hat V \end{align} Solve for the eigenvectors and eigenvalues, and visualize a few of the lowest energy eigenvalues and eigenvectors.
In a separate figure plot the potential \(V(x)\) and visualize the energy eigenvalues as horizontal lines.
How are your results affected by changing the spring constant \(k\)?
keyboard Computational Activity
120 min.
quantum mechanics operator matrix element particle in a box eigenfunction
Students find matrix elements of the position operator \(\hat x\) in a sinusoidal basis. This allows them to express this operator as a matrix, which they can then numerically diagonalize and visualize the eigenfunctions.group Small Group Activity
30 min.
central forces quantum mechanics eigenstates eigenvalues quantum measurements angular momentum energy hermitian operators probability superposition representations notations degeneracy
Students calculate probabilities for a particle on a ring using three different notations: Dirac bra-ket, matrix, and wave function. After calculating the angular momentum and energy measurement probabilities, students compare their calculation methods for notation.group Small Group Activity
30 min.
group Small Group Activity
60 min.
Wavefunctions quantum states probability amplitude histograms matrix notation of quantum states Arms representation
Students review using the Arms representation to represent states for discrete quantum systems and connecting the Arms representation to histogram and matrix representation. The student then extend the Arms representation to begin exploring the continuous position basis.assignment Homework
The following are 3 different representations for the \(\textbf{same}\) state on a quantum ring for \(r_0=1\) \begin{equation} \left|{\Phi_a}\right\rangle = i\sqrt{\frac{ 2}{12}}\left|{3}\right\rangle - \sqrt{\frac{ 1}{12}}\left|{1}\right\rangle +\sqrt{\frac{ 3}{12}}e^{i\frac{\pi}{4}}\left|{0}\right\rangle -i\sqrt{\frac{ 2}{ 12}}\left|{-1}\right\rangle +\sqrt{\frac{ 4}{12}}\left|{-3}\right\rangle \end{equation} \begin{equation} \left| \Phi_b\right\rangle \doteq \left( \begin{matrix} \vdots \\ i\sqrt{\frac{ 2}{12}}\\ 0 \\ -\sqrt{\frac{ 1}{12}} \\ \sqrt{\frac{ 3}{12}}e^{i\frac{\pi}{4}} \\ -i\sqrt{\frac{ 2}{12}}\\ 0 \\ \sqrt{\frac{4}{12} }\\ \vdots \end{matrix}\right) \begin{matrix} \leftarrow m=0 \end{matrix} \end{equation} \begin{equation} \Phi_c(\phi) \doteq \sqrt{\frac{1}{24 \pi}} \left( i\sqrt{2}e^{i 3 \phi} -e^{i\phi} +\sqrt{3}e^{i\frac{\pi}{4}} -i \sqrt{2} e^{-i\phi} + \sqrt{4}e^{-i 3 \phi} \right) \end{equation}
If you measured the energy of the state to be \(\frac{9}{2}\frac{\hbar^2}{I}\), what would the state of the particle be immediately after the measurement is made?
group Small Group Activity
10 min.
keyboard Computational Activity
120 min.
inner product wave function quantum mechanics particle in a box
Students compute inner products to expand a wave function in a sinusoidal basis set. This activity introduces the inner product for wave functions, and the idea of approximating a wave function using a finite set of basis functions.assignment Homework
keyboard Computational Activity
120 min.
probability density particle in a box wave function quantum mechanics
Students compute probabilities and averages given a probability density in one dimension. This activity serves as a soft introduction to the particle in a box, introducing all the concepts that are needed.