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

\begin{document}
\section{Results}\label{sec:results}
\subsection{Deviation}\label{ssec:deviation}
% Problem 3: Discuss approaches to solve Au^{n+1} = b, dealing with sparse matrix...
We used the \verb|superlu| solver, which is a solver for sparse matrices. It is 
generally used to solve nonsymmetric, sparse matrices. However, as the alternative 
solver \verb|lapack| converts a sparse matrix to a dense matrix, it will increase 
memory usage compared to \verb|superlu|.
% Problem 7: Consequenses of solver choice, in regards to accuracy of probability conserved
%            Add plot of deviation for both single- and double-slit
Since we used a solver for sparse matrices, we decrease the number of computations performed
compared to the number of computations using a solver for dense matrices. 
We checked if the total probability was conserved over time, by plotting the deviation 
from $1.0$.
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/probability_deviation.pdf}
    \caption{Deviation of total probability, for time $t \in [0, T]$ where $T=0.008$.}
    \label{fig:deviation}
\end{figure}
We simulated the wave equation with the barrier switched off, using setting 1 in 
Table \ref{tab:sim_settings} found in Section \ref{ssec:implementation}. When the 
barrier was switched on, we used setting 2 in \ref{tab:sim_settings}. We observed 
a larger deviation of total probability for a barrier with double slits compared 
to no barrier. The result can found in Figure \ref{fig:deviation}. When the wave interacts  
with the barrier, it results in a larger change in kinetic energy. The result is more prone 
to computational errors, than if the wave propagates without interacting with a 
barrier. No interaction results in a more stable deviation from the total probability. 
In addition, we have to consider the limitations of the computer, therefore some computational 
error is to be expected.


\subsection{Time evolution}\label{ssec:time_evolution}
% Problem 8: Colormap, include plot of both Re and Im for different time steps
%            Account for color scale
We studied the time evolution of the probability function, using setting 2 in 
Table \ref{tab:sim_settings}, found in Section \ref{ssec:implementation}. To visualize 
the time evolution, we created colormap plots for different time steps. Figure \ref{fig:colormap_0_prob}, 
Figure \ref{fig:colormap_1_prob}, and Figure \ref{fig:colormap_2_prob} show the 
results for time steps $t=\{0, 0.001, 0.002\}$, respectively. In addition, we created 
separate plots for the real and imaginary part of $u_{\ivec, \jvec}$, for the same 
time steps. The results can be found in Appendix \ref{ap:figures}, in Figure \ref{fig:colormap_real_imag}.
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/color_map_0_prob.pdf}
    \caption{The probability function $p_{\ivec, \jvec}^{n}$, at time $t=0$.}
    \label{fig:colormap_0_prob}
\end{figure}
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/color_map_1_prob.pdf}
    \caption{The probability function $p_{\ivec, \jvec}^{n}$, at time $t=0.001$.}
    \label{fig:colormap_1_prob}
\end{figure}
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/color_map_2_prob.pdf}
    \caption{The probability function $p_{\ivec, \jvec}^{n}$, at time $t=0.002$.}
    \label{fig:colormap_2_prob}
\end{figure}
At time step $t=0.001$, Figure \ref{fig:colormap_1_prob}, when the wave interacts 
with the double slit barrier, we observe a clear diffraction pattern in the 
probability function. At time step $t=0$ (Figure \ref{fig:colormap_0_prob}) and 
$t=0.002$ (Figure \ref{fig:colormap_2_prob}), the diffraction pattern is not as 
clear. It is, however, more visible when we observe the real and imaginary part 
separately in Figure \ref{fig:colormap_real_imag}. Since the probability function 
is a product of $u_{\ivec, \jvec}$ and its conjugate $u_{\ivec, \jvec}^{*}$, 
initialized by a Gaussian wavepacket, the result is a sum of the real and imaginary part. 
% This can be found using Euler's formula, and the diffraction pattern is determined by interference given by \eqref{eq:interference}
In Figure \ref{fig:colormap_2_prob}, the probability function result in positive 
areas at both sides of the barries. Some of the probability function is reflected 
by the barrier, while the the rest spread out after passing the barrier. This is 
a consequence of the wave-particle duality. 

To compare the probability function $p_{\ivec, \jvec}$ for all the time steps in 
a colormap plot, with the real and imaginary part of $u_{\ivec, \jvec}$, we created 
Figure \ref{fig:colormap_all}. Where we excluded all x- and y-ticks, and labels, to 
better visualize the diffraction pattern.
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/color_map_all.pdf}
    \caption{The time evolution of the probability function $p_{\ivec, \jvec}^{n}$ (top row), 
    Re($u_{\ivec, \jvec}$) (middle row), and Im($u_{\ivec, \jvec}$) (bottom row). 
    Time step $t=0$ in the left column, $t=0.001$ in the middle column, and $t=0.002$ 
    in the right column.}
    \label{fig:colormap_all}
\end{figure}


\subsection{Particle detection}\label{ssec:particle_detection}
% Problem 9: Plot detection probability for single-, double- and triple-slit
We simulated the wave equation using setting 2 in Table \ref{tab:sim_settings}, 
and assumed a detector screen located at $x=0.8$. To visualize the pattern of constructive 
and destructive interference, we plotted the probability of particle detection, 
along the screen, at time $t=0.002$. We adjusted the parameters to include single-, double-, and triple-slit 
barriers. The results are found in Figure \ref{fig:particle_detection_single}, 
Figure \ref{fig:particle_detection_double}, and Figure \ref{fig:particle_detection_triple}, 
respectively.
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/single_slit_detector.pdf}
    \caption{Probability of particle detection along a detector screen at time $t=0.002$, 
    when using a single-slit barrier.}
    \label{fig:particle_detection_single}
\end{figure}
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/double_slit_detector.pdf}
    \caption{Probability of particle detection along a detector screen at time $t=0.002$, 
    when using a double-slit barrier.}
    \label{fig:particle_detection_double}
\end{figure}
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/triple_slit_detector.pdf}
    \caption{Probability of particle detection along a detector screen at time $t=0.002$, 
    when using a triple-slit barrier.}
    \label{fig:particle_detection_triple}
\end{figure}
When the barrier has a single slit, there is no destructive interference and we 
observe a single peak in the probability of particle detection. Adding another slit 
result in more peaks, as there is both constructive and destructive interference. 
When we used a triple-slit barrier, we observed an increase in interference which 
resulted in narrow peaks. In addition, the probability of detecting a particle at 
the ends of the screen increased with the number of slits.
\end{document}
