\documentclass[./schrodinger_simulation.tex]{subfiles}

\begin{document}
\section{Theoretical background}\label{sec:theory}
% Introduction?
The nature of light has long been a subject of discussion, from the 1500s 
and the invention of microscopes, through the 1700s where both a particle theory 
and a wave theory. In the late 1600s, Christiaan Huygens proposed the wave theory of light, 
which was challenged by Isaac Newton's particle theory. The particle theory made 
was the leading theory in the beginning of 1800s, when Thomas Young demonstrated 
the interference of light, through his double-slit experiment, the wave theory found 
new hold. 

In the 1800s, the study of ideal black bodies done by Gustav R. Kirchhoff, lead to a 
better understanding of heat radiation. Wilhelm Wien started working on determining the 
spectral energy distribution, and Wien's law. The law did make sense for high frequencies, 
however, there were inconsistencies when frequency were lower than a certain value. 
Wiens law led to an exponential curve, which disagree with the law of conservation.

Max Planck guessed a result which led to Plancks radiation law, which he later derived 
using Boltzmanns statistical interpretation of the second law of thermodunamics. 
Plancks findings gave rise to Einsteins quantum hypothesis, and later the wave-particle 
duality \cite{britannica:1998:planck}.  

For small atoms classical mechanics are not able to explain the position of a particle,
and Heisenberg uncertainty priciple suggest that the particles have a wavelike behavior.
The wave-particle duality was later proposed to apply to particles by Louis de Broglie,
which inspired Erwin Schrödinger who proposed a wave function to describe the quantum 
state of a particle, resulting in the wave equation.

% Methods?
% Schrödinger
The Schrödinger equation has a general form 
\begin{align}
    i \hbar \frac{\partial}{\partial t} | \Psi \rangle &= \hat{H} | \Psi \rangle \ ,
    \label{eq:schrodinger_general}
\end{align}
where $i$ is the imaginary number, and $\hbar$ is Plancks constant. Here $| \Psi \rangle$ 
is the quantum state and $\hat{H}$ is a Hamiltonian operator. 
For two-dimensional position space, the quantum state can be expressed using the 
time-dependent complex-valued wave function $\Psi (x, y, t)$. The square modulus of the wave function $|\psi|^{2}$, predicts probability of finding the particle at position $(x, y)$ at time t. 
% Segue to Born
The modulus of the wave function, is related to the probability density function 
\begin{align}
    p(x, y \ | \ t) &= |\Psi(x, y, t)|^{2} = \Psi^{*}(x, y, t) \Psi(x, y, t)
    \label{eq:born_rule}
\end{align}
using the Born rule, where $^{*}$ denotes the complex conjugated wave function. 
When the potential is time-independent, the Schrödinger equation can be expressed as 
\begin{align*}
    i \hbar \frac{\partial}{\partial t} \Psi (x, y, t) &= - \frac{\hbar^{2}}{2m} \bigg( \frac{\partial^{2}}{\partial x^{2}} + \frac{\partial^{2}}{\partial y^{2}} \bigg) \Psi (x, y, t) \\
    & \quad + V(x, y, t) \Psi (x, y, t) \numberthis \ .
    \label{eq:schrodinger_special}
\end{align*}
When we scale Schrödinger equation by the dimensionful variables, we are left with 
a wave function $u$, potential $v$ and the dimensionless equation
\begin{align}
    i \frac{\partial u}{\partial t} &= - \frac{\partial^{2} u}{\partial x^{2}} - \frac{\partial^{2} u}{\partial y^{2}} + v(x, y) u \ .
    \label{eq:schrodinger_dimensionless}
\end{align}

% Crank-Nicolson
To evaluate the position of a single particle, we have to consider partial differential 
equations (PDE). To solve these numerically, we have to discretize Equation \eqref{eq:schrodinger_dimensionless}. 
We use the Crank-Nicolson method (CN), which combines the forward and backward finite 
difference method. % 
% Include the general $\theta$-method 
Using the $\theta$-rule \footnote{For $\theta \in [0, 1]$ we can derive Forward Euler using $\theta = 1$, Backward Euler using $\theta = 0$, and $\theta = 1/2$ gives Crank-Nicolson} 
with $\theta = 1/2$, CN can be written as 
\begin{align}
    \frac{u_{\ivec, \jvec}^{n+1} - u_{\ivec, \jvec}^{n}}{\Delta t} &= \frac{1}{2} \bigg[ F_{\ivec, \jvec}^{n+1} + F_{\ivec, \jvec}^{n} \bigg] \ .
    \label{eq:crank_nicolson}
\end{align}
To simplify notation and avoid confusion of indices with the imaginary number $i$, 
we have used the notation $\ivec, \jvec$ in subscript to indicate the commonly named indices $i, j$ 
in x- and y-direction. In addition, the superscript $n, n+1$ indicate position in time. 
We use CN to derive the discretized Schrödinger equation 
\begin{align*}
    & u_{\ivec, \jvec}^{n+1} - \frac{i \Delta t}{2 \Delta x^{2}} \big[ u_{\ivec+1, \jvec}^{n+1} - 2u_{\ivec, \jvec}^{n+1} + u_{\ivec-1, \jvec}^{n+1} \big] \\
    & - \frac{i \Delta t}{2 \Delta y^{2}} \big[ u_{\ivec, \jvec+1}^{n+1} - 2u_{\ivec, \jvec}^{n+1} + u_{\ivec, \jvec-1}^{n+1} \big] + \frac{i \Delta t}{2} v_{\ivec, \jvec} u_{\ivec, \jvec}^{n+1} \\
    &= u_{\ivec, \jvec}^{n} + \frac{i \Delta t}{2 \Delta x^{2}} \big[ u_{\ivec+1, \jvec}^{n} - 2u_{\ivec, \jvec}^{n} + u_{\ivec-1, \jvec}^{n} \big] \\
    & \quad + \frac{i \Delta t}{2 \Delta y^{2}} \big[ u_{\ivec, \jvec+1}^{n} - 2u_{\ivec, \jvec}^{n} + u_{\ivec, \jvec-1}^{n} \big] - \frac{i \Delta t}{2} v_{\ivec, \jvec} u_{\ivec, \jvec}^{n} \numberthis \ .
    \label{eq:schrodinger_discretized} 
\end{align*}
The full derivation of both Equation \eqref{eq:crank_nicolson} and Equation \eqref{eq:schrodinger_discretized} 
can be found in Appendix \ref{ap:crank_nicolson}

First, we Taylor 
expand the wave equation $u$ around (position and time). 


\section{Notes}\label{sec:notes}
\subsection*{Introduction - draft 2}
In classical mechanics we study the kinematics and dynamics of physical objects, 
ignoring its intrinsic properties for simplicity. It allows us to describe the 
forces acting on an object as well as the motion of the object. We can describe 
a planets orbital movement \cite{britannica:2023:kepler}, calculate the ... necessary 
to launch satellites into orbit, or simply figure out where a ball is going to land 
when you throw it... However, when want to study an object at a microscopic level, 
e.g. a single atom, classical mechanics falls short. 

Thomas Young first performed the double-slit experiment in 1801, to demonstrate 
the principle of interference of light \cite{britannica:2023:young}, postulating 
light as waves. In the study of blackbodies, scientists were not able to describe 
the radiated intensity of increased frequencies using classical mechanichs, as they 
contradicted the principle of conservation of energy \cite{britannica:1998:planck}. 
Max Planck assumed that the radiated energy consist of discrete values, or quanta, 
to describe the peak in radiated energy. 

Light as particles -> waves -> particles/packets
Erwin Schrödinger wanted to find a mathematical description of the wave characteristics 
of matter, supporting the wave-particle idea. He postulated a function which varies 
with position, where the function swuared can be interpreted as the probability 
of finding an electron at a given position. 

\subsection*{Introduction - draft 1}
In classical mechanics, we study the motion of particles at a macroscopic ,using 
physical laws such as Newtons second law. These laws and concepts were used to solve 
the motion of the planets. 

However, when we zoom in on a single atom, at a microscopic level, classical mechanics 
are no longer sufficient in describing the motion of particles. That is, elementary 
particles do not behave in a way which can be described using classical mechanics. 
Introducing quantum mechanics, where a quantum is the minimum amount of something, 
such as an elementary particle of a given field. 

Beginning with the study of blackbodies and radiation, radiated intensity as a 
function of frequency, contradicting the principle of conservation of energy. Max 
Planck derived an equation Plancks Law, electromagnetic energy takes the form of 
quanta (discrete packets now known as photons). Energy of the photon is equal to 
plancks constant times the freq of light.

Thomas Young first performed the double-slit experiment in 1801, to demonstrate 
the principle of interference of light \cite{britannica:2023:young}, postulating 
light as waves.  

In the 1860s James Clerk Maxwell predicted that light waves consisted of coupled 
electric and magnetic fields.

Erwin Schrödinger wanted to find a wave equation for matter when classical mechanics 
fell short, the wave function. The wave function squared can be interpreted as the 
probability of finding an electron at a given position. Schrödingers equation can 
be solved for the hydrogen atom, wave equation of the energy levels for a hydrogen 
atom. The time-dependent equation also shows how a quantum state evolves with time 
\cite[p. 81]{wu:2023:quantum}.

\subsection*{Research material}
Simulating the double-slit experiment requires solving partial differential equations, 
when the number of spatial variables increases so does the complexity of the problem. 

Crank-Nicolson set out to find a numerical method to solve the diffusion equation, 
with a higher stability than the explicit and implicit schemes. Combining both schemes, 
they developed a finite difference method where a solution is stable for all dx and dt.

To solve equations, such as Schrödingers, numerically, a discretized equation is 
derived using difference methods of explicit and implicit scheme.

Distribution of particle position.
The wave function can be interpreted in several ways, not unity in agreement, does it apply to one electron, or a system of electrons. Use to find probabilities of measurements. Probability (squared) of finding the electron at a given position, need to do measurements many times for statistical reasons...

energy defined in quanta, photoelectric effect

Applying the wave-particle duality to matter, allows us to analyze the behavior of elementary particles more accurately.

Heisenberg uncertainty principle

diffraction and interference, describing waves through double slit experiment (Thomas Young). Diffraction pattern where light interfere constructively result in bright spots, whereas destructive interference result in dark spots. 

Path difference: distance between the center of each slit times sine of the angle between the point on the screen and the slits.

Progress in quantum mechanics without knowing how it works!
- Quantum is the minimum amount of something, elementary particle of a given field, smallest unit of excitation in a fundamental field (inject energy).
- Planck: father of quantum mechanics
Quantum mechanics (MIT open course ware):
- superposition principle: an object can simultaneously appear in two different places or have two different velocities \cite[p. 3]{wu:2023:quantum}
- quantum randomness: the outcome of a measurement is random when a particle is in a superposition of two positions.
- electron color: black or white, hardness: hard or soft
- Identical particles: an absolute in quantum mechanics, two particles can't be distinguished from each other. 
- Wave-Particle duality: Electrons are waves, and can form standing waves around protons.
- Schrödinger equation: wave equation of the energy levels for a hydrogen atom. It also shows how a quantum state evolves with time \cite[p. 81]{wu:2023:quantum}. 
\begin{align}
    i\hbar \frac{\partial}{\partial t} \Psi (x, y, t) &= - \frac{\hbar^{2}}{2m} \bigg( \frac{\partial^{2}}{\partial x^{2}} + \frac{\partial^{2}}{\partial y^{2}} \bigg) \Psi (x, y, t) + V(x, y, t) \Psi (x, y, t)
\end{align}
- $\psi$ is a wave function and describes the quantum state of a particle at time t. The square modulus of the wave function $|\psi|^{2}$, predicts probability of finding the particle at position $(x, y)$ at time t. 
- lhs: describe the rate of change of a wave function over time t. 
- rhs: describe the variation of the wave function in space.
- eq: describe the relation between the lhs and rhs, formulation of wave-particle duality.

Partial differential equations
- problems with many variables, constrained by boundary conditions and initial values.

Diffusion equation: describe the density of a quantity as a function of time, where the flux density obeys the Gauss-Green theorem (div = 0).
Crank-Nicolson: combines the implicit and explicit methods in solving a pde, rewriting the pde as a set of mat-vec multiplications.
Originally the method was derived for the diffusion 
equation, however, it can be used for the wave equation as well.

Wave equation in two dimensions (lec. p. 322), discretize position and time, to obtain 
\begin{align*}
    u_{\ivec, \jvec}^{n+1} &- r [ u_{\ivec+1, \jvec}^{n+1} - 2u_{\ivec, \jvec}^{n+1} + u_{\ivec-1, \jvec}^{n+1}] - r [ u_{\ivec, \jvec+1}^{n+1} - 2u_{\ivec, \jvec}^{n+1} + u_{\ivec, \jvec-1}^{n+1}] + \frac{i \Delta t}{2} v_{\ivec, \jvec} u_{\ivec, \jvec}^{n+1} \\
    &= u_{\ivec, \jvec}^{n} + r [ u_{\ivec+1, \jvec}^{n} - 2u_{\ivec, \jvec}^{n} + u_{\ivec-1, \jvec}^{n}] + r [ u_{\ivec, \jvec+1}^{n} - 2u_{\ivec, \jvec}^{n} + u_{\ivec, \jvec-1}^{n}] - \frac{i \Delta t}{2} v_{\ivec, \jvec} u_{\ivec, \jvec}^{n}
\end{align*}
Goal: Simulate the two-dimensional time-dependent schrödinger equation, to study a double-slit-in-a-box setup.
% Introduction
The double-slit experiment, interference using slits observe result on canvas. An experiment by Thomas Young to demonstrate the wave-particle duality of light. Electrons are waves as well as particles. 

When we consider an elementary particle, classical physics are not sufficient in describing the particles position in time. We introduce a probability density function for detecting the particle at a given position. 

We can study the quantum state of a particle in two dimensions, using Schrödinger's equation and the wave function. The kinetic energy are found from the partial derivative of the wave function in respect to the position varables. To solve this numerically, we use the crank-nicolson method to discretize position and time, which combines the explicit and implicit method in solving pdes.
\end{document}