Skip to content

Commit

Permalink
Soft review (#268)
Browse files Browse the repository at this point in the history
* First pass at review of SOFT notebook.

* Final revisions to SOFT notebook and theory. Updated pseudocode figure.

---------

Co-authored-by: Dou Du <[email protected]>
  • Loading branch information
Taylor-96 and dou-du authored May 25, 2023
1 parent 281513d commit 8b4705b
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 80 deletions.
Binary file modified notebook/quantum-mechanics/images/SOFT_algorithm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
142 changes: 118 additions & 24 deletions notebook/quantum-mechanics/soft.ipynb

Large diffs are not rendered by default.

86 changes: 30 additions & 56 deletions notebook/quantum-mechanics/theory/theory_soft.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,87 +16,61 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## **Background theory**\n",
"\n",
"In previous notebooks, we focus on numerical solutions of the time-independent\n",
"Schrödinger equation. Here, we demonstrate the numercial solution of the \n",
"In other notebooks, we focus on numerical solutions of the time-independent\n",
"Schrödinger equation. Here, we demonstrate the numerical solution of the \n",
"one-dimensional time dependent Schrödinger equation. The split operator \n",
"Fourier transform (SOFT) was employed.\n",
"\n",
"<details open>\n",
"<summary style=\"font-size: 20px\">Propagation operator</summary>\n",
"Let's consider a time-independent Hamiltonian and its associated time-dependent\n",
"Schrödinger equation for a system of one particle in one dimension.\n",
" \n",
"$$\\large i\\hbar\\frac{d}{dt}|\\psi> = \\hat{H}|\\psi> \\quad \\text{where} \\quad \n",
"\\hat{H} = \\frac{\\hat{P}^2}{2m} + V(\\hat{x})$$\n",
"\\hat{H} = \\frac{\\hat{P}^2}{2m} + V(\\hat{X})$$\n",
"\n",
"The time evolution of the eigenstates can be formulated as:\n",
" \n",
"$$\\large \\psi_n(x,t) = \\psi_n(x)e^{-iE_nt/\\hbar}$$\n",
" \n",
"For a small time $\\Delta t$, the evolution of the wavefunction from $t=0$\n",
"to $t=\\Delta t$ can be formulated as:\n",
" \n",
"$$\\large \\psi(x, \\Delta t) = e^{-iH\\Delta t/\\hbar}\\psi(x, 0)\n",
"=\\sum_{n=0}^{\\infty} \\frac{(-1)^n}{n!}\\left(\\frac{iH\\Delta t}{\\hbar}\\right)^n \\psi(x,0)\n",
"=U(\\Delta t)\\psi(x,0)$$\n",
" \n",
"and where the $U(\\Delta t)$ is called the unitary propagation operator.\n",
"The $U$ is Hermitian, which fulfills the condition:\n",
" \n",
"$$\\large UU^\\dagger = e^{-iHt/\\hbar}e^{-iHt/\\hbar \\dagger}\n",
"= e^{-iHt/\\hbar}e^{iHt/\\hbar} = I$$\n",
" \n",
"The time-evolution operator is also reversible or symmetric\n",
"in thime:\n",
" \n",
"$$\\large U(-\\Delta t)U(\\Delta t)|\\psi(x,t)> = |\\psi(x,t)>$$\n",
"</details>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<details open>\n",
"<summary style=\"font-size: 20px\">Split operator Fourier transform</summary>\n",
"We know that this equation admits at least a formal solution of the kind\n",
"$|\\psi(t)> = \\exp\\biggl[-\\frac{i}{\\hbar}\\hat{H}t\\biggr]|\\psi(0)>$\n",
"that projected on the coordinate basis gives the (still formal) solution\n",
"$\\psi(x_t,t) = \\int dx_0 K(x_t, t; x_0, 0)\\psi(x_0,0)$\n",
"where $ K(x_t, t; x_0, 0)= < x_t|\\exp\\biggl[-\\frac{i}{\\hbar}\\hat{H}t\\biggr]|x_0 > $\n",
"Note that $x_t$ and $x_0$ are just labels for the coordinates, as if we had $x$ and $x'$.\n",
"$\\psi(X_t,t) = \\int dX_0 K(X_t, t; X_0, 0)\\psi(X_0,0)$\n",
"where $ K(X_t, t; X_0, 0)= < X_t|\\exp\\biggl[-\\frac{i}{\\hbar}\\hat{H}t\\biggr]|X_0 > $\n",
"Note that $X_t$ and $X_0$ are just labels for the coordinates, as if we had $X$ and $X'$.\n",
"\n",
"$$\\large k(x_t, x_0) = < x_t|e^{-\\frac{i}{\\hbar}\\hat{H}t} | x_0 > = < x_{N+1} | \\underbrace{e^{-\\frac{i}{\\hbar}t/N} e^{-\\frac{i}{\\hbar}t/N} ... e^{-\\frac{i}{\\hbar}t/N}}_\\textrm{N} |x_0 >$$\n",
"$$\\large k(X_t, X_0) = < X_t|e^{-\\frac{i}{\\hbar}\\hat{H}t} | X_0 > = < X_{N+1} | \\underbrace{e^{-\\frac{i\\hat{H}}{\\hbar}t/N} e^{-\\frac{i\\hat{H}}{\\hbar}t/N} ... e^{-\\frac{i\\hat{H}}{\\hbar}t/N}}_\\textrm{N} |X_0 >$$\n",
" \n",
"Let us then focus on the single step propogator.\n",
" \n",
"$$\\large < x_1 |\\psi(\\epsilon) > = \\psi(x_1,\\epsilon) = \\int dx_0 < x_1 | \n",
"e^{-\\frac{i}{\\hbar}\\hat{H}\\epsilon} |x_0 > \\psi(x_0,0)$$\n",
"$$\\large < X_1 |\\psi(\\epsilon) > = \\psi(X_1,\\epsilon) = \\int dX_0 < X_1 | \n",
"e^{-\\frac{i}{\\hbar}\\hat{H}\\epsilon} |X_0 > \\psi(X_0,0)$$\n",
" \n",
"We can use the Trotter approximation to write:\n",
" \n",
"$$\\large < x_1 |e^{-\\frac{i}{\\hbar}\\hat{H}\\epsilon}| x_0 > = < x_1 | e^{-\\frac{i}{\\hbar}\n",
"[\\frac{\\hat{P^2}}{2m}+V(\\hat{x})]\\epsilon} | x_0> \\approx < x_1 | e^{-\\frac{i}\n",
"{\\hbar}V(\\hat{x})\\epsilon/2}e^{-\\frac{i}{\\hbar}\\frac{\\hat{P^2}}{2m}\\epsilon}e^{-\\frac{i}\n",
"{\\hbar}V(\\hat{x})\\epsilon/2} | x_0 >$$\n",
"$$\\large < X_1 |e^{-\\frac{i}{\\hbar}\\hat{H}\\epsilon}| X_0 > = < X_1 | e^{-\\frac{i}{\\hbar}\n",
"[\\frac{\\hat{P^2}}{2m}+V(\\hat{X})]\\epsilon} | X_0> \\approx < X_1 | e^{-\\frac{i}\n",
"{\\hbar}V(\\hat{X})\\epsilon/2}e^{-\\frac{i}{\\hbar}\\frac{\\hat{P^2}}{2m}\\epsilon}e^{-\\frac{i}\n",
"{\\hbar}V(\\hat{X})\\epsilon/2} | X_0 >$$\n",
" \n",
"$$\\large =e^{-\\frac{i}{\\hbar}V(\\hat{x})\\epsilon /2} \\int dp < x_1 | e^{-\\frac{i}{\\hbar}\\frac{\\hat{P^2}}{2m}\\epsilon} | p > < p | x_0 > e^{ \n",
"\\frac{i}{\\hbar}V(\\hat{x})\\epsilon/2}$$\n",
"$$\\large =e^{-\\frac{i}{\\hbar}V(\\hat{X})\\epsilon /2} \\int dp < X_1 | e^{-\\frac{i}{\\hbar}\\frac{\\hat{P^2}}{2m}\\epsilon} | P > < P | X_0 > e^{ \n",
"\\frac{i}{\\hbar}V(\\hat{X})\\epsilon/2}$$\n",
" \n",
"where, $< p | x_0 > = \\frac{1}{\\sqrt{2\\pi\\hbar}}e^{-\\frac{i}{\\hbar}Px_0}$.\n",
"where, $< p | X_0 > = \\frac{1}{\\sqrt{2\\pi\\hbar}}e^{-\\frac{i}{\\hbar}PX_0}$.\n",
" \n",
"$$\\large \\psi(x_1,\\epsilon)=e^{-\\frac{1}{\\hbar}V(x_1)\\epsilon/2}\\int \\frac{dp}{\\sqrt{2\\pi\\hbar}}e^{\\frac{i}{\\hbar}px_1}e^{-\\frac{i}{\\hbar}\\frac{p^2}{2m}\\epsilon}\\underbrace{\\int \\frac{dx_0}{\\sqrt{2\\pi\\hbar}}e^{-\\frac{i}{\\hbar}px_0}\\underbrace{e^{-\\frac{i}{\\hbar}V(x_0)\\frac{\\epsilon}{2}}\\psi(x_0,0)}_{\\Phi_{\\frac{\\epsilon}{2}}(x_0)}}_{\\tilde{\\Phi}_{\\frac{\\epsilon}{2}}(p)}$$\n",
"$$\\large \\psi(X_1,\\epsilon)=e^{-\\frac{1}{\\hbar}V(X_1)\\epsilon/2}\\int \\frac{dP}{\\sqrt{2\\pi\\hbar}}e^{\\frac{i}{\\hbar}PX_1}e^{-\\frac{i}{\\hbar}\\frac{P^2}{2m}\\epsilon}\\underbrace{\\int \\frac{dX_0}{\\sqrt{2\\pi\\hbar}}e^{-\\frac{i}{\\hbar}PX_0}\\underbrace{e^{-\\frac{i}{\\hbar}V(X_0)\\frac{\\epsilon}{2}}\\psi(X_0,0)}_{\\Phi_{\\frac{\\epsilon}{2}}(X_0)}}_{\\tilde{\\Phi}_{\\frac{\\epsilon}{2}}(P)}$$\n",
" \n",
"$$\\large \\psi(x_1,\\epsilon)=e^{-\\frac{1}{\\hbar}V(x_1)\\epsilon/2}\\underbrace{\\int \\frac{dp}{\\sqrt{2\\pi\\hbar}}e^{\\frac{i}{\\hbar}px_1}\\underbrace{e^{-\\frac{i}{\\hbar}\\frac{p^2}{2m}\\epsilon}\\tilde{\\Phi}_{\\frac{\\epsilon}{2}}(p)}_{\\tilde{\\Phi}(p)}}_{\\tilde{\\Phi}(x_1)}$$\n",
"$$\\large \\psi(X_1,\\epsilon)=e^{-\\frac{1}{\\hbar}V(X_1)\\epsilon/2}\\underbrace{\\int \\frac{dP}{\\sqrt{2\\pi\\hbar}}e^{\\frac{i}{\\hbar}PX_1}\\underbrace{e^{-\\frac{i}{\\hbar}\\frac{P^2}{2m}\\epsilon}\\tilde{\\Phi}_{\\frac{\\epsilon}{2}}(P)}_{\\tilde{\\Phi}(P)}}_{\\tilde{\\Phi}(X_1)}$$, \n",
"\n",
"where we recognize $\\tilde{\\Phi}(P)$ as the Fourier transform of $\\Phi(X)$ for instance.\n",
" \n",
"By interating N times, we can obtain $\\psi(x,t)$. In summary, the split operator\n",
"Fourier transfer algorithm can be conducted into five step as shown below:\n",
"By interating N times, we can obtain $\\psi(X,t)$. In summary, the split operator\n",
"Fourier transfer algorithm can be reduced into the repeated execution of the five steps shown below:\n",
"\n",
"<img src=\"../images/SOFT_algorithm.png\" style=\"height:250px;\">\n",
"</details>"
"<img src=\"../images/SOFT_algorithm.png\" style=\"height:250px;width:600px\">\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": []
}
],
"metadata": {
Expand All @@ -115,7 +89,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.10.6"
},
"voila": {
"authors": "Dou Du, Sara Bonella and Giovanni Pizzi"
Expand Down

0 comments on commit 8b4705b

Please sign in to comment.