<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Quantum Mechanics in 1D | Bose Research Group</title><link>https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/</link><atom:link href="https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/index.xml" rel="self" type="application/rss+xml"/><description>Quantum Mechanics in 1D</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Tue, 25 Feb 2025 00:00:00 +0000</lastBuildDate><image><url>https://bose-research-group.github.io/media/icon_hu_9bd251d90a98e6b2.png</url><title>Quantum Mechanics in 1D</title><link>https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/</link></image><item><title>Time-Independent Quantum Mechanics</title><link>https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/time-independent/tise/</link><pubDate>Tue, 25 Feb 2025 00:00:00 +0000</pubDate><guid>https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/time-independent/tise/</guid><description>&lt;p>The goal is to model any 1D Hamiltonian,
$$\hat{H} = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2} + V(\hat{x})$$
and find its eigenstates and eigenenergies,
$$\hat{H}|\psi_n\rangle = \epsilon_n|\psi_n\rangle.$$
To do this, one needs to be able to represent the Hamiltonian operator as a
matrix for a given computational basis, $|\phi_n\rangle$. We assume that the
computational basis forms an orthonormal set. We start by inserting a resolution
of identity in the eigenstate equation in terms of the computational basis&lt;/p>
&lt;p>
$$\sum_k \hat{H}|\phi_k\rangle\langle\phi_k|\psi_n\rangle = \epsilon_n\sum_k|\phi_k\rangle\langle\phi_k|\psi_n\rangle$$
Taking an overlap of the equation with with $|\phi_j\rangle$
$$\sum_k \langle\phi_j|\hat{H}|\phi_k\rangle\langle\phi_k|\psi_n\rangle = \epsilon_n\langle\phi_j|\psi_n\rangle$$
This gives rise to the matrix eigenvalue equation in the $|\phi_n\rangle$ basis.&lt;/p>
&lt;p>A variety of basis can be chosen. The more physically relevant the basis, the
more efficient the computations. However as long as the basis can be
systematically increased, one should be able to find the correct eigenstates.
This procedure is called &amp;ldquo;convergence.&amp;rdquo;&lt;/p>
&lt;h2 id="basis-of-position-eigenstates">Basis of Position Eigenstates&lt;/h2>
&lt;p>As our first example, we choose to work in the position eigenbasis. Of course,
the position eigenbasis forms an infinite dimensional vector space, which cannot
be handled in a simple manner on the computer. We truncate the space by
considering a subset of the real axis &amp;mdash; the domain considered is
$\mathbb{D} = [L_\text{min}, L_\text{max}] \subset\mathbb{R}$. However, that is
not enough by itself because any domain, closed or open, would still be an
infinite set.&lt;/p>
&lt;p>So, we consider a finite set defined by a lower limit, $L_\text{min}$, an upper
limit, $L_\text{max}$, and a grid spacing $\Delta x$. An arbitrary element of
the computational basis is therefore $x_j = L_\text{min} + (j-1)\Delta
x$, such that $\hat{x}|\phi_j\rangle = x_j|\phi_j\rangle$.&lt;/p>
&lt;p>Next, we need to derive the matrix elements of the Hamiltonian.
$$\langle\phi_j|\hat{H}|\phi_k\rangle = -\frac{\hbar^2}{2m}\left\langle\phi_j\left|\frac{\partial^2}{\partial x^2}\right|\phi_k\right\rangle + \langle\phi_j|V(\hat{x})|\phi_k\rangle$$
$$= -\frac{\hbar^2}{2m}\left\langle\phi_j\left|\frac{\partial^2}{\partial x^2}\right|\phi_k\right\rangle + V(x_k)\delta_{j,k}$$
Instead of directly calculating the matrix element of the second derivative
operator, we start by exploring the action of the Hamiltonian matrix on an
arbitrary wave function written in the position basis.
$$H|\psi\rangle = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2}|\psi\rangle + \hat{V}|\psi\rangle$$
So, we need to find how to write the second derivative of the wave function
$|\psi\rangle$ as a function of the its values on the grid. Expanding the
function in its Taylor series, we can show that
$$\left.\frac{\partial^2}{\partial x^2}\psi(x)\right|_{x=x_n} (\Delta x)^2 = \psi(x_{n+1}) -2\psi(x_n) + \psi(x_{n-1})$$
$$-\frac{\hbar^2}{2m}\left.\frac{\partial^2}{\partial x^2}\psi(x)\right|_{x=x_n} = -\frac{\hbar^2}{2m(\Delta x)^2}\left(\psi(x_{n+1}) -2\psi(x_n) + \psi(x_{n-1})\right)$$
for $\Delta x\to 0$.&lt;/p>
&lt;p>Now, we can put everything together. The matrix element of the Hamiltonian turns out to be:
$$\langle\phi_j|\hat{H}|\phi_k\rangle = -\frac{\hbar^2}{2m(\Delta x)^2}\left(\delta_{j,k+1}-2\delta_{j,k}+\delta_{j,k-1}\right) + V(x_k)\delta_{j,k}$$
&lt;/p>
&lt;p>Below is the code which defines the tridiagonal Hamiltonian for a given
potential on a position eigenstate basis given by the variable &lt;code>xgrid&lt;/code> in Julia:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-julia" data-lang="julia">&lt;span class="line">&lt;span class="cl">&lt;span class="k">function&lt;/span> &lt;span class="n">get_Hamiltonian_matrix_position_space&lt;/span>&lt;span class="p">(;&lt;/span> &lt;span class="n">V&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">xgrid&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="kt">AbstractVector&lt;/span>&lt;span class="p">{&lt;/span>&lt;span class="kt">Float64&lt;/span>&lt;span class="p">},&lt;/span> &lt;span class="n">hbar&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="kt">Float64&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="mf">1.0&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">m&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="kt">Float64&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="mf">1.0&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">dx&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">xgrid&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="o">-&lt;/span> &lt;span class="n">xgrid&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="mi">1&lt;/span>&lt;span class="p">]&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">Npoints&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">length&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">xgrid&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">H&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">zeros&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">Npoints&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">Npoints&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">for&lt;/span> &lt;span class="n">r&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="o">:&lt;/span>&lt;span class="n">Npoints&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">c&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mi">1&lt;/span>&lt;span class="o">:&lt;/span>&lt;span class="n">Npoints&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">if&lt;/span> &lt;span class="n">r&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="n">c&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">H&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="n">r&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">c&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">hbar&lt;/span>&lt;span class="o">^&lt;/span>&lt;span class="mi">2&lt;/span> &lt;span class="o">/&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="n">m&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">dx&lt;/span>&lt;span class="o">^&lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="o">+&lt;/span> &lt;span class="n">V&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">xgrid&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="n">r&lt;/span>&lt;span class="p">])&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">elseif&lt;/span> &lt;span class="n">r&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="n">c&lt;/span>&lt;span class="o">-&lt;/span>&lt;span class="mi">1&lt;/span> &lt;span class="o">||&lt;/span> &lt;span class="n">r&lt;/span> &lt;span class="o">==&lt;/span> &lt;span class="n">c&lt;/span>&lt;span class="o">+&lt;/span>&lt;span class="mi">1&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">H&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="n">r&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">c&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="o">-&lt;/span>&lt;span class="n">hbar&lt;/span>&lt;span class="o">^&lt;/span>&lt;span class="mi">2&lt;/span> &lt;span class="o">/&lt;/span> &lt;span class="p">(&lt;/span>&lt;span class="mi">2&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">m&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">dx&lt;/span>&lt;span class="o">^&lt;/span>&lt;span class="mi">2&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">end&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">H&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="k">end&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
The Hamiltonian matrix obtained from this code can now be diagonalized to get the
energies and the eigenstates.&lt;/p>
&lt;h3 id="harmonic-oscillator-eigenstates">Harmonic Oscillator Eigenstates&lt;/h3>
&lt;p>Let us test the code by using a harmonic oscillator as an example. Consider the
following potential:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-julia" data-lang="julia">&lt;span class="line">&lt;span class="cl">&lt;span class="n">V&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">x&lt;/span>&lt;span class="o">::&lt;/span>&lt;span class="kt">Float64&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="mf">0.5&lt;/span> &lt;span class="o">*&lt;/span> &lt;span class="n">x&lt;/span>&lt;span class="o">^&lt;/span>&lt;span class="mi">2&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/p>
&lt;p>To use the potential, first we need to decide on the grid. This will of course
be converged. Because this potential is symmetric, we will choose a symmetric
grid with $L_\text{min}=-L_\text{max}$.&lt;/p>
&lt;p>Let us take the following grid:
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-julia" data-lang="julia">&lt;span class="line">&lt;span class="cl">&lt;span class="n">x&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="o">-&lt;/span>&lt;span class="mf">0.5&lt;/span>&lt;span class="o">:&lt;/span>&lt;span class="mf">0.1&lt;/span>&lt;span class="o">:&lt;/span>&lt;span class="mf">0.5&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
Then we diagonalize the matrix as follows
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-julia" data-lang="julia">&lt;span class="line">&lt;span class="cl">&lt;span class="k">using&lt;/span> &lt;span class="n">LinearAlgebra&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">H&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">get_Hamiltonian_matrix_position_space&lt;/span>&lt;span class="p">(;&lt;/span> &lt;span class="n">V&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">xgrid&lt;/span>&lt;span class="o">=&lt;/span>&lt;span class="n">x&lt;/span>&lt;span class="p">)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">vals&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">vecs&lt;/span> &lt;span class="o">=&lt;/span> &lt;span class="n">eigen&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">H&lt;/span>&lt;span class="p">)&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/p>
&lt;p>Take a look at the values that you get. Do they match what you know from basic
quantum mechanics?&lt;/p>
&lt;p>Probably not! On running the code, the lowest eigenvalue that I got is 3.43. Where are we going wrong then?&lt;/p>
&lt;p>Notice that the Hamiltonian matrix elements that we derived in the previous
section requires $\Delta x\to 0$. This constraint is not satisfied here. However, what
does &amp;ldquo;tending to 0&amp;rdquo; mean in a computational setting? To understand this, let us
plot the energy of the lowest eigenstate as a function of $\Delta x$ keeping the
$L_\text{min}$ and $L_\text{max}$ fixed. We are just trying to make the
second derivative Taylor expansion correct. Notice that, in &lt;a href="#dx-convergence">the convergence with $\Delta x$ figure&lt;/a>, as $\Delta x$ decreases
the value of $E_0$ seems to be hitting a constant value. This is the converged
value with respect to $\Delta x$.&lt;/p>
&lt;figure class="ma0 w-75" id="figure-dx-convergence">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Convergence of grid spacing" srcset="
/media/computational-sciences/basic-qm/time-independent/dx_convergence_hu_727335c6db67e64f.webp 400w,
/media/computational-sciences/basic-qm/time-independent/dx_convergence_hu_5367ce4ecedbbad2.webp 760w,
/media/computational-sciences/basic-qm/time-independent/dx_convergence_hu_9b1ca2bd4e6e706c.webp 1200w"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-independent/dx_convergence_hu_727335c6db67e64f.webp"
width="760"
height="550"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Convergence of grid spacing
&lt;/figcaption>&lt;/figure>
&lt;p>If we stopped at this level, does this value match the analytical value for the
harmonic oscillator? The zero-point energy should actually be 0.5, whereas the
value we are getting by diagonalizing is close to 5.0. That terribly incorrect.&lt;/p>
&lt;p>The next step would be to check for convergence with respect to the box size,
$L_\text{max}$. Since the Taylor series error seems to be relatively well
converged with $\Delta x=0.001$, that the value of $L_\text{max}$ is kept
unchanged. The plot of the energies of the first five eigenstates is shown in
&lt;a href="#Lmax-convergence">$L_\text{max}$ convergence figure&lt;/a>. Notice how the energies
of the first 5 eigenstates converge to the correct values around $L_\text{max} =
5.0$. This is convergence with respect to the box size.&lt;/p>
&lt;figure class="ma0 w-75" id="figure-lmax-convergence">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Convergence of box size" srcset="
/media/computational-sciences/basic-qm/time-independent/Lmax_convergence_hu_75e826eae3a03ab1.webp 400w,
/media/computational-sciences/basic-qm/time-independent/Lmax_convergence_hu_98396b739b2b187a.webp 760w,
/media/computational-sciences/basic-qm/time-independent/Lmax_convergence_hu_1fb254d2983fef08.webp 1200w"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-independent/Lmax_convergence_hu_75e826eae3a03ab1.webp"
width="760"
height="548"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Convergence of box size
&lt;/figcaption>&lt;/figure>
&lt;blockquote>
&lt;p>Write the programs to obtain the $\Delta x$ and the $L_\text{max}$ convergence curves.&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>Converge the harmonic oscillator energies corresponding to the ground state and the 10th excited state. What are the box-sizes required for the two cases? Are they the same or different and why?&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>Can you use the same technique to converge the eigenstates of a Morse oscillator?&lt;/p>&lt;/blockquote>
&lt;h2 id="basis-of-momentum-eigenstates">Basis of Momentum Eigenstates&lt;/h2></description></item><item><title>Time-Dependent Quantum Mechanics</title><link>https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/time-dependent/tdse/</link><pubDate>Sun, 30 Mar 2025 00:00:00 +0000</pubDate><guid>https://bose-research-group.github.io/courses/computational-sciences-hands-on/02-basic-qm/time-dependent/tdse/</guid><description>&lt;p>How do we simulate the dynamics of a quantum system? Suppose we know that the initial state of the system is given by a particular wave function $|\psi(0)\rangle$ and the system is described by a Hamiltonian,
$$\hat{H} = -\frac{\hbar^2}{2m}\frac{\partial^2}{\partial x^2} + V(x),$$
then the time-evolution of the wave function satisfies the Time-Dependent Schrödinger equation,
$$i\hbar\frac{\partial}{\partial t}|\psi(t)\rangle = \hat{H}|\psi(t)\rangle.$$
&lt;/p>
&lt;p>The initial wave packet is given in position space as $\psi(x, 0)$ and we want
to propagate it out to obtain $\psi(x, t)$. The direct way of solving this problem is to solve for the short-time propagator defined as
$$\hat{U} = \exp\left(-\frac{i \hat{H} \Delta t}{\hbar}\right).$$
If this can be represented in position space, then we can propagate the wave function as follows:
$$\psi(x, t+\Delta t) = \hat{U}\psi(x, t)$$
&lt;/p>
&lt;p>In the previous chapter, we have defined a function which creates the Hamiltonian in position space. We can easily exponentiate this to obtain the propagator in Julia, and use that to propagate for all times as shown below:
&lt;/p>
&lt;p>Now, this works well, but the computational cost can become prohibitively high.
First notice that the Hamiltonian matrix needs to be converged with respect to
$L_\text{min}$, $L_\text{max}$ and $\Delta x$; one needs to use very small
$\Delta x$ values to reduce the error of truncating the Taylor series for the
kinetic energy part. Additionally the range has to be big enough to account for
the full dynamics. Finally, the propagator is the exponential of the Hamiltonian
matrix, which scales as $N^3$ where $N$ is the cardinality of the basis set. Can
we do better than this?&lt;/p>
&lt;h2 id="split-operator-method-or-the-feit-and-fleck-method">Split-Operator Method or the Feit and Fleck Method&lt;/h2>
&lt;p>The propagator is the exponential of the Hamiltonian
$$U(t) = \exp\left(-i \hat{H} t/\hbar\right)$$
$$=\exp\left(-i (\hat{T} + \hat{V}) t/\hbar\right)$$
&lt;/p>
&lt;p>The issue with directly exponentiating this operator is the computational cost.
Let us see if we can simplify this expression some more. The
&lt;a href="https://en.wikipedia.org/wiki/Baker%e2%80%93Campbell%e2%80%93Hausdorff_formula" target="_blank" rel="noopener">Baker-Campbell-Hausdorff
formula&lt;/a>
indicates that for any pair of operators $\hat{X}$ and $\hat{Y}$,
$$\exp\left(\hat{X}\right)\exp\left(\hat{Y}\right) = \exp\left(\hat{Z}\right)$$
$$\text{where } \hat{Z} = \hat{X} + \hat{Y} + \frac{1}{2}[\hat{X}, \hat{Y}] + \frac{1}{12}[\hat{X}, [\hat{X}, \hat{Y}]] + \ldots$$
&lt;/p>
&lt;p>Consider the following expression:
$$\exp\left(-i\hat{T}t/\hbar\right)\exp\left(-i\hat{V}t/\hbar\right) = \exp\left(-\frac{i}{\hbar}\left(\hat{H}t + \frac{1}{2}[\hat{T}, \hat{V}]t^2 + \ldots\right)\right)$$
Notice that as $t\to 0$, the right-hand side just becomes the propagator.
Therefore for small $t$, the propagator can be approximated as:
$$U(\Delta t) \approx \exp\left(-i \hat{T} \Delta t/\hbar\right)\exp\left(-i\hat{V}\Delta t/\hbar\right)$$
$$\approx \exp\left(-\frac{i \hat{V} \Delta t}{2\hbar}\right)\exp\left(-\frac{i \hat{T} \Delta t}{\hbar}\right)\exp\left(-\frac{i\hat{V}\Delta t}{2\hbar}\right)$$
Splitting the propagator in this manner is variously called the Suzuki-Trotter
or Trotter or the Lie-Trotter decomposition. The second expression is more
accurate than the first one. We will continue the discussion with the
higher-order Trotter expression.&lt;/p>
&lt;p>The short-time propagator needs to be applied to an initial wave function in
position space. This amounts to the sequential application of individual pieces.
First $\exp\left(-\frac{i\hat{V}\Delta t}{2\hbar}\right)$ needs to be applied to
the wave function:
$$|\psi_V\rangle = \exp\left(-\frac{i\hat{V}\Delta t}{2\hbar}\right)|\psi(t)\rangle = \int dx \exp\left(-\frac{i\hat{V}\Delta t}{2\hbar}\right)|x\rangle\langle x|\psi(t)\rangle$$
$$ = \int dx |x\rangle \underbrace{\exp\left(-\frac{iV(x)\Delta t}{2\hbar}\right)\langle x|\psi(t)\rangle}_{\psi_V(x)}$$
Next the kinetic energy portion is applied:
$$\exp\left(-\frac{i\hat{T}\Delta t}{\hbar}\right)|\psi_V\rangle = \int dx_0 \exp\left(-\frac{i\hat{T}\Delta t}{\hbar}\right)|x_0\rangle \psi_V(x_0)$$
$\ket{x_0}$ is not an eigenstate of the $\hat{T}$ operator. However a momentum eigenstate, $\ket{p}$ is an eigenstate. So, we insert a resolution of identity in terms of $\ket{p}\bra{p}$ to simplify:
$$\exp\left(-\frac{i\hat{T}\Delta t}{\hbar}\right)|\psi_V\rangle = \int dp\int dx_0 \exp\left(-\frac{i\hat{T}\Delta t}{\hbar}\right)\ket{p}\langle p|x_0\rangle \psi_V(x_0)$$
$$ = \frac{1}{\sqrt{2\pi\hbar}}\int dp\int dx_0 \ket{p} \exp\left(-\frac{ip^2\Delta t}{2m\hbar}\right) \exp\left(-\frac{i p x_0}{\hbar}\right) \psi_V(x_0)$$
Now, define
$$\tilde{\psi}_V(p) = \frac{1}{\sqrt{2\pi\hbar}}\int dx \exp\left(-\frac{i p x}{\hbar}\right) \exp\left(-\frac{i V(x)\Delta t}{2\hbar}\right)\langle x|\psi\rangle$$
$$\therefore\ket{\psi_{TV}} = \exp\left(-\frac{i\hat{T}\Delta t}{\hbar}\right)|\psi_V\rangle = \int dp \ket{p} \underbrace{\exp\left(-\frac{ip^2\Delta t}{2m\hbar}\right) \tilde{\psi}_V(p)}_{\tilde{\psi}_{TV}(p)}$$
&lt;/p>
&lt;p>Finally, the last piece of the propagator in terms of the potential operator needs to be applied:
$$\exp\left(-\frac{i\hat{V}\Delta t}{2\hbar}\right)\ket{\psi_{TV}} = \int dp\exp\left(-\frac{i\hat{V}\Delta t}{2\hbar}\right)\ket{p} \tilde{\psi}_{TV}(p)$$
$$= \int dx \ket{x} \int dp\exp\left(-\frac{iV(x)\Delta t}{2\hbar}\right)\langle x|p\rangle \tilde{\psi}_{TV}(p)$$
$$= \frac{1}{\sqrt{2\pi\hbar}} \int dx \ket{x} \int dp\exp\left(-\frac{iV(x)\Delta t}{2\hbar}\right)\exp\left(\frac{ipx}{\hbar}\right) \tilde{\psi}_{TV}(p)$$
$$ = \int dx \ket{x}\exp\left(-\frac{iV(x)\Delta t}{2\hbar}\right) \psi_{TV}(x)$$
where $\psi_{TV}(x) = \frac{1}{\sqrt{2\pi\hbar}}\int dp \exp(ipx/\hbar)\tilde{\psi}_{TV}(p)$.&lt;/p>
&lt;h3 id="algorithm">Algorithm&lt;/h3>
&lt;p>Therefore, a step of propagation from $\psi(x, t)$ to $\psi(x, t+\Delta t)$ involves the following steps:&lt;/p>
&lt;ol>
&lt;li>Define $\psi_V(x) = \exp\left(-\frac{i V(x) \Delta t}{2\hbar}\right)\psi(x, t)$.&lt;/li>
&lt;li>Define $\tilde{\psi}_V(p) = \frac{1}{\sqrt{2\pi\hbar}}\int dx \exp\left(-i p x / \hbar\right)\psi_V(x)$ by using FFT.&lt;/li>
&lt;li>Apply the kinetic energy propagator $\tilde{\psi}_{TV}(p) = \exp\left(-\frac{ip^2\Delta t}{2m\hbar}\right)\tilde{\psi}_V(p)$.&lt;/li>
&lt;li>Convert to position basis: $\psi_{TV}(x) = \frac{1}{\sqrt{2\pi\hbar}}\int dp \exp\left(i p x / \hbar\right)\tilde{\psi}_{TV}(p)$ using the IFFT routines.&lt;/li>
&lt;li>Finally apply the second potential energy piece, $\psi(x, t+\Delta t) = \exp\left(-\frac{i V(x) \Delta t}{2\hbar}\right)\psi_{TV}(x)$.&lt;/li>
&lt;/ol>
&lt;h2 id="examples">Examples&lt;/h2>
&lt;h3 id="harmonic-oscillator">Harmonic Oscillator&lt;/h3>
&lt;p>Imagine we are working with a harmonic potential:
Let us check the dynamics of an initial state obtained by shifting the ground
state of the harmonic potential to be centered on $x=-3$.
where the function for dot product is defined as follows:
&lt;/p>
&lt;p>The evolution of the probability density is shown below in the gif using both
the direct exponentiation way and the split-operator method:
&lt;figure class="ma0w-75" id="figure-time-evolution-of-the-probability-for-an-initial-state-defined-by-the-ground-state-wave-function-shifted-from-the-mean-position-under-a-harmonic-potential">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Time evolution of the probability for an initial state defined by the ground state wave function shifted from the mean position under a harmonic potential"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-dependent/shifted_ground_state.gif"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Time evolution of the probability for an initial state defined by the ground state wave function shifted from the mean position under a harmonic potential
&lt;/figcaption>&lt;/figure>
Notice that the width of the wave packet does not change over time. This is a
peculiar feature when the starting state has the same form as the ground state
wave function. (Read more about coherent states.)&lt;/p>
&lt;p>What happens if we make the initial wave packet broader or narrower than the
ground state wave packet? We keep the center of the initial wave packet at
$x=-3$ just as in the previous case.
&lt;figure class="ma0w-75" id="figure-time-evolution-of-the-probability-for-an-initial-gaussian-wave-function-with-a-larger-standard-deviation-and-centered-at-x-3-under-a-harmonic-potential">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Time evolution of the probability for an initial Gaussian wave function with a larger standard deviation and centered at $x=-3$ under a harmonic potential"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-dependent/shifted_fatter_wf.gif"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Time evolution of the probability for an initial Gaussian wave function with a larger standard deviation and centered at $x=-3$ under a harmonic potential
&lt;/figcaption>&lt;/figure>
&lt;figure class="ma0w-75" id="figure-time-evolution-of-the-probability-for-an-initial-gaussian-wave-function-with-a-smaller-standard-deviation-and-centered-at-x-3-under-a-harmonic-potential">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Time evolution of the probability for an initial Gaussian wave function with a smaller standard deviation and centered at $x=-3$ under a harmonic potential"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-dependent/shifted_sharper_wf.gif"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Time evolution of the probability for an initial Gaussian wave function with a smaller standard deviation and centered at $x=-3$ under a harmonic potential
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;p>Irrespective of the initial width of the wave function, the time evolution of
the expectation value of position is identical.
&lt;figure class="ma0w-75" id="figure-time-evolution-of-the-position-of-the-wave-functions-centered-at-x-3-moving-under-a-harmonic-potential">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Time evolution of the position of the wave functions centered at $x=-3$ moving under a harmonic potential" srcset="
/media/computational-sciences/basic-qm/time-dependent/positions_harmonic_hu_a7416b69d4682b96.webp 400w,
/media/computational-sciences/basic-qm/time-dependent/positions_harmonic_hu_44e5b1f341f46fae.webp 760w,
/media/computational-sciences/basic-qm/time-dependent/positions_harmonic_hu_cd4041d66ee6ad69.webp 1200w"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-dependent/positions_harmonic_hu_a7416b69d4682b96.webp"
width="760"
height="549"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Time evolution of the position of the wave functions centered at $x=-3$ moving under a harmonic potential
&lt;/figcaption>&lt;/figure>
&lt;/p>
&lt;p>However, the widths of the wave packets show interesting patterns:
&lt;figure class="ma0w-75" id="figure-time-evolution-of-the-width-of-the-wave-functions-centered-at-x-3-moving-under-a-harmonic-potential">
&lt;div class="d-flex justify-content-center">
&lt;div class="w-100" >&lt;img alt="Time evolution of the width of the wave functions centered at $x=-3$ moving under a harmonic potential" srcset="
/media/computational-sciences/basic-qm/time-dependent/widths_harmonic_hu_7391f00ce4dcc57f.webp 400w,
/media/computational-sciences/basic-qm/time-dependent/widths_harmonic_hu_f28704685780a8f5.webp 760w,
/media/computational-sciences/basic-qm/time-dependent/widths_harmonic_hu_ad1341a4da1fa555.webp 1200w"
src="https://bose-research-group.github.io/media/computational-sciences/basic-qm/time-dependent/widths_harmonic_hu_7391f00ce4dcc57f.webp"
width="760"
height="548"
loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;figcaption>
Time evolution of the width of the wave functions centered at $x=-3$ moving under a harmonic potential
&lt;/figcaption>&lt;/figure>
&lt;/p></description></item></channel></rss>