\subsection{Induction energy - the Thole model}
\label{sec:thole_model}
\index{Thole model}
\index{site energy!polarization}

If we in addition to the permanent set of multipole moments $\{Q_t^a\}$ allow for induced moments $\{\Delta Q_t^a\}$ and penalize their generation with a bilinear form (giving rise to a strictly positive contribution to the energy),
\begin{align}
U_\textrm{int} &=\frac{1}{2} \sum_A \Delta Q_t^a \eta_{tt'}^{aa'} \Delta Q_{t'}^{a'},
\end{align}
it can be shown that the induction contribution to the site energy evaluates to an expression where all interactions between induced moments have cancelled out, and interactions between permanent and induced moments are scaled down by $1/2$~\cite{stone_theory_1997}:
\begin{align}
U_{pu} = \frac{1}{2} \sum_A \sum_{B > A} \left[ \Delta Q_t^a T_{tu}^{ab} Q_u^b + \Delta Q_t^b T_{tu}^{ab} Q_u^a \right].
\label{equ:u_pu}
\end{align}
This term can be viewed as the second-order (induction) correction to the molecular interaction energy. The sets of $\{Q_t^a\}$ are solved for self-consistently via
\begin{align}
\Delta Q_t^a = - \sum_{B \neq A} \alpha_{tt'}^{aa'} T_{t'u}^{a'b} (Q_u^b + \Delta Q_u^b),
\label{equ:self_consistent_dQ}
\end{align}
where the polarizability tensors $\alpha_{tt'}^{aa'}$ are given by the inverse of $\eta_{tt'}^{aa'}$.

With eqs.~\ref{equ:self_consistent_dQ} and~\ref{equ:u_pu} we have at hand expressions that allow us to compute the induction energy contribution to site energies in an iterative manner based on a set of molecular distributed multipoles $\{Q_t^a\}$ and polarizabilities $\{\alpha_{tt'}^{aa'}\}$. We have drafted in the previous section how to obtain the former from a wavefunction decomposition or fitting scheme (GDMA, CHELPG). The $\{\alpha_{tt'}^{aa'}\}$ can be derived formally (or rather: read off) from a perturbative expansion of the molecular interaction. In this work we make use of the Thole model~\cite{thole_molecular_1981, van_duijnen_molecular_1998} as a semi-empirical approach to obtain the sought-after point polarizabilities in the local dipole approximation, that is, $[\alpha_{tt'}^{aa'}] = \alpha_{tt'}^{aa'} \delta_{t \beta} \delta_{t'\beta} \delta_{aa'}$, where $\beta \epsilon \{x,y,z\}$ references the dipole-moment component.

The Thole model is based on a modified dipole-dipole interaction, which can be reformulated in terms of the interaction of smeared charge densities. This has been shown to be necessary due to the divergent head-to-tail dipole-dipole interaction that otherwise results at small interseparations on the \AA~scale~\cite{applequist_atom_1972, thole_molecular_1981, van_duijnen_molecular_1998}. Smearing out the charge distribution mimics the nature of the QM wavefunction, which effectively guards against this unphysical polarization catastrophe. Since the point dipoles however only react individually to the external field, any correlation effects as were still accounted for in the $\{\alpha_{tt'}^{aa'}\}$ are lost, except perhaps those correlations that are due to the mere classical field interaction.

The smearing of the nuclei-centered multipole moments is obtained via a fractional charge density $\rho_f(\vec{u})$ which should be normalized to unity and fall off rapidly as of a certain radius $\vec{u} = \vec{u}(\vec{R})$. The latter is related to the physical distance vector $\vec{R}$ connecting two interacting sites via a linear scaling factor that takes into account the magnitude of the isotropic site polarizabilities $\alpha^a$. This isotropic fractional charge density gives rise to a modified potential
\begin{align}
 \phi(u) = -\frac{1}{4\pi\varepsilon_0} \int \limits_{0}^{u} \! 4\pi u' \rho(u') d\!u'
 \label{equ:mod_potential}
\end{align}
We can relate the multipole interaction tensor $T_{ij \dots}$ (this time in Cartesian coordinates) to the fractional charge density in two steps: First, we rewrite the tensor in terms of the scaled distance vector $\vec{u}$,
\begin{align}
 T_{ij \dots }(\vec{R}) = f(\alpha^a \alpha^b) \ t_{ij \dots}(\vec{u}(\vec{R},\alpha^a \alpha^b)),
\end{align}
where the specific form of $f(\alpha^a \alpha^b)$ results from the choice of $u(\vec{R},\alpha^a \alpha^b)$. Second, we demand that the smeared interaction tensor $t_{ij \dots}$ is given as usual by the appropriate derivative of the potential in eq.~\ref{equ:mod_potential},
\begin{align}
 t_{ij \dots}(\vec{u}) = - \partial_{u_i} \partial_{u_j} \dots \phi(\vec{u}).
\end{align}
It turns out that for a suitable choice of $\rho_f(\vec{u})$, the modified interaction tensors can be rewritten in such a way that powers $n$ of the distance $R = |\vec{R}|$ are damped with a damping function $\lambda_n(\vec{u}(\vec{R}))$~\cite{ren_polarizable_2003}.

There is a large number of fractional charge densities $\rho_f(\vec{u})$ that have been tested for the purpose of giving best results for the molecular polarizability as well as interaction energies. Note how a great advantage of the Thole model is the exceptional transferability of the atomic polarizabilities to compounds not used for the fitting procedure~\cite{van_duijnen_molecular_1998}. In fact, for most organic molecules, a fixed set of atomic polarizabilities ($\alpha_C = 1.334$, $\alpha_H = 0.496$, $\alpha_N = 1.073$, $\alpha_O = 0.873$, $\alpha_S = 2.926$ \AA$^3$) based on atomic elements yields satisfactory results.

VOTCA implements the Thole model with an exponentially-decaying fractional charge density
\begin{align}
 \rho(u) = \frac{3a}{4\pi} \exp(-au^3),
\end{align}
where $\vec{u}(\vec{R},\alpha^a \alpha^b) = \vec{R} / (\alpha^a \alpha^b)^{1/6}$ and the smearing exponent $a=0.39$ (which can however be changed from the program options), as used in the AMOEBA force field~\cite{ren_polarizable_2003}.

Even though the Thole model performs very well for many organic compounds with only the above small set of element-based polarizabilities, conjugated molecules may require a more intricate parametrization. The simplest approach is to resort to scaled polarizabilities to match the effective molecular polarizable volume $V \sim \alpha_{x} \alpha_{y} \alpha_{z}$ as predicted by QM calculations (here $\alpha_x, \alpha_y, \alpha_z$ are the eigenvalues of the molecular polarizability tensor). The \toolref{molpol} \tool assists with this task, it self-consistently calculates the Thole polarizability for an input mps-file and optimizes (if desired) the atomic polarizabilities in the above simple manner.

\votcacommand{Generate Thole-type polarizabilites for a segment}{\cmdmolpol}

The electrostatic and induction contribution to the site energy is evaluated by the \calc{emultipole} \calculator. Atomistic partial charges for charged and neutral molecules are taken from mps-files (extended GDMA format) specified in \xmlcsg. Note that, in order to speed up calculations for both methods, a cut-off radius (for the molecular centers of mass) can be given in \xmloptions. Threaded execution is advised.

\votcacommand{Electrostatic and induction corrections}{\cmdemlt}

Furthermore available are \calc{zmultipole}, which extends \calc{emultipole} to allow for an electrostatic buffer layer (loosely related to the z-buffer in OpenGL, hence the name) and anisotropic point polarizabilities. For the interaction energy of charged clusters of any user-defined composition (Frenkel states, CT states, ...), \calc{xqmultipole} can be used.

\votcacommand{Interaction energy of charged molecular clusters embedded in a molecular environment}{\cmdxqmult}


% !TEX root = ../main.tex

\section{Behavioural equivalences}

\subsection{When transition systems are equal?}

\begin{figure}[H]
  \centering
  \begin{subfigure}[b]{.4\textwidth}
    \centering
    \begin{tikzpicture}
      \node[state] (0) {};
      \node[state, below = of 0] (1) {};
      \node[state, below left = of 1] (2) {};
      \node[state, below right = of 1] (3) {};

      \draw (0)   edge    node {a}  (1)
            (1)   edge    node {b}  (2)
                  edge    node {c}  (3);
    \end{tikzpicture}
    \caption{System a \label{fig:02_system_a}}
  \end{subfigure}
  ~
  \begin{subfigure}[b]{.4\textwidth}
    \centering
    \begin{tikzpicture}
      \node[state] (0) {};
      \node[state, below right = of 0] (1) {};
      \node[state, below left = of 0] (2) {};
      \node[state, below = of 1] (3) {};
      \node[state, below = of 2] (4) {};

      \draw (0)   edge    node {a}  (1)
                  edge    node {a}  (2)
            (1)   edge    node {b}  (3)
            (2)   edge    node {c}  (4);
    \end{tikzpicture}
    \caption{System a \label{fig:02_system_b}}
  \end{subfigure}
  \caption{Are these two systems equivalent?}
\end{figure}

Usually it depends in the interaction on when two systems are equal.
Not \emph{bisimulation equivalent}.

\subsection{Bisimulation equivalence}

We say that a relation \( \pmb{R} \subseteq S \times S \) is a bisimulation relation iff for all states
\( s,t \in S \) it holds that if \( sRt \).

\begin{itemize}
  \item if \( s \xrightarrow{a} s' \) for some \( s'\in S\), then there is some \( t' \in S \)
  such that \( t \xrightarrow{a} t' \) and \( s'\pmb{R}t' \).
  \item if \( t \xrightarrow{a} t' \) for some \( t'\in S\), then there is some \( s' \in S \)
  such that \( s \xrightarrow{a} t' \) and \( s'\pmb{R}t' \).
  \item \( s \in T \) iff \( t \in T \)
\end{itemize}

Two states \( s,t \in S \) are called bisimilar

\textbf{Theorem} Every transition system has a \emph{unique} minimal transition system that is
bisimulation equivalent to it.

\begin{figure}[H]
  \centering
  \begin{subfigure}[b]{.45\textwidth}
    \centering
    \begin{tikzpicture}
      \node[state] (0) {};
      \node[state, below left = of 0] (1) {};
      \node[state, below right = of 0] (2) {};
      \node[state, below = of 1] (3) {};
      \node[state, below = of 2] (4) {};

      \draw (0)   edge    node {a}    (1)
            (1)   edge    node {a}    (3)
            (3)   edge    node {a}    (4)
            (4)   edge    node {a}    (2)
            (2)   edge    node {a}    (0);
    \end{tikzpicture}
    \caption{System a}
  \end{subfigure}
  \centering
  \begin{subfigure}[b]{.45\textwidth}
    \begin{tikzpicture}
      \node[state] (0) {};

      \draw (0) edge[loop below] node {a} (0);
    \end{tikzpicture}
    \caption{System b}
  \end{subfigure}
  \caption{These two systems have a bisimulation relation}
\end{figure}

\subsection{Trace equivalence}

\begin{figure}[H]
  \begin{subfigure}[b]{.4\textwidth}
    \centering
    \begin{tikzpicture}
      \node[state] (0) {};
      \node[state, below = of 0] (1) {};
      \node[state, below left = of 1] (2) {};
      \node[state, below right = of 1] (3) {};

      \draw (0)   edge    node {a}  (1)
            (1)   edge    node {b}  (2)
                  edge    node {c}  (3);
    \end{tikzpicture}
    \caption{System a, trace is \( \{ \epsilon, a, a \cdot b, a \cdot c \} \)}
  \end{subfigure}
  ~
  \begin{subfigure}[b]{.4\textwidth}
    \centering
    \begin{tikzpicture}
      \node[state] (0) {};
      \node[state, below right = of 0] (1) {};
      \node[state, below left = of 0] (2) {};
      \node[state, below = of 1] (3) {};
      \node[state, below = of 2] (4) {};

      \draw (0)   edge    node {a}  (1)
                  edge    node {a}  (2)
            (1)   edge    node {b}  (3)
            (2)   edge    node {c}  (4);
    \end{tikzpicture}
    \caption{System b, trace is \( \{ \epsilon, a, a \cdot b, a \cdot c \} \)}
  \end{subfigure}

  \caption{These two systems are not bisimilar but have a trace equivalence}
\end{figure}

For the trace equivalence all the partial traces are included. Trace equivalence does not
preserve deadlocks. To verify a system, never use trace equivalence because it does not counts
the deadlocks.

Calculating bisimulation on a finite transition system with \( n \) states and \( m \) transitions
requires \emph{insert formula here}

\begin{displayquote}
For deterministic transition systems bisimulation and trace equivalence coincide
\end{displayquote}

\subsection{Useful facts}

If you show that two transitions systems are not trace equivalent you could find one trace in
one but not in the other.

Exercise from 20: Are these two trace equivalent?

Yes these two are trace equivalent because we always have 3a followed by another letter.

Exercise from 21: Are these two bisimilar?

No, they are not bisimilar because you can end in a transition where a b transition must be mimicked
by another b transition but this is not possible.

\subsection{Branching bisimulation}

A relation \(\pmb{R}\) is a \emph{branching bisimulation} relation iff, some branches can be
skipped

\begin{figure}[H]
  \centering
  \begin{tikzpicture}
    \node[state] (a0) {};
    \node[state, below = of a0] (a1) {};
    \node[state, below = of a1] (a2) {};
    \node[state, right = of a0] (b0) {};
    \node[state, below = of b0] (b1) {};
    \node[state, below = of b1] (b2) {};
    \node[state, below = of b2] (b3) {};

    \draw (a0)    edge    node {a}    (a1)
          (a1)    edge    node {b}    (a2)
          (b0)    edge    node {a}    (b1)
          (b1)    edge    node {\(\tau\)}    (b2)
          (b2)    edge    node {b}    (b3);
  \end{tikzpicture}

  \caption{These two systems are branching bisimilar}
\end{figure}

\subsection{Combining behaviour}

If we combine branching bisimilar systems we do not obtain branching bisimilar systems.

\subsection{Rooted branching bisimulation}

A rooted branching bisimulation relation \( \pmb{R}\) is a branching bisimulation that also
satisfies that the first transition is the same, without skips.

Strong bisimulation implies rooted branching bisimulation implies branching bisimulation.

\subsection{When to use which behavioural equivalence?}

\begin{itemize}
  \item Strong bisimulation, always safe
  \item Trace equivalence,
  \item Divergence preserving branching bisimulation. Used to remove internal steps. Always safe choice.
  \item Branching bisimulation. Safe choice when eventualities are not important, as it removes
  \(\tau\)-loops.
  \item Weak bisimulation. For practical purposes generally equivalent to branching bisimulation.
  \item Weak trace equivalence. Removes all \(\tau\)s. Does not preserve branching behaviour.
  Use with care.
\end{itemize}

Exercice I (pag. 43): We have a complex system where we hide many actions. We want to see whether
the behaviour is free from deadlocks. What should we use?

1) Strong bisimulation. It is always safe but we hide many actions, although correct it is not
the best scenario
2) Divergence preserve branching bisimulation. Is is always safe, seems like the best choice
3) Branching bisimulation. In this case it is the safe choice, any deadlock that exists is going
to be preserved after branching bisimulation reduction.
4) Trace equivalence. No, it does not preserve deadlocks
5) It does not preserve deadlocks neither.

\subsection{Summary}

We defined the following behavioural equivalences:
\begin{itemize}
  \item (Weak) trace equivalence
  \item Strong bisimulation
  \item (Rooted) (Divergence preserving) branching bisimulation
\end{itemize}

We saw some guidelines on when to use which behavioural equivalence


\section{Future Work}

Future changes we would like to make to our project would include a
hefty redesign for some of the tree structure algorithms, specifically
the deletion methods.  Our current deletion algorithms do a complete
restructuring of the tree when we encounter an underflow because of
deletion.  This method is convenient for reducing lines of code, but
can become very costly for large trees.  As such in the future we hope
to be able to implement the more common method for handling deletion
that results in underflow, which is to then cascade upward, merge with
or borrowing from sibling nodes.  In the general case this method
would prove to have better performance, having a deletion time of
O(log n) as opposed to our current method which has a deletion time
of O(n log n).  Part of the reason we didn't not do the standard
method of deletion initially was because of some of the limitation of
Javascript.  Javascript lacks easy to use pointers, which made things
a bit harder when trying to keep track for each node/block, what it's
children and parent were.  As such we could not find a reasonable
method of linking sibling nodes which would be necessary for efficient
implementation of standard method of handling underflow by borrowing
or merging with siblings.  We'd also like to better organize the
modularization of our insertion methods, while they work, and run in
time O(log n) the code itself is a bit disorganized making it hard to
read through if you were trying to go through it manually to verify
correctness.

Visually, it would also be a nice addition if we could provide step by
step animation of how values, or a search is moving through the tree
to provide a better means of understanding exactly what is occurring
during various search, insertion, or deletion queries.  A simple
textual output could suffice if it explicitly stated things like:
\\ \\
"Key 3 removed from node X"
\\*
"Node X borrowed values a,b from node Y to cover underflow"
\\*
...
\\*
"Key 6 inserted into Node X"
\\*
"Node X split into Nodes Y, with values a,b, and Z, with values c,d"
\\*
etc.
\\ \\
This at least would allow the user to follow along with the action step
by step, even if they could not see if visually animated.

\section{Conclusion}

Our project successfully met the goals we set out to accomplish when
we began this project. The user can successfully insert, delete, and
search for values in the B or B+ Tree. At each action, the user
receives a visualization of the new tree state.  The user can freely
switch between either tree representation without clearing the data
form the tree, allowing for an excellent means of observing the
specific differences in these two types of trees.

In the process of developing this project, we came across more great
ideas for features we could develop. These are detailed above, in the
\textit{Future Work} section.  This project still holds a lot of
promise to go above and beyond its current state, and we hope to make
it even better then we can currently picture it.  This project taught
us both a lot about trees and indexing structure, and not just how
they work in an abstract sense, but how to make them work in a
computing environment as well. We also learned a lot about Javascript
and its many quirks.  We shall carry the lessons we have leanred from
this project with us for years to come, and it has made us both better
programmers for having worked on it.


%---------------------------Volume---------------------------
\section{Volume\label{s:hex-volume}}

The volume of a hexahedron is simply
\[
q = \frac{\alpha_8}{64}.
\]
Physically, this is the product of the magnitudes of the 3 principal axes.

\hexmetrictable{volume}%
{$L^3$}%                                      Dimension
{$[0,DBL\_MAX]$}%                             Acceptable range
{$[0,DBL\_MAX]$}%                             Normal range
{$[-DBL\_MAX,DBL\_MAX]$}%                     Full range
{$2$}%                                        Cube
{--}%                                         Citation
{v\_hex\_volume}%                             Verdict function name


\documentclass[letterpaper]{article}

\usepackage{fullpage}
\usepackage{nopageno}
\usepackage{amsmath}
\usepackage{amssymb}
\allowdisplaybreaks

\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}

\begin{document}
\title{Homework}
\date{October 1, 2014}
\author{Jon Allen}
\maketitle
Section 2.3: 12.
Section 3.1: 2, 9.
Section 3.2: 6.
\renewcommand{\labelenumi}{2.\arabic{enumi}}
\renewcommand{\labelenumii}{\arabic{enumii}.}
\renewcommand{\labelenumiii}{(\alph{enumiii})}
\begin{enumerate}
\setcounter{enumi}{2}
\item
  \begin{enumerate}
  \setcounter{enumii}{11}
  %2.3 12
  \item
    Prove that $(a,b)$ cannot bewritten as a product of two cycles of length three.

    $(a,b)$ is a product of an odd number of transpositions. A cycle of length three is a product of an even numbe of transpositions. We know from theorem 2.3.11 that if a permutation is written with a certain number of transpositions, then writing it in another way will have the same parity as our first. This means that we can never write a transposition as a product of any number of cycles of length three as this will always wind up being the product of an even number of transpositions, not the odd number required.
  \end{enumerate}
\renewcommand{\labelenumi}{3.\arabic{enumi}}
\setcounter{enumi}{0}
\item
  \begin{enumerate}
  \setcounter{enumii}{1}
  %3.1 2
  \item
    For each binary operation $*$ defined on a set below, determine whether or not $*$ gives a group structure on the set. If it is not a group, say which axioms fail to hold.
    \begin{enumerate}
    \item
      Define $*$ on $\mathbb{Z}$ by $a*b=ab$.

      There is only one identity element, which we know is $1$. There are no solutions to $0\cdot x=1$ so the element $0$ has no inverse, thus multiplication and the integers do not make a group.
    \item
      Define $*$ on $\mathbb{Z}$ by $a*b=\max\{a,b\}$.

      Let $e$ be the identity element. Then $\max(e,e-1)$ gives us $e$ not $e-1$. So by contradicttion, there is no identity element, and so the $\max$ operation doesn't make a group with the integers.
    \item
      Define $*$ on $\mathbb{Z}$ by $a*b=a-b$.

      Associativity fails, for example $(1-2)-3=-4$ but $1-(2-3)=0$. So subtraction does not form a group with the integers.
    \item
      Define $*$ on $\mathbb{Z}$ by $a*b=|ab|$.

      There is no indentity element, because there is no identity element for negative numbers. For example, there is no solution to the equation $|-2\cdot e|=-2$. So taking the absolute value of the product of two numbers does not form a group with the integers.
    \item
      Define $*$ on $\mathbb{R}^+$ by $a*b=ab$.

      Any positive real number multiplied by any positive real number will be positive, and so multiplication is a binary operation on $\mathbb{R}^+$. Multiplication is also associative under $\mathbb{R}^+$. The identity element--one--is in $\mathbb{R}^+$. And finally, if $a\in \mathbb{R}^+$ then $\frac{1}{a}\in \mathbb{R}^+$ and $a\cdot\frac{1}{a}=1$. So $\mathbb{R}+$ forms a group with multiplication.
    \item
      Define $*$ on $\mathbb{Q}$ by $a*b=ab$.

      There is no multiplicative inverse for 0 in the rationals. This fails in the exact same way as part (a) fails.
    \end{enumerate}
  %3.1 9
  \setcounter{enumii}{8}
  \item
    Let $G=\{x\in \mathbb{R}|x>0\text{ and }x\ne 1\}$. Define the operation $*$ on $G$ by $a*b=a^{\ln b}$, for all $a,b\in G$. Prove that $G$ is an abelian group under the operation $*$.

    \subsubsection*{proof}
    If we take any $b\in\mathbb{R}$ such that $b>0$ then $\ln b\in  \mathbb{R}$.
    Furthermore, if we take any $a,b\in \mathbb{R}$ such that $a>0$ then $a^b\in \mathbb{R}$ and $a^b>0$.
    Note that $1\not\in G$ and $a^0=1\forall a\in G$. But $0=\ln 1$ and $1\not\in G$.
    So then $G$ is closed under our operation.

    Proving associativity is pretty straighforward, using the usual exponent and logarithm rules.
    \[a*(b*c)=a*b^{\ln c}=
      a^{\ln b^{\ln c}}=
      a^{(\ln b)\cdot(\ln c)}=
      (a^{\ln b})^{\ln c}=(a*b)^{\ln c}=
      (a*b)*c
    \]
    The identity is actually Euler's number. We often use $e$ to represent a generic identity. Here we are using the letter $e$ to represent our particular identity--Euler's number.
    \[e*a=e^{\ln a}=a=a^1=a^{\ln e}=a*e\]
    Now we are just left to ensure we can always find an inverse $a^{-1}\in G$ for any $a\in G$.
    \begin{align*}
      a*a^{-1}&=e= a^{\ln a^{-1}}&
      \ln a^{\ln a^{-1}}&=\ln e&
      \ln a\cdot\ln a^{-1}&=1\\
      \ln a^{-1}&=\frac{1}{\ln a}&
      e^{\ln a^{-1}}&=e^\frac{1}{\ln a}&
      a^{-1}&=e^\frac{1}{\ln a}\\
    \end{align*}
    We can take $e$ to any power and we will get a positive real back. We can not get $e^0=1$ because there is not number divided by zero which will give us 0. We also do not have toworry about $e^{\frac{1}{0}}$ because $0=\ln a$, has only $1$ as a solution and $1\not\in G$.

    \begin{align*}
      a*a^{-1}=a^{\ln e^{\frac{1}{\ln a}}}=a^{\frac{\ln e}{\ln a}}=a^{\log_a e}=e\\
      a^{-1}*a=(e^{\frac{1}{\ln a}})^{\ln a}=e^{\frac{\ln a}{\ln a}}=e^1=e
    \end{align*}
    Well we definitely have a group. Is it commutative?
    \begin{align*}
      a*b=a^{\ln b}=e*a^{\ln b}=e^{\ln a^{\ln b}}=e^{(\ln b)(\ln a)}=e^{\ln b^{\ln a}}=e*b^{\ln a}=b^{\ln a}=b*a
    \end{align*}
    Yep, it is commutative and therefore abelian.
    %\[(a*b)*c=(a^{\ln b})*c
    %  =(a^{\ln b})^{\ln c}
    %  =a^{{\ln b}\cdot{\ln c}}
    %  =a^{\ln b^{\ln c}}
    %  =a^{\ln (b*c)}
    %  =a*(b*c)
    %\]
  \end{enumerate}
\item
  \begin{enumerate}
  \setcounter{enumii}{5}
  \item
    Let $G=GL_2(\mathbb{R})$.
    \begin{enumerate}
    \item
      Show that $T=\left\{\left.\left[\begin{array}{cc}a&b\\0&d\end{array}\right]\right\rvert ad\ne0\right\}$ is a subgroup of $G$.

      First we choose an arbitrary element of $T$, call it $T_1$ and find it's inverse.
      \begin{align*}
        \left[\begin{array}{cc|cc}a_1&b_1&1&0\\0&d_1&0&1\end{array}\right]&&
        \left[\begin{array}{cc|cc}a_1&b_1&1&0\\0&1&0&\frac{1}{d_1}\end{array}\right]&&
        \left[\begin{array}{cc|cc}a_1&0&1&-\frac{b_1}{d_1}\\0&1&0&\frac{1}{d_1}\end{array}\right]&&
        \left[\begin{array}{cc|cc}1&0&\frac{1}{a_1}&-\frac{b_1}{a_1d_1}\\0&1&0&\frac{1}{d_1}\end{array}\right]
      \end{align*}
      We note that two implications of $ad\ne 0$ are that $a_1\ne 0$ and $d_1\ne 0$. This is all we need to say that ${T_1}^{-1}$ is in $T$ (although we needn't demonstrate that for this proof).
      \begin{align*}
        {T_1}^{-1}T_1&=
        \left[\begin{array}{cc}\frac{1}{a_1}&-\frac{b_1}{a_1d_1}\\0&\frac{1}{d_1}\end{array}\right]
        \left[\begin{array}{cc}a_1&b_1\\0&d_1\end{array}\right]&
        T_1{T_1}^{-1}&=
        \left[\begin{array}{cc}a_1&b_1\\0&d_1\end{array}\right]
        \left[\begin{array}{cc}\frac{1}{a_1}&-\frac{b_1}{a_1d_1}\\0&\frac{1}{d_1}\end{array}\right]\\
        &=\left[\begin{array}{cc}\frac{a_1}{a_1}&\frac{b_1}{a_1}-\frac{d_1b_1}{a_1d_1}\\0&\frac{d_1}{d_1}\end{array}\right]&
        &=\left[\begin{array}{cc}\frac{a_1}{a_1}&-\frac{a_1b_1}{a_1d_1}+\frac{b_1}{d_1}\\0&\frac{d_1}{d_1}\end{array}\right]\\
        &=\left[\begin{array}{cc}1&0\\0&1\end{array}\right]&
        &=\left[\begin{array}{cc}1&0\\0&1\end{array}\right]
      \end{align*}
      Now we take another arbitrary element of $T$, say $T_2$ and check to make sure $T_2{T_1}^{-1}$ is in $T$.
      \begin{align*}
        T_2&=\left[\begin{array}{cc}a_2&b_2\\0&d_2\end{array}\right]\\
        T_2{T_1}^{-1}&=\left[\begin{array}{cc}a_2&b_2\\0&d_2\end{array}\right]\left[\begin{array}{cc}\frac{1}{a_1}&-\frac{b_1}{a_1d_1}\\0&\frac{1}{d_1}\end{array}\right]\\
        &=\left[\begin{array}{cc}\frac{a_2}{a_1}&-\frac{a_2b_1}{a_1d_1}+\frac{b_2}{d_1}\\0&\frac{d_2}{d_1}\end{array}\right]
      \end{align*}
      Similarly to our previous observation, we note that $a_1\ne 0$, $d_1\ne 0$, $a_2\ne 0$, and $d_2\ne 0$. And this is enough to show that $T_2{T_1}^{-1}\in T$. And so by 3.2.3 in the textbook, $T$ is a subgroup of $GL_2(\mathbb{R})$
    \item
      Show that $D=\left\{\left.\left[\begin{array}{cc}a&0\\0&d\end{array}\right]\right\rvert ad\ne0\right\}$ is a subgroup of $G$.

      Let us take $T_1$ from the part (a) and set $b_1=0$. Lets call this $D_1$. So then ${D_1}^{-1}=\left[\begin{array}{cc}\frac{1}{a_1}&0\\0&\frac{1}{d_1}\end{array}\right]$. We note that both $D_1$ and ${D_1}^{-1}$ are in $D$. And taking another arbitrary element from $D$, say $D_2$:
      \begin{align*}
        D_2&=\left[\begin{array}{cc}a_2&0\\0&d_2\end{array}\right]\\
        D_2{D_1}^{-1}&=\left[\begin{array}{cc}a_2&0\\0&d_2\end{array}\right]
        \left[\begin{array}{cc}\frac{1}{a_1}&0\\0&\frac{1}{d_1}\end{array}\right]\\
        &=\left[\begin{array}{cc}\frac{a_2}{a_1}&0\\0&\frac{d_2}{d_1}\end{array}\right]
      \end{align*}
      And similarly to part (a) we notice that $a_1\ne 0$, $d_1\ne 0$, $a_2\ne 0$, and $d_2\ne 0$ and so $D_2{D_1}^{-1}\in D$ and $D$ is a subgroup of $GL_2\left(\mathbb{R}\right)$
    \end{enumerate}
  \end{enumerate}
\end{enumerate}
\end{document}


\section{Results}

This is the results section.

\begin{align}
	F &= ma \\
	\intertext{where:}
	F &= \text{net force applied on the body [N]} \nonumber \\
	m &= \text{total mass of the body [kg]} \nonumber \\
	a &= \text{net acceleration of the body [m s}^{-2}\text{]} \nonumber
\end{align}

\begin{figure}[htbp!]
	\begin{center}
		\includegraphics[scale=0.7]{./images/catinhat}
	\end{center}
	\caption{A caption for the figure.}
	\label{fig:catinhat}
\end{figure}

\begin{table}[h]
	\centering
        \caption{A caption for the table.}
\begin{tabular}{lr}
	\hline
	\textbf{Properties} & \textbf{Value} \\
	\hline
    Mass [kg] & 2,324 \\
    Height [m] & 558 \\
    Volume [m$^3$] & 4,072 \\
    \hline
\end{tabular}
\label{tab:table1}
\end {table}


\documentclass[fleqn, final]{../styles/unmphythesis}
\usepackage{../styles/qxd}
\renewcommand{\thechapter}{2}
%\newcommand{\thechapter}{1}

\makeindex
\begin{document}

%<*atomicphysicsformulas>

\chapter{Some useful formulas of atomic physics}\label{chap:summaryofatomicphysicsformulas}
We summarize some useful formulas for atoms presented in vacuum (including inside an optical cavity) in this appendix for us to generalize without proving some concepts for the nanophotonic waveguide case. We collect the formulas in various sources, which include but not limited to Refs.~\cite{Deutsch2010a,Kimble1998,Baragiola2014Open,Norris2014,Steck2007Quantum}.

\section{Spontaneous atomic decays}
Scalar polarizability of an atom:
\begin{align}
\alpha &=-\frac{|d_{eg}|^2}{\hbar (\Delta+i\Gamma/2)}, \,\, (\Delta=\omega-\omega_{eg}\equiv \omega-\omega_0),
\end{align}
where $ d_{eg} $ denotes the atomic momentum due to the dipole oscillations between $ \ket{g} $ and $ \ket{e} $ states, and $ \Gamma $ is the decay rate of the atom. In the dispersive interaction regime, one can usually ignore the imaginary part of the atomic polarizability as $ \Delta\gg \Gamma $~\cite{Deutsch2010a}, and hence
\begin{align}
\alpha \approx -\frac{|d_{eg}|^2}{\hbar\Delta}.
\end{align}

Decay rates (natural linewidth) of an atom in vacuum:
\begin{align}\label{eq:naturallinewidth}
\Gamma_{vac}=\Gamma_0 &= \frac{4}{3} \left( \frac{\omega_0}{c}\right)^3 \frac{|d_{eg}|^2}{\hbar}
\end{align}

When the atom is placed in a Gaussian laser field, the decay rate of the atom could be modified as
\begin{align}
\Gamma^{1D} &= \Gamma_g=2\pi \frac{|d_{eg}|^2}{\hbar A_{e\!f\!f}}\left(\frac{\omega_0}{c} \right),
\end{align}
where the scripts $ 1D $ and $ g $ indicate the effect is caused by the coupling to a quasi-1D propagating light field (guided), and $ A_{e\!f\!f} $ is the effective mode area of the beam. For commonly used atomic traps in free space, the TEM$_{00} $ mode is employed to probe atoms, which has an effective mode area given by
\begin{align}
A_{e\!f\!f} &= \frac{A}{|\mathbf{u}_{00}(\br')|^2}=\frac{A}{|\mathbf{u}_{00}(r'_\perp)|^2},
\end{align}
where $ \mathbf{u}_{00}(\br) $ is the TEM$_{00}$ mode of the Gaussian beam (see Appendix~\ref{chap:paraxialapproximation}), and $ A=\pi w_0^2/2 $ is the mode area at the $ z=0 $ plane with $ w_0 $ the waist radius of the mode.

We define the resonant cross section of an atom to be
\begin{align}
\sigma_0 &= \frac{3\lambda^2}{2\pi}=\frac{6\pi}{k_0^2}=\frac{6\pi c^2}{\omega_0^2},
\end{align}
and then the decay rate due to the coupling to the laser beam can be rewritten as
\begin{align}\label{Gamma1DGammavac_appendix}
\Gamma^{1\!D} &= \frac{1}{4} \frac{\sigma_0}{A_{e\!f\!f}}\Gamma_0.
\end{align}
On the other hand, due to the dispersive interaction from the atom, the optical mode of the input TEM$_{00}$ Gaussian laser beam will also yield a phase shift, $ \delta \phi $, given by
\begin{align}
\delta\phi &=2\pi \frac{\omega_0}{c A_{e\!f\!f}} \re[\alpha] = 2\pi \frac{\omega_0}{cA} \re[\alpha] |\mathbf{u}_{00}(\br')|^2 =-\frac{1}{A} \sigma_0 |\mathbf{u}_{00} (r'_{\!\perp})|^2 \frac{\Gamma_{vac}}{4\Delta},
\end{align}
We can also write
\begin{align}\label{phaseshiftGamma1D}
\delta\phi &= -2\pi \frac{|d_{eg}|^2}{\hbar \Delta} \frac{\omega_0}{cA_{e\!f\!f}}=-\frac{\Gamma^{1\!D}}{\Delta}.
\end{align}

In calculating the dipole moment of an atom, we use Eq.~\eqref{eq:opdmm'} based on the Wigner-Eckart theorem\index{Wigner-Eckart theorem} to define the dipole moment amplitude of $ \hat{\mathbf{d}}_q $ by~\cite{Deutsch2010a}
\begin{align}
&\quad \bra{j'f'm'}\hat{\mathbf{d}}_q\ket{jfm} = o_{jf}^{j'f'}C_{f'm'}^{f,m;1,q} \bra{j'}\lvert d\rvert\ket{j}\\
&= (-1)^{f'+i+j'+1}\sqrt{(2j'+1)(2f+1)}\left\{
\begin{array}{ccc}
	f' & i & j' \\
	j & 1 & f
\end{array}\right\}C_{f'm'}^{f,m;1,q} \bra{j'}\lvert d\rvert\ket{j},
\end{align}
where we denote $ i $ as the nuclear spin number, $o_{jf}^{j'f'}$ as the relative oscillator strengths, $C_{f'm'}^{f,m;1,q}$ as the Clebsch-Gordan coefficients, and $\bra{j'}\lvert d\rvert\ket{j}$ as the reduced dipole matrix elements.
Note that different research groups may define the transition amplitudes of the dipole operator in their own conventions, which leads to inconsistent definitions of the reduced matrix elements in literature.
In this dissertation, we can calculate the reduced matrix elements\index{reduced matrix element} using the experimentally measured partial lifetimes, $ \tau_{j'\!j} $, due to spontaneous emissions from $ j' $ to $ j $~\cite{Ding2012Corrections,McKeever2004,Arora2007Magic} by
\begin{align}
|\bra{j'}\lvert d\rvert\ket{j}|^2 = \frac{3\pi \epsilon_0\hbar c^3}{\omega_{j'\!j}^3\tau_{j'\!j}},\label{eq:reducedmatrixelements}
\end{align}
where $ \epsilon_0 $ is the dielectric constant of vacuum, and $ \omega_{j'\!j} $ is the resonance frequency of the $ j'\rightarrow j $ transition.
Note, here we use the convention for the reduced dipole matrix element given by Wigner~\cite{Wigner1959Group} and Rose~\cite{Rose1957Elementary}.
Whilst, Refs.~\cite{Ding2012Corrections} and~\cite{LeKien2013} by Ding, Kimble, Le Kien, Rauschenbeutel, \textit{et al.}, for example, use the convention of Racah~\cite{Racah1942Theory,Fano1959Irreducible} and Edmonds~\cite{Edmonds1957Angular}.
Their definition of the reduced matrix elements' square is $ (2j'+1) $ times greater than ours. Ref.~\cite{Steck2007Quantum}, as another example, defines the square of the reduced dipole matrix elements as $(2j'+1)/(2j+1)$ folds of our definition, where $ j $ and $ j' $ are defined with respect to states of lower to higher energy, respectively, rather than with respect to initial to final states.

\section{Relationship between measurement strength and scattering rates}
To avoid using reduced dipole moment elements and other quantities in a wrong unit, we can normalize some quantities in terms of characteristic scattering rates and field intensities.
Here are some basic relationships.

Starting from the saturation parameter,
\begin{align}
S(\Delta ) &\equiv \frac{\Omega^2/2}{\Delta^2+\frac{\Gamma^2}{4}} = \frac{S(0)}{4\Omega^2/\Gamma^2+1} \approx \frac{\Omega^2}{2\Delta^2} \quad (\text{for $\Delta^2\gg \Gamma^2$})\\
S(0) &= \frac{I}{I_{\rm sat}}= \frac{2\Omega^2}{\Gamma^2}\\
I_{\rm sat} &= \frac{\hbar \omega}{\sigma_0} \frac{\Gamma}{2}.\label{eq:Isatsigma0}
\end{align}
Therefore,
\begin{align}\label{eq:OmegaGamma}
\Omega^2 &= \frac{I}{I_{\rm sat}}\frac{\Gamma^2}{2}.
\end{align}

If we define a characteristic scattering rate as
\begin{align}
\gamma_s &\equiv \frac{\Gamma \Omega^2}{4\Delta_{\rm eff}^2},
\end{align}
then the relationships we have derived above (Eqs.~\ref{eq:OmegaGamma} and~\ref{eq:Isatsigma0}) will lead to
\begin{align}
\gamma_s &= \frac{\Gamma^3}{8\Delta_{\rm eff}^2} \frac{I}{I_{\rm sat}}\\
&= \sigma_0 \frac{\Gamma^2}{4\Delta_{\rm eff}^2}\frac{I}{\hbar \omega}.
\end{align}
This final step matches with the physical definition of $ \gamma_s $ that
\begin{align}
\gamma_s &\equiv N_e \Gamma =\frac{S(\Delta_{\rm eff})}{2} \Gamma\\
&\equiv \sigma(\Delta_{\rm eff}) \frac{I}{\hbar \omega},
\end{align}
where $ \sigma(\Delta)=\frac{\sigma_0}{1+\frac{4\Delta^2}{\Gamma^2}}\approx \sigma_0 \frac{\Gamma^2}{4\Delta^2} $.

We define $ I=\frac{P}{A_{\rm in}}= \frac{\hbar \omega }{A_{\rm in}} \dot{N}_L $, and then
\begin{align}
\gamma_s &= \frac{\sigma_0 }{A_{\rm in}} \frac{\Gamma^2}{4\Delta_{\rm eff}^2}\dot{N}_L.
\end{align}

In a typical spin-squeezing case, the measurement strength may be given by
\begin{align}
\kappa &= \chi_{\rm eff}^2 \dot{N}_L,
\end{align}
where $ \chi_{\rm eff}= \frac{\sigma_0}{A_{\rm eff}} \frac{\Gamma}{2\Delta_{\rm eff}} $.
Therefore,
\begin{align}
\kappa &= \frac{\sigma_0^2}{A_{\rm eff}^2} \frac{\Gamma^2}{4 \Delta_{\rm eff}^2} \dot{N}_L
= \frac{A_{\rm in}\sigma_0}{ A_{\rm eff}^2}\gamma_s.
\end{align}

%As an example of spin-squeezing parameter calculation using the formulas above, we plot in Fig.~\ref{fig:QNDproperty_magic44} the optimal peak spin squeezing parameter (with various atom numbers) and OD-related parameters.
%
%\begin{figure}
%\begin{minipage}{.49\linewidth}
%\centering
%\subfloat[]{\label{fig:xi_optimal_NA1000to5000_omega44}\includegraphics[scale=0.45]{./Figs/xi_optimal_NA1000to5000_omega44}}
%\end{minipage}
%\begin{minipage}{.49\linewidth}
%\centering
%\subfloat[]{\label{fig:OD_optimal_rp}\includegraphics[scale=0.45]{./Figs/OD_optimal_rp}}
%\end{minipage}
%\caption{QND measurement properties using the magic frequency $ \omega_{44} $. Subfigure~\protect\subref{fig:xi_optimal_NA1000to5000_omega44} shows the optimal peak spin squeezing parameter as a function of the radial position of the atom. Different atom numbers have been indicated in different types of lines. Subfigure~\ref{fig:OD_optimal_rp} shows the OD per atom parameters and the ratio of $ \kappa/\gamma_s $ as a function of atoms' radial position when the optimal quantization axis is chosen to plot Subfig.~\protect\subref{fig:xi_optimal_NA1000to5000_omega44}.}\label{fig:QNDproperty_magic44}
%\end{figure}

\section{Relationship between OD/atom and cooperativity}
For atoms prepared in some state, the $\mathrm{OD}/\mathrm{atom}$ can be defined as
\begin{align}
\mathrm{OD}/\mathrm{atom} &= \frac{\sigma_0 }{A_{\rm eff} },
\end{align}
where the geometric property of the waveguide or optical medium and the inner structure property of the atoms have been absorbed into the effective mode area factor $ A_{\rm eff} $.
While in cavity-QED, the concept of cooperativity is usually used to indicate the coupling strength between photons and atoms, and is equivalent to the cavity-to-free-space scattering ratio in the context of atomic cooling~\cite{Tanji-Suzukia2011,Vuletic2000,Kimble1998}.
In this part, we want to show that the  $\mathrm{OD}/\mathrm{atom}$ in the context of traveling wave and atom interaction has an equivalent definition as the cooperativity in the context of optical cavity QED.

Below, we consider a two-level atom interacting with an optical mode.
From Eq.~\ref{Gamma1DGammavac_appendix} in the context of nanofiber geometry, we have
\begin{align}
\frac{\Gamma^{1\!D}}{\Gamma} &=   \frac{\sigma_0}{A_{\rm eff}}= \mathrm{OD}/\mathrm{atom}.
\end{align}
The factor of $ \frac{1}{4} $ has been removed from Eq.~\ref{Gamma1DGammavac_appendix} when both propagating directions and polarizations of the modes are summed up in the equation above.

In the context of cavity-QED, the cooperativity per atom is defined as
\begin{align}
C_1 &= \frac{2 g^2}{\kappa \Gamma},
\end{align}
where $ g=\frac{d\cdot E}{\hbar} $ is the coupling constant between the atom and the cavity mode with reduced dipole momentum $ \mathbf{d}=-e\bra{j}|\br|\ket{j'} $, and $ \kappa  $ and $ \Gamma $ are the decay rates of the cavity and atom respectively.
One can use the relations that
\begin{align}
E &= \sqrt{\frac{2\pi\hbar \omega}{V_{\rm eff}}}\\
V_{\rm eff} &= A_{\rm eff} L\\
\kappa &= \frac{c}{2L} \frac{1}{F}\\
\Gamma &= \frac{4}{3}\frac{\omega^3}{c^3} \frac{d^2}{\hbar}
\end{align}
where $ F $ is the cavity finesse.
The cooperativity can be then rewrite as
\begin{align}
C_1 &= \frac{4\pi d^2 \omega}{\hbar A_{\rm eff}L}\cdot  \frac{2L}{c}F \cdot \frac{3}{4} \frac{c^3}{\omega^3} \frac{\hbar}{d^2} = \frac{6\pi c^2}{\omega^2} \frac{1}{A_{\rm eff}} F\\
&= \frac{3\lambda^2}{2\pi} \frac{1}{A_{\rm eff}} F = \frac{\sigma_0}{A_{\rm eff}} F\\
&= \frac{\mathrm{OD}}{\mathrm{atom}} F.
\end{align}

For a Fabry–Pérot type cavity, the finesse is defined as the number of round trip a photon can make before leaking out, which only depends on the mirror reflectivity of the cavity.
Alternatively, in terms of Q-factor, the finesse of a cavity can be written as $ F= Q\nu_F/\nu_0= Q \pi c/L\omega_0 $ with the Q-factor $ Q=\frac{\nu_0}{\delta\nu} $ and $ \nu_0 $ is the resonant frequency and $ \nu_F $ is the resonant frequency spacing~\cite{Saleh2007}.
Giving a Gaussian mode with mode waist $ W_0 $, the cooperativity of an atom in the cavity becomes
\begin{align}
C_1 &= \frac{\sigma_0}{\pi W_0^2} F = \frac{\sigma_0}{A} F = \frac{\mathrm{OD}}{\mathrm{atom}} F.
\end{align}
This result agrees with literature~\cite{Hunger2010}.

To increase the coupling strength between atoms and photons with a nanofiber, the atom number plays the role of cavity finesse in the context of optical cavity and relaxes the requirement of optical mode confinement in the dispersive regime.

%</atomicphysicsformulas>

\bibliographystyle{../styles/abbrv-alpha-letters-links}
%\bibliographystyle{unsrt}
% \nocite{*}
\bibliography{../refs/Archive}

\printindex

\end{document}