\documentclass[main.tex]{subfiles}
\begin{document}

\section{Canonical quantization}

\subsection{System with finite DoF}

\marginpar{Tuesday\\ 2020-5-12, \\ compiled \\ \today}

The classical structure of such a system is completely determined by the equations of motion:
%
\begin{subequations}
\begin{align}
\dot{q} &= \qty{q, H}  \\
\dot{p} &= \qty{p, H}
\,,
\end{align}
\end{subequations}
%
and by the commutation relations:
%
\begin{subequations}
\begin{align}
\qty{q^{i}, q^{j}} &= 0  \\
\qty{p_{i}, p_{j}} &= 0  \\
\qty{q^{i}, p_{j}} &= \delta_{j}^{i}
\,.
\end{align}
\end{subequations}

Note that these Poisson brackets are to be calculated at a fixed time.

We can \textbf{quantize} such a system by the following substitutions:
\begin{enumerate}
    \item the coordinates \(q\) and \(p\), which are functions of phase space in the classical case, become operators: \(X\) and \(P\), which in the Heisenberg picture are functions of time;
    \item the Poisson brackets \(\qty{\cdot, \cdot}\) become commutators:
    %
    \begin{align}
    \qty{a, b} \to \frac{1}{i \hbar} \qty[A, B]
    \,.
    \end{align}
\end{enumerate}

The Hamilton equations then read
%
\begin{subequations}
\begin{align}
\dv{X}{t} &= \frac{1}{i \hbar} \qty[X, H] \\
\dv{P}{t} &= \frac{1}{i \hbar} \qty[P, H]
\,,
\end{align}
\end{subequations}
%
and the commutation relations are also generalized; the interesting one is the position-momentum commutator which now reads
%
\begin{align}
\frac{1}{i \hbar} \qty[X,P] = 1 \implies
\qty[X, P] = i \hbar
\,.
\end{align}

\begin{claim}
The Heisenberg and Schrödinger descriptions of QM are equivalent.
\end{claim}

\begin{proof}
To say that the two approaches are equivalent means that they yield the same exact predictions for any observation.

In the Schrödinger approach, the wavefunction evolves as \(\ket{\psi (t)} = U(t) \ket{\psi_0 }\) while the observables are stationary; in the Heisenberg approach the wavefunction is stationary while the operators evolve as \(A(t) = U ^\dag A U\). So, the expectation value is
%
\begin{subequations}
\begin{align}
\expval{A(t)}_{\psi_0 } &\overset{?}{=} \expval{A}_{\psi (t)}  \\
\bra{\psi_0 } A(t) \ket{\psi_0 } &\overset{?}{=} \bra{\psi (t)} A \ket{\psi (t)} \\
\bra{\psi_0 } U ^\dag A U\ket{\psi_0 } &= \bra{\psi_0 } U ^\dag A U \ket{\psi_0 }
\,.
\end{align}
\end{subequations}
\end{proof}

\subsection{Field theory}

The evolution of the fields is given in classical field theory as
%
\begin{align}
\dot{\varphi} &= \qty{\varphi , t} &
\dot{\pi} &= \qty{\pi , t}
\,,
\end{align}
%
and we have the commutation relations
%
\begin{subequations}
\begin{align}
\qty{\varphi (x), \varphi (y)} &=0  \\
\qty{ \pi (x), \pi (y)} &= 0  \\
\qty{\varphi (x), \pi (y)} &= \delta^{(3)}(x-y)
\,,
\end{align}
\end{subequations}
%
all considered at constant time.

In order to \textbf{quantize} this system, we replace the fields \(\varphi \) and \(\pi \) by field operators \(\hat{\varphi}\) and \(\hat{\pi}\), and replace the Poisson brackets by commutators as in the finite-DoF case.

The equations of motion will then read
%
\begin{subequations}
\begin{align}
\dv{\hat{\varphi}}{t} &= \frac{1}{i \hbar} \qty[\hat{\varphi}, H] \\
\dv{\hat{\pi}}{t} &= \frac{1}{i \hbar} \qty[\hat{\pi}, H]
\,,
\end{align}
\end{subequations}
%
and the commutation relations will read
%
\begin{align}
\qty[\hat{\varphi}(x), \hat{\pi }(y)] = i \hbar \delta^{(3)}(x-y)
\,,
\end{align}
%
and the zero ones as usual between \(\varphi, \varphi \) and \(\pi , \pi \).
These commutators are always taken at constant time.

\subsection{Canonical quantization of a scalar field}

As we have seen before, the field and momentum of the free scalar field, which satisfies the Klein-Gordon equation, can be expressed as
%
\begin{subequations}
\begin{align}
\varphi (x) &= \frac{1}{(2\pi )^{3/2}} \int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}} \qty[a(k) e^{-ikx} + a^{\dag}(k) e^{ikx}]_{k^{0} =\omega_{k}} \\
\pi (x) &= \frac{1}{(2\pi )^{3/2}} \int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}} (-i \omega_{k}) \qty[a(k) e^{-ikx} - a^{\dag}(k) e^{ikx}]_{k^{0} =\omega_{k}}
\,,
\end{align}
\end{subequations}
%
and we will now interpret this as an operator expression: even if we omit the hats, \(\varphi \) and \(\pi \) are intended to be operators.
Therefore, \(a\) and \(a^{\dag}\) must also be.

\begin{claim}
We can invert this relation to get \(a\) and \(a^{\dag}\) in terms of \(\varphi \) and \(\pi \):
%
\begin{subequations}
\begin{align}
    a(k) = \frac{1}{(2 \pi )^{3/2}} \int \frac{ \dd[3]{x}}{\sqrt{2 \omega_{k}}} \qty[\omega_{k} \varphi + i \pi ] \eval{e^{ikx}}_{k^{0}= \omega_{k}} \\
    a^{\dag}(k) = \frac{1}{(2 \pi )^{3/2}} \int \frac{ \dd[3]{x}}{\sqrt{2 \omega_{k}}} \qty[\omega_{k} \varphi - i \pi ] \eval{e^{-ikx}}_{k^{0}= \omega_{k}} \\
    \,.
\end{align}
\end{subequations}
\end{claim}

\begin{proof}
Let us compute the interesting one:
%
\begin{subequations}
\begin{align}
\qty[a(k), a ^\dag (p)] &= \frac{1}{(2\pi )^3} \int \frac{ \dd[3]{x} \dd[3]{y}}{2 \omega_{k}}
\qty[\omega_{k} \varphi + i \pi, \omega_{k} \varphi - i \pi ] e^{i(k-p)x}  \\
&= \frac{1}{(2\pi )^3} \int \frac{ \dd[3]{x} \dd[3]{y}}{2 \omega_{k}}
2 i (-) \omega_{k} \qty[ \varphi, \pi ] e^{i(k-p)x}  \\
&= \frac{1}{(2\pi )^3} \int \frac{ \dd[3]{x} \dd[3]{y}}{2 \omega_{k}}
2 i \omega_{k} (-) i \delta^{(3)} (x - y) e^{i(kx-py)}  \\
&= \frac{1}{(2\pi )^{3/2}} \int \dd[3]{x} e^{i(k-p)x}  \\
&= \delta^{(3)} (k-p) \label{eq:commutator-annihilation-creation-operators}
\,.
\end{align}
\end{subequations}

We have used the fact that, by linearity and antisymmetry of the commutator:
%
\begin{subequations}
\begin{align}
\qty[\omega_{k} \varphi + i \pi, \omega_{k} \varphi - i \pi ]
&= \qty[\omega_{k} \varphi , \omega_{k} \varphi ]+ \qty[\omega_{k} \varphi , -i \pi ] + \qty[i \pi, \omega_{k} \varphi ] + \qty[i \pi , -i \pi ]  \\
&= -2 \omega_{k} i \qty[\varphi , \pi ]
\,.
\end{align}
\end{subequations}

For the other two the computation is similar, and the difference comes about in the commutator step: for \(\qty[a, a]\) we get
%
\begin{align}
\qty[\omega_{k} \varphi + i \pi, \omega_{k} \varphi + i \pi ] = 0
\,,
\end{align}
%
and for \(\qty[a ^\dag, a ^\dag]\):
%
\begin{align}
\qty[\omega_{k} \varphi - i \pi, \omega_{k} \varphi - i \pi ] = 0
\,,
\end{align}
%
since any operator commutes with itself.
\end{proof}

This algebra is the same one we would have for an infinite number of decoupled harmonic oscillators.
The operators \(a\) and \(a ^\dag\) are called the annihilation and creation operators.

\subsection{Number density operator}

Since, as we saw, the algebra of our operators resembles that of a harmonic oscillator, we are justified in defining the number density operator
%
\begin{align}
N(k) = a ^\dag  (k) a(k)
\,,
\end{align}
%
and the total number density,
%
\begin{align}
N = \int \dd[3]{k} N(k)
\,.
\end{align}

\begin{claim}
Both \(N\) and \(N(k)\) are self-adjoint: \(N = N ^\dag\), and they satisfy the following commutation relations:
%
\begin{subequations}
\begin{align} \label{eq:commutation-relations-number}
\qty[N(k), a(p)] &= - a(k) \delta^{(3)}(\vec{p} - \vec{k}) \\
\qty[N(k), a ^\dag(p)] &= + a ^\dag(k) \delta^{(3)}(\vec{p} - \vec{k}) \\
\qty[N, a(p)] &= - a(p)  \\
\qty[N, a ^\dag(p)] &= + a ^\dag(p)
\,.
\end{align}
\end{subequations}
\end{claim}

\todo[inline]{There is a typo in the notes by the professor: the argument of \(a\) and \(a ^\dag\) for the local commutators is \(k\), not \(p\).}

\begin{proof}
The computation goes as follows; I use subscripts as \(a(k) = a_k\) because it makes reading the expressions easier, I think:
%
\begin{subequations}
\begin{align}
\qty[N_k, a_p] &= N_k a_p - a_p N_k  \\
&= a_k a_k ^\dag a_p - a_p a_k a_k ^\dag  \\
&= - a_k a_p a_k ^\dag + a_k a_k ^\dag a_p \marginnote{Commuted \(a_p\)  and \(a_k\) --- their commutator is zero.}  \\
&= - a_k \qty[a_p, a_k ^\dag]  \\
&= - a_k \delta^{(3)} (p - k) \marginnote{Used relation \eqref{eq:commutator-annihilation-creation-operators}.}
\,.
\end{align}
\end{subequations}

The other computation is similar:
%
\begin{subequations}
\begin{align}
\qty[N_k, a_p ^\dag] &= N_k a_p ^\dag - a_p ^\dag N_k  \\
&= a_k a_k ^\dag a_p ^\dag - a_p ^\dag a_k a_k ^\dag  \\
&= - a_p ^\dag a_k a_k ^\dag + a_k a_p ^\dag a_k ^\dag  \\
&= - \qty[a_p, a_k ^\dag] a_k ^\dag  \\
&= - a_k ^\dag \delta^{(3)} (p - k)
\,.
\end{align}
\end{subequations}
%
while for the total number operator we only need to integrate over \(\dd[3]{k}\):
%
\begin{subequations}
\begin{align}
\int \dd[3]{k} \qty[N(k), a(p)] &= - \int \dd[3]{k} a(k) \delta^{(3)}(\vec{p} - \vec{k})  \\
\qty[N, a(p)] &= - a(p)
\,.
\end{align}
\end{subequations}
\end{proof}

\subsection{Hamiltonian and momentum density operators}

The Hamiltonian density for a real scalar field is given by
%
\begin{align}
\mathscr{H} = \frac{1}{2} \pi^2 + \frac{1}{2} \qty(\nabla \varphi )^2 + \frac{1}{2} m^2\varphi^2
\,,
\end{align}
%
and the total Hamiltonian is given by its integral over 3D space, which is given by
%
\begin{align}
H = \int \frac{ \dd[3]{k}}{2} \omega_{k} \qty[ a ^\dag (k) a(k) + a(k) a ^\dag (k)]
\,.
\end{align}

This can be derived without commuting \(a\) and \(a ^\dag\) anywhere; we can now get the desired expression in terms of the number operator by inserting a commutator:
%
\begin{subequations}
\begin{align}
H &= \int \frac{ \dd[3]{k} \omega_{k} }{2} \qty[2 a ^\dag a + \qty[a, a ^\dag]]   \\
&= \int \dd[3]{k} \omega_{k} N(k) + \int \frac{ \dd[3]{k} \omega_{k}}{2} \delta^{(3)} (k - k)
\,,
\end{align}
\end{subequations}
%
so the second term is proportional to \(\omega_{0} \delta^{(3)} (0)\), which diverges.
The first term, on the other hand, makes perfect sense: we count how many particles are at each energy, and add their energies to get the total.

Is the divergence a problem? Not really: Hamilton's equations only depend on the derivatives of \(H\), so a constant is not an issue.
Intuitively, we can imagine a regular quantum harmonic energy at each (continuous!) value of \(k\), so for each of those we will have a ground energy \( \omega \hbar /2\).

For the momentum we must integrate the \(T^{0i}\) components of the stress-energy tensor over \(\dd[3]{x}\): so, we find
%
\begin{align}
P^{i} &= \int \dd[3]{x} \pi (x) \partial_{i} \varphi
\,,
\end{align}
%
and for \(\pi \) and \(\varphi \) we must use the operator expressions in momentum space: so, we find
%
\begin{subequations}
\begin{align}
\begin{split}
P_{i}&= \frac{1}{(2 \pi)^3} \int \dd[3]{x}
\qty[
\int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
(-i \omega_{k}) \qty(a(k) e^{-ikx} - a ^\dag (k) e^{ikx})
] \times  \\
&\phantom{=}\
\times \qty[
\int \frac{ \dd[3]{k'}}{\sqrt{2 \omega_{k'}}}
\qty(-i k_i^{\prime } a(k') e^{-ik'x} +i k_i' a ^\dag (k') e^{ik'x})]
\end{split} \\
% \begin{split}
% &= \int \dd[3]{k'}
% \frac{1}{(2 \pi )^{3/2}} \int \dd[3]{x} e^{ik'x}
% \frac{1}{(2 \pi )^{3/2}} \int \dd[3]{k} e^{-ikx} \times \\
% &\phantom{=}\ \times
% \qty[ \frac{-i \omega_{k}}{\sqrt{2 \omega_{k}}} \qty(a(k) - a ^\dag(-k))
% \frac{1}{\sqrt{2 \omega_{k'}}} \qty(+i k_i' a(-k') + i k_i' a ^\dag(k'))
% ]
% \end{split} \\
% &= \int \frac{\dd[3]{k}}{2} \qty[-i \qty(a(k) - a ^\dag(-k)) \qty(i k_i a(-k) + i k_i a ^\dag (k))] \\
% &= \int \frac{\dd[3]{k}}{2} k_i\qty{ \qty(a(k) - a ^\dag(-k) ) \qty(a(-k) + a ^\dag (k))}  \\
% &= \int \frac{\dd[3]{k}}{2} k_i \qty{
% \underbrace{a(k) a (-k)}_{\text{odd}} + a (k) a ^\dag (k) - \underbrace{a ^\dag (-k) a (-k)}_{\text{change } k \to -k} - \underbrace{a ^\dag(-k) a ^\dag(k)}_{\text{odd}}
% }
% \\
% &= \int \frac{\dd[3]{k}}{2} k^{i} \qty{ a (k) a ^\dag (k) + a ^\dag (k) a (k)}
\begin{split}
&= \int \frac{ \dd[3]{x}}{(2 \pi )^3} \int \frac{ \dd[3]{k}}{2}
\int \frac{ \dd[3]{k'}}{\sqrt{\omega_{k} \omega_{k'}}}
(- \omega_{k} k_i')  \\
&\phantom{=}\
\bigg[
a(k) a(k') e^{-i (\omega_{k} + \omega_{k}') x_0 + i (\vec{k} + \vec{k}')\cdot \vec{x}}
-a(k) a ^\dag(k') e^{-i(\omega_{k} - \omega_{k}') x_0 + i (\vec{k} - \vec{k}')\cdot \vec{x}} \\
&\phantom{=}\ -a ^\dag(k) a(k') e^{-i (-\omega_{k} + \omega_{k}') x_0 + i (-\vec{k} + \vec{k}')\cdot \vec{x}}
+ a ^\dag(k) a ^\dag(k') e^{-i(-\omega_{k} - \omega_{k}') x_0 + i (-\vec{k} - \vec{k}')\cdot \vec{x}}
\bigg]
\end{split}  \\
\begin{split}
&= \int \frac{ \dd[3]{k}}{2}
\int \frac{ \dd[3]{k'}}{\sqrt{\omega_{k} \omega_{k'}}} (- \omega_{k} k_i')  \\
&\phantom{=}\
\bigg[
a(k) a(k') e^{-i (\omega_{k} + \omega_{k}') x_0} \delta^{(3)} (\vec{k} + \vec{k}')
-a(k) a ^\dag(k') e^{-i(\omega_{k} - \omega_{k}') x_0} \delta^{(3)}(\vec{k} - \vec{k}') \\
&\phantom{=}\ -a ^\dag(k) a(k') e^{-i (-\omega_{k} + \omega_{k}') x_0}
\delta^{(3)} (\vec{k} - \vec{k}')
+ a ^\dag(k) a ^\dag(k') e^{-i(-\omega_{k} - \omega_{k}') x_0} \delta^{(3)} (\vec{k} + \vec{k}')
\bigg]
\end{split}\\
&= \int \frac{ \dd[3]{k}}{2 \omega_{k}} (- \omega_{k} k_i)
\bigg[
- a(k) a(-k) e^{- 2i\omega_{k} x_0}
- a(k) a ^\dag(k)
- a ^\dag(k) a(k')
- a ^\dag(k) a ^\dag(-k) e^{2i\omega_{k} x_0}
\bigg]  \\
&= \int \frac{ \dd[3]{k}}{2} k_i \qty[a(k) a ^\dag (k) + a ^\dag(k) a(k)]
+ \underbrace{k_i \qty( a(k) a(-k) e^{- 2i\omega_{k} x_0} + a ^\dag(k) a ^\dag(-k) e^{2i\omega_{k} x_0} )}_{\text{odd under \(\vec{k} \to - \vec{k}\)}}
\,.
\end{align}
\end{subequations}

Now, as before we have the integral of \(a ^\dag a /2 + a a ^\dag /2\), and we can swap them getting a term proportional to \(\delta^{(3)} (0)\). This physically means that the vacuum has an infinite momentum, which we can ignore.

\todo[inline]{In the professor's notes the integral is reported as being over \(\dd[3]{x}\), but it is not!}

If we perform this operation, we get
%
\begin{align}
P_{i} = \int \dd[3]{k} k_i N(k)
\,.
\end{align}

\subsection{Normal ordering}

This sort of procedure is very common in QFT, so it has been given a name: the \textbf{normal ordering} of operators is the process of reordering them such that the creation operators \(a ^\dag\) are on the \emph{left} while the annihilation operators \(a\) are on the \emph{right}. This corresponds physically to the choice of the positive energy.

The notation we will use for the normal-ordering of a product of operators \(Q\) is \(N[Q]\). One can also find the notation \(: Q :\) used to mean the same thing.
As an example, consider:
%
\begin{align}
N[ a ^\dag(m) a(k_2 ) a ^\dag (k_3 ) a (k_4)]
= a ^\dag (m ) a ^\dag (k_3 ) a (k_2  ) a (k_4 )
\,.
\end{align}

This formalizes what we were doing before:
%
\begin{align}
N \qty[ \frac{a_k ^\dag a_k + a_k a_k ^\dag}{2}] = a_k ^\dag a_k
\,.
\end{align}

Since the order of the product is fixed inside the normal ordering, if we work inside the normal ordering all the creation and annihilation operators commute with each other, for our \textbf{scalar bosonic theory}.

Taking the normal ordering means we are fixing the energy of the vacuum.

Taking the normal ordering does not alter the harmonic oscillator algebra.

\subsection{Fock space}

Up until now wee have been writing operators without being really clear about what space they are acting on.
The space we need is called the \textbf{Fock space}: it is a space containing multiparticle states, and we will now construct it.

We start from a vacuum state \(\ket{0}\), which must satisfy
%
\begin{align}
\forall k :
a(k) \ket{0} = 0
\,,
\end{align}
%
which implies \(N(k) \ket{0} = 0\). This means that there are no particles.
\todo[inline]{Do we assume uniqueness? What do we do if there are several vacua?}

The Fock space is made up of all the states we can get by repeatedly applying the creation operators \(a ^\dag (k)\) for different values of \(k\).
Physically, each of these operators adds a particle to the state.

If we have a set of \(N\) momenta \(k_\ell\), and we want the state describing the presence of \(n_\ell\) particles for each, we use the state
%
\begin{align}
\ket{n_1 \dots n_N} \propto \qty(a ^\dag (k_1 ))^{n_1} \dots
\qty( a ^\dag (k_N))^{n_N} \ket{0}
\,.
\end{align}

The labels \(n_{\ell}\) are the \emph{occupation numbers}, indicating the number of particles in each momentum ``slot''.
The proportionality sign is there because we have not yet decided on the normalization we want for our states.

Let us then consider the properties of the states of this Fock space. For starters, the vacuum \(\ket{0}\) obeys
%
\begin{align}
N \ket{0} = H \ket{0} = \vec{p} \ket{0} = 0
\,,
\end{align}
%
which is consistent with there being no particles, since we have normalized the vacuum energy to zero.

Now, our one-particle state will look like
%
\begin{align}
\ket{1(p)} = C a ^\dag_p \ket{0}
\,,
\end{align}
%
for some constant \(C\).

\begin{claim}
This satisfies:
%
\begin{subequations}
\begin{align}
N \ket{1(p)} &= 1\ket{1(p)} \\
H \ket{1(p)} &= \omega_{p} \ket{1(p)} \\
\vec{p} \ket{1(p)} &= \vec{p} \ket{1(p)}
\,.
\end{align}
\end{subequations}
\end{claim}

\begin{proof}
We will need the properties outlined in the equations \eqref{eq:commutation-relations-number}. The computation is as follows:
%
\begin{subequations}
\begin{align}
N a ^\dag (p) \ket{0} &= \qty( N a ^\dag (p) - a ^\dag (p) N ) \ket{0}  \marginnote{We used the fact that \(N \ket{0} = 0\).}\\
&= \qty[N, a ^\dag (p)] \ket{0}  \\
&= a ^\dag(p) \ket{0} = \ket{1(p)}
\,.
\end{align}
\end{subequations}

For the energy the computation is similar:
%
\begin{subequations}
\begin{align}
H a ^\dag (p) \ket{0} &= \int \dd[3]{k} \omega_{k} N(k) a ^\dag (p) \ket{0}  \\
&= \int \dd[3]{k} \omega_{k} \qty[ N(k), a ^\dag (p)] \ket{0}  \\
&= \int \dd[3]{k} \omega_{k} a ^\dag(k) \delta^{(3)} (p-k) \ket{0}  \\
&= \omega_{p} a ^\dag (p) \ket{0}
\,.
\end{align}
\end{subequations}

For the momentum the steps are almost identical.
\end{proof}

One can construct an \(n\)-particle state (where all the particles have the same momentum) similarly, by applying \(a ^\dag\) \(n\) times: then the eigenvalues of \(N\), \(H\) and \(\vec{p}\) will be multiplied by \(n\).

Also, we can have states with many particles with different momenta: the energy, momentum and number will be the sum of the individual ones.

\subsection{Spin-statistics connection}

The procedure we have employed so far implicitly assumed we were using \textbf{Bose-Einstein} statistics, which is consistent with the fact that our field is spin-0.

This can be seen by the fact that in our Fock space we are allowing more than one particle to have the same momentum; also, the state vector does not change sign when we swap the particles, since \(a ^\dag_{p}\) and \(a ^\dag_{k} \) commute.

\subsection{Normalization of Fock states}

We start by setting \(\braket{0}{0}= 1\).
What do we do for states with stuff in them? If we were to set \(\ket{1} = a ^\dag _k \ket{0}\), we would have an issue:  if we wanted to compute the norm we would have
%
\begin{align}
\braket{1(k)}{1(p)} = \bra{0} a (k) a ^\dag (p) \ket{0} = \delta^{(3)} (k - p)
\,,
\end{align}
%
and we know that the Dirac delta is not covariant.
We can fix this issue: if we impose
%
\begin{align}
\ket{1(k)} = (2 \pi )^{3/2} \sqrt{2 \omega_{k}} a ^\dag_{k} \ket{0}
\,,
\end{align}
%
so that when we compute the modulus we get
%
\begin{align}
\braket{1(k)}{1(p)} = (2 \pi )^3 2 \omega_{k} \bra{0} a (k) a ^\dag (p) \ket{0} = % \delta^{(3)} (k - p) =
(2 \pi )^3 2 \omega_{k} \delta^{(3)} (k - p)
\,.
\end{align}

\begin{claim}
This is covariant.
\end{claim}

\begin{proof}
This is explained very well in Peskin's textbook \cite[section 3.5]{peskinConceptsElementaryParticle2019}.

We want to show that \(\omega_{k}  \delta^{(3)} (\vec{k} - \vec{p})\) is a Lorentz invariant (also a Poincarè invariant, but translation invariance is manifest). In order to do so, we must perform a boost: the system is spherically symmetric, so we choose arbitrarily to perform a boost in the direction \(z\), with parameter \(\beta \).

Then, we know that since \(p^{\mu }\) is a contravariant 4-vector it transforms like
%
\begin{subequations}
\begin{align}
E' &= \gamma (E - \beta p_{z}) \\
p_{x}' &= p_{x} \\
p_{y}' &= p_{y} \\
p_{z}' &= \gamma (p_{z} - \beta E)
\,.
\end{align}
\end{subequations}

In the expression \(\delta^{(3)} (\vec{k} - \vec{p})\) the only thing which changes is \(p_{z}\). The triple delta function is the tensor product of three deltas, but two of them are unchanged in the transformation.
So, we must check how \(\delta (k_{z} - p_{z})\) transforms: recall that
%
\begin{align}
\delta \qty(f(x)) = \frac{1}{\abs{\dv*{f}{x}}} \delta (x)
\,,
\end{align}
%
as long as \(f(x)\) has a single zero at \(x=0\), which holds in our case since Lorentz transforms are linear.

The conversion factor between the \(\delta \)s will be given by the inverse of the absolute value of
%
\begin{subequations}
\begin{align}
\pdv{p_{z}'}{p_{z}} &= \pdv{}{p_{z}} \qty(\gamma (p_{z} + \beta E))  \\
&= \gamma \qty(1 + \beta \pdv{E}{p_{z}})  \\
&= \gamma \qty(1 + \beta \frac{p_{z}}{E})  \\
&= \frac{\gamma \qty(E + \beta p_z)}{E} = \frac{E'}{E}
\,,
\end{align}
\end{subequations}
%
which means that the product \(E \delta^{(3)} (\vec{k} - \vec{p})\) is covariant.
\end{proof}

This makes sense: the covariant integration element is \(\dd[3]{p} / 2 E\), so if we want to apply the \(\delta \) linear functional to a Lorentz scalar function \(f(k)\) we can do it simply as
%
\begin{align}
\int \frac{ \dd[3]{p}}{2E} 2 E \delta^{(3)} (p-k) f (k)
\,,
\end{align}
%
which yields an invariant number.

\subsection{Field operators and particle interpretation}

Up until now we have been using the operators \(a\) and \(a ^\dag\) in momentum space, since their physical interpretation is more intuitive.
Let us now consider how to interpret the field operators \(\varphi \) and \(\pi \).

Recall, the real scalar field is given in general by
%
\begin{align}
\varphi (x) = \frac{1}{(2 \pi )^{3/2}}
\int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
\qty( a_k e^{-ikx} + a ^\dag_{k} e^{ikx}) = \varphi_{+} (x) + \varphi_{-} (x)
\,.
\end{align}

\begin{claim}
We have the following transition amplitudes:
%
\begin{subequations}
\begin{align}
\bra{0} \varphi_{+} (x) \ket{1(p)} &= e^{-ipx} \\
\bra{1(p)} \varphi_{-} (x) \ket{0} &= e^{ipx}
\,.
\end{align}
\end{subequations}
\end{claim}

\begin{proof}
In order to compute this we substitute in directly:
%
\begin{subequations}
\begin{align}
\bra{0} \varphi_{+} (x) \ket{1(p)} &=
\bra{0} \frac{1}{(2 \pi )^{3/2}}
\int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
e^{-ikx} a(k) \ket{1(p)}  \\
&= \bra{0} \frac{1}{(2 \pi )^{3/2}}
\int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
e^{-ikx} a(k) (2 \pi )^{3/2} \sqrt{2 \omega_{p}} a ^\dag (p) \ket{0}  \\
&= \braket{0}{0} \int \dd[3]{k} e^{-ikx} \delta^{(3)} (k-p) = e^{-ipx}
\,,
\end{align}
\end{subequations}
%
where we used the fact that \(a_k a ^\dag_p \ket{0} = \qty[a_k, a ^\dag_p] \ket{0}\).

For the other one the computation is similar: we work from the other direction.
\end{proof}

The interpretation for this is that the field operator \(\varphi_{+}\) can annihilate a particle with generic momentum \(p\) at the point \(x\) in space, since when we apply it to \(\ket{1(p)}\) the result is proportional to the vacuum. Similarly, \(\varphi_{-}\) can create a particle with completely undetermined momentum at the position \(x\).

\subsection{Covariant commutators} \label{sec:covariant-commutators}

In order to perform canonical quantization we started with the commutators at equal time between the fields \(\varphi \) and \(\pi \).
Are the expressions for these covariant?

We start by defining
%
\begin{subequations}
\begin{align}
D(x - y) &= \qty[\varphi (x), \varphi (y)]  \\
&= \qty[\varphi_{+} (x) + \varphi_{-} (x), \varphi_{+} (x) + \varphi_{-} (x)]  \\
&= \qty[\varphi_{+} (x), \varphi_{-} (x)] + \qty[\varphi_{-} (x), \varphi_{+} (x)]  \\
&= D_+ (x-y) + D_- (x-y)
\,.
\end{align}
\end{subequations}

The dependence of \(D\) would generally be on \(x\) and \(y\) separately, but if we assume translational invariance (and we always do) this reduces to \(x-y\).
We have used the fact that \(\varphi_{\pm}\) commute with themselves at different points: this can be computed as
%
\begin{align}
\qty[\varphi_{-}(x) , \varphi_{-}(y)] &=
\frac{1}{(2\pi )^{3}} \int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
\int \frac{\dd[3]{p}}{\sqrt{2 \omega_{p}}}
\qty[\hat{a}(k), \hat{a}(p)] e^{-ikx} e^{-ipy} = 0
\,,
\end{align}
%
since \(\qty[\hat{a}(k), \hat{a}(p)] = 0\). The computation for \(\varphi_{+}\) is analogous.

Then, we can compute \(D_{+} (x-y)\) similarly as well: we find
%
\begin{align}
D_{+} (x-y) &= \frac{1}{(2\pi )^3} \int \frac{ \dd[3]{k} }{2 \omega_{k}}
e^{-ik(x-y)} = - D_{-} (y-x)
\,.
\end{align}

Then, we can make use of the relation \(\sin(x) = \qty(e^{ix} - e^{-ix}) / 2i\) since we have the difference of two exponentials with opposite arguments: we find
%
\begin{align}
D(x-y) = \frac{-i}{(2 \pi )^3}
\int \frac{ \dd[3]{k}}{\omega_{k}} \sin(k (x-y))
\,,
\end{align}
%
which is covariant, but not \emph{manifestly} so: we need to manipulate it to see it.

\begin{claim}
The two \(D_{\pm } \) can be written as:
%
\begin{align} \label{eq:scalar-field-propagator}
    D_{\pm } (x-y) = i \int_{C_{\pm}} \frac{ \dd[4]{k}}{(2 \pi )^{4}} \frac{e^{-ik(x-y)}}{k^2- m^2}
    \,,
\end{align}
%
where \(C_{\pm}\) is a small clockwise contour in the complex plane around \(k_0 = \omega_{k}\). The integral is over all of 3D space --- the coordinates \(\vec{k}\) --- and over a complex contour for the coordinate \(k_0 \).
\end{claim}

\begin{proof}
The claim we want to prove is
%
\begin{subequations}
\begin{align}
D_{\pm} (x-y)
= i \int_{C_{\pm}} \frac{ \dd[4]{k}}{(2\pi )^{4}}
\frac{e^{-ik(x-y)}}{k^2 - m^2}
&\overset{?}{=}
\pm \frac{1}{(2 \pi)^3} \eval{\int \frac{ \dd[3]{k}}{2 \omega_{k}} e^{\mp ik (x-y)}}_{k_0 = \omega_{k}}  \\
\frac{i}{2 \pi }
\int_{C_{\pm}} \dd{k_0 } \frac{e^{-ik(x-y)}}{k^2-m^2}
&\overset{?}{=}
\pm \eval{\frac{e^{\mp ik(x-y)}}{2 \omega_{k}}}_{k_0 = \omega_{k}}
\,.
\end{align}
\end{subequations}

We do not write the \(\dd[3]{k}\) integral anymore and consider \(\vec{k}\) as fixed.

The complex residue theorem comes to our aid: it states that if we have a complex function \(f(z)\) and a closed contour \(\gamma \), then
%
\begin{align}
\int_{\gamma } f(z) \dd{z} = 2 \pi i \sum _{j} \Res_{z = a_j} f(z)
\,,
\end{align}
%
where \(a_j\) is a collection of the poles of the function which are contained in the contour \(\gamma \).

The \emph{residual} of the function \(f(z)\) at a pole \(a\) is the \(-1\)th coefficient in its Laurent series around \(a\), which is the expression
%
\begin{align}
f(z) = \sum _{j= - \infty }^{ \infty } c_j (z-a)^{j}
\,.
\end{align}

So, we have
%
\begin{align}
\frac{i}{2 \pi }
\int_{C_{\pm}} \dd{k_0}
\frac{e^{-ik(x-y)}}{k^2-m^2}
= - \Res_{k_0 = \pm \omega_{k}}
\frac{e^{-ik(x-y)}}{k^2-m^2}
\,,
\end{align}
%
and we can write \(k^2 - m^2 = k_0^2 - \abs{\vec{k}}^2 - m^2 = k_0^2 - \omega_{k}^2\); so that we need to take the residual of
%
\begin{align}
\frac{e^{-ik(k-y)}}{(k_0 - \omega_{k}) (k_0 + \omega_{k})}
\,.
\end{align}

We are working near \(k_0 = \omega_{k}\), where the exponential is basically constant.
For a first order pole like this, the residual is simple to compute:
%
\begin{subequations}
\begin{align}
\Res_{k_0 = \pm \omega_{k}}
\frac{e^{-ik(x-y)}}{(k_0 - \omega_{k}) (k_0 + \omega_{k})}
&= \lim_{k_0 \to \pm \omega_{k}}
(k_0 \mp \omega_{k})
\frac{e^{-ik(x-y)}}{(k_0 - \omega_{k}) (k_0 + \omega_{k})}  \\
&= \eval{\frac{e^{-ik(x-y)}}{(k_0 \pm \omega_{k})}}_{k_0 = \pm \omega_{k}}  \\
&= \pm \eval{\frac{e^{\mp ik (x-y)}}{2 \omega_{k}}}_{k_0 = \pm \omega_{k}}
\,,
\end{align}
\end{subequations}
%
as we desired. Note that we have switched the sign of the \(\vec{k}\) coordinates in the exponent: this would not be possible in general, but we are working implicitly inside of the \(\dd[3]{k} \) integral, so a map \(\vec{k} \to - \vec{k}\) does not pose an issue.
\end{proof}

\subsection{Covariance and microcausality} \label{sec:covariance-microcausality}

We have shown that \(D(x-y)\) are covariant under proper Lorentz transformations. Now we know that the commutator between two 4D points \(x\) and \(y\) is given by
%
\begin{align}
\qty[\varphi (x), \varphi (y)] = D(x-y)
\,,
\end{align}
%
but if we consider \(x\) and \(y\) to be along the same time-slice (that is, \(x_0 = y_0 \)), then we get back the equal-time commutator, which is equal to zero.

So, we get that \(D(x-y)\) must be equal to zero if \(x\) and \(y\) are generally spacelike separated, since any spacelike interval can be mapped onto another, and \(D\) must be covariant.

This is called a \textbf{microcausality} conditions: there cannot be influence between the creation and annihilation of particles if the two events are spacelike separated.

We cannot directly measure the fields, but observables are functions depending on them; it can be proven from the condition
%
\begin{align}
(x-y)^2<0 \implies
\qty[\varphi (x), \varphi (y)] = 0
\,,
\end{align}
%
that the commutator of two observables, \(\qty[A(x), B(y)] =0\) as well.

\subsection{Canonical quantization of a complex scalar field}

Similarly to the real case, we interpret the fields \(\varphi \), \(\pi = \partial_0 \varphi ^\dag\), \(\varphi^{*}\), \(\pi^{*} = \partial_{0} \varphi \), as operators acting on a Fock space of states.

The equal time commutators are given by substituting the Poisson brackets with \(-i\) times the commutator. We get:
%
\begin{align}
\qty[\varphi (\vec{x}, t), \pi (\vec{y}, t)] =
\qty[\varphi^{*} (\vec{x}, t), \pi^{*} (\vec{y}, t)] = i \delta^{(3)} (\vec{x} - \vec{y})
\,,
\end{align}
%
while all the other equal-time commutators vanish.

We know that the general solution  is given in terms of the operators \(a\) and \(b\); with its expression we find that the commutation relations between these are
%
\begin{align}
\qty[a(k), a ^\dag(p)] = \qty[b(k), b ^\dag (p)] &= \delta^{(3)} (k-p)
\,,
\end{align}
%
and all the others between these operators vanish.
So, we have two independent infinite sets of decoupled harmonic oscillators, describing particles with the same mass and arbitrary momenta.

\subsection{Summary}

We have the \textbf{number} density operators, \(\mathscr{N}_{a} (k) = a(k) ^\dag a(k)\) and \(\mathscr{N}_{b} (k) = b(k) ^\dag b(k)\).
Their integrals over \(\dd[3]{k}\) give the total number operators \(N_a\) and \(N_b\).

The \textbf{Hamiltonian} density is given by
%
\begin{align}
\mathscr{H}(x) = \pi ^\dag \pi
+ \qty(\vec{\nabla} \varphi ) ^\dag \qty(\vec{\nabla} \varphi )
+ m^2 \varphi ^\dag \varphi
\,,
\end{align}
%
and its integral is
%
\begin{align}
H = \int \dd[3]{x} \mathscr{H} =
\int \dd[3]{k} \omega_{k} \qty(\mathscr{N}_a (k) + \mathscr{N}_b (k))
\,.
\end{align}

The normal ordering is implied, by \(H\) we really mean \(N[H]\).

The \textbf{momentum} density operator is given by
%
\begin{align}
\mathscr{P}_{i} = \pi \qty(\partial_{i} \varphi )
+ \qty(\partial_{i} \varphi ) ^\dag \pi ^\dag
\,,
\end{align}
%
and its integral gives the total momentum:
%
\begin{align}
P_i = \int \dd[3]{x} \mathscr{P}_{i} = \int \dd[3]{k} k_i \qty(\mathscr{N}_a (k) + \mathscr{N}_b (k))
\,.
\end{align}

This is all analogous to the real case, but now we have an additional \(U(1)\) symmetry: this gives us a conserved current,
%
\begin{align}
J^{\mu }_{U(1)} = i q \qty[ \varphi ^\dag \qty(\partial^{\mu } \varphi )
- \qty(\partial^{\mu } \varphi )^\dag \varphi ]
\,,
\end{align}
%
whose associated charge is
%
\begin{align}
Q_{U(1)} = \int \dd[3]{x} J^{0}_{U(1)}
= \int \dd[3]{k} \qty(q \mathscr{N}_a (k) - q \mathscr{N}_b(k))
\,.
\end{align}

This has a direct physical interpretation: the particles which are created by \(a ^\dag\), carry a charge \(+q\), while the particles which are created by \(b ^\dag\) carry a charge \(-q\).

The \textbf{Fock space} is defined constructively just like the real case: the vacuum must satisfy \(a (k) \ket{0} = b(k) \ket{0} = 0\); we can create any pure Fock state by repeatedly applying \(a ^\dag\) and \(b ^\dag\).

\begin{claim}
If we denote these states, with the appropriate normalizations, by \(\ket{1(p)} \propto a ^\dag (p) \ket{0}\) and \(\ket{\overline{1} (p)} \propto b ^\dag(p) \ket{0}\), then we have:
%
\begin{subequations}
\begin{align} \label{eq:fock-one-particle-state-properties}
N \ket{1 (p)} &= 1 \ket{1 (p)} &
N \ket{\overline{1} (p)} &= 1 \ket{\overline{1} (p)}  \\
H \ket{1 (p)} &= \omega_{p} \ket{1 (p)} &
H \ket{\overline{1} (p)} &= \omega_{p} \ket{\overline{1} (p)}  \\
Q \ket{1 (p)} &= +q \ket{1 (p)} &
Q \ket{\overline{1} (p)} &= -q \ket{\overline{1} (p)}
\,.
\end{align}
\end{subequations}
\end{claim}

\begin{proof}
Let us show it for one of them:
%
\begin{subequations}
\begin{align}
N \ket{1 (p)} &\propto
\qty(\int \dd[3]{k} \qty(a ^\dag(k) a(k) + b ^\dag(k) b (k)))
a ^\dag (p) \ket{0}  \\
&= \int \dd[3]{k} \qty( a ^\dag (k) a (k) a ^\dag(p) + b ^\dag(k) b(k) a ^\dag (p)) \ket{0}  \\
&= \int \dd[3]{k} \qty( a ^\dag (k) \qty( a ^\dag(p) a (k) + \qty[a(k), a ^\dag(p)]) + b ^\dag(k) a ^\dag (p) b(k)) \ket{0}  \\
&= \int \dd[3]{k} a ^\dag (k) \qty[a(k), a ^\dag(p) ]  \ket{0}   \\
&= \int \dd[3]{k} \delta^{(3)} (k-p) a ^\dag(k) \ket{0} \\
&= a ^\dag(p) \ket{0}
\,.
\end{align}
\end{subequations}

The basic reasoning for the others is the same.
\end{proof}

As for the \textbf{commutators}, the same field calculated at different events in spacetime commutes with itself. On the other hand,
%
\begin{align}
\qty[ \varphi (x), \varphi ^\dag(y)]
= \qty[\varphi_{+} (x), \varphi ^\dag_{-} (y)]
+ \qty[\varphi_{-} (x), \varphi ^\dag_{+} (y)]
= D(x-y)
\,,
\end{align}
%
the same function we found in the real case.

\begin{claim}
\begin{align}
\qty[\varphi_{\pm} (x), \varphi ^\dag_{\mp}(y)] = D_{\pm} (x-y)
\,.
\end{align}
\end{claim}

\begin{claim}
The commutator between \(\varphi (x)\) and \(\pi (y)\) gives:
\end{claim}

Just like the real scalar field, we have microcausality.

\end{document}


\chapter{Tangent space}

\begin{problem}{1}
Show that $\mathfrak m(p):= \{\overline{\phi} \in \mathcal{E}(p) \mid \overline{\phi}(p) = 0 \}$ is the only maximal ideal of $\mathcal{E}(p).$
\end{problem}

\begin{problem}{2}
Show that if $p \in M^n$ and $n\neq 0$, then the ideal $\mathfrak m (p)$ in exercise 1 is not the only ideal $\neq 0$, $\mathcal{E}(p)$ of $\mathcal{E}(p).$
\end{problem}

\begin{problem}{3}
Show that if $f: M \rightarrow N$ is an embedding and $f(p) = q$, then the map $f^\ast: \mathcal{E}(q) \rightarrow \mathcal{E}(p)$ is surjective and $T_p(f)$ injective.
\end{problem}

\begin{problem}{4}
Show that the maximal ideal $\mathfrak m_n \subset \mathcal{E}_n$ is generated by the germs $\overline{x_1}, \ldots, \overline{x_n}$ of the coordinate functions.
\end{problem}

\begin{problem}{5}
Show that if $\mathfrak m_n \subset \mathcal{E}_n$ is the maximal ideal, then $m_n^k$ is the ideal of the germs $\overline{f}$, for which all partial derivatives of order $<k$ vanish at the origin.
\end{problem}

\begin{problem}{6}
Show that the Taylor series at the point zero defines a homomorphism $\mathcal{E}_n \rightarrow \R[[x_1, \ldots x_n]]$ into the ring of formal power series in $n$ variables. The kernel of this homomorphism is $\mathfrak m_n^\infty:= \bigcap_{k=1}^\infty \mathfrak m_n^k$.
\end{problem}

\begin{problem}{7}

\end{problem}

\begin{problem}{8}

\end{problem}

\begin{problem}{9}

\end{problem}

\begin{problem}{10}

\end{problem}

\begin{problem}{1}

\end{problem}

\begin{problem}{1}

\end{problem}


\documentclass{article}
\usepackage{algpseudocode}
\usepackage{algorithm}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{listings}
\usepackage{graphicx}
\usepackage[section]{placeins}
\usepackage{titlesec}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}
\pagestyle{fancy}
\fancyhf{}
\rhead{Rahul Shah}
\lhead{Machine Learning: Nanodegree}
\rfoot{\thepage}
\title{Supervised Learning: Naive Bayes Theorem}
\begin{document}
\maketitle
% I changed the example from the Udacity course because I felt it was too limiting
\section{Motivation}
We need to determine the likelihood of pulling a certain color ball from a bag. Without any prior information on the frequency of colors are inside the bag, it is reasonable to assume, with this information, that for a known number of colors, $n$, we can say the probability of pulling any given color $c_i\in C$ is $\frac{1}{n}$, where $C$ is the set of possible colors in the bag. If we are given information on the frequency of colors in the bag, like, the frequency of colors on different days, can we determine the likelihood of a ball of color $c_i$ being pulled out, given that we are doing the event on a Tuesday? Can we generalize this formula?

\section{Bayes' Theorem}
The probability of some event $A$ happening, given the prior information that $B$ happens, is $P(A|B) = \frac{P(A\cap B)}{P(B)} = \frac{P(B|A)P(A)}{P(B)}$. This theorem is quite simple and to the point, but it has many implications. For two sets, $A, A^c P(A|B) =  \frac{P(B|A)P(A)}{P(A)P(B|A) + P(A^c)P(B|A^c)}$. This is better covered in a statistics book. % ELABORATE WHEN YOU ACTUALLY LEARN IT

\subsection{False Positives}
Bayes' Theorem helps especially with misleading data. If you have a virus that occurs every 1 in n $(n >>> 1)$ people, and a test for the virus that is p\% accurate at predicting $p = 100 + \epsilon, \epsilon << 1$, testing more people will make it such that there will be more false positives than actual positives (try with odds of 1 in 10,000 and 99\% accurate test for virus, testing on 1 million people). So, a positive test does not tell us that you have the virus, because the chance is still in your favor to not have the virus, it just says you need to be further tested. A negative test, however, means it is very likely you do not have the virus. While we are talking givens, I feel it is apt to point out that if having the virus ($V$) shows symptoms ($S$), then our $P(V|S)$ becomes much higher, but the experiment earlier assumes no symptoms or a harmless virus.

\section{Algorithm}
This isn't going to have pseudo-code because it's a lot more about processing the data you have than an algorithm.
\subsection{The Naive Assumption}
The naive assumption consists of two parts:\\
$P(A\cap B) = P(A)P(B)$ (The events are independent)\\
$P(A|B)P(B) = \frac{P(B|A)P(A)}{P(B)} \rightarrow P(A|B) \propto \frac{P(B|A)P(A)}{P(B)}$\\

\subsection{Calculation}
If we are interested in the probability of some event $E$ happening, given some set $s_i\in S$ is occurring, $P(E|S) \propto P(S|E)P(E)=  \Pi{P(s_i|E)}*P(E)$, where all values to the right of the proportional to symbol are calculated using training data.

\end{document}

Machine_Learning/Naive Bayes' Theorem/Naive Bayes' Theorem.tex


%\documentclass[UTF8]{ctexart} % use larger type; default would be 10pt
\documentclass[a4paper]{article}
\usepackage{../mqc}

\numberwithin{equation}{section}

\title{Notes of \textbf{Modern Quantum Chemistry, Szabo \& Ostlund}}
\author{wsr}
\date{\today} % Activate to display a given date or no date (if empty),
         % otherwise the current date is printed

\begin{document}
% \boldmath
\maketitle

\tableofcontents

\newpage

\setcounter{section}{-1}
\section{Preface}
spatial mol orb -- $ \psi $ -- $ i,j,k,... $\\
spatial basis fxn -- $ \phi $ -- $ \mu,\nu,\lambda,... $\\
spin orb -- $ \chi $\\
occ mol orb -- $ a,b,c,... $\\
vir mol orb -- $ r,s,t,... $\\
exact many-elec wfn -- $ \Phi $\\
approx many-elec wfn -- $ \Psi $\\
exact energy -- $ \mathscr{E} $\\
approx energy -- $ E $

\section{Mathematical Review}
\subsection{}
\subsection{}
\subsection{}
\subsection{N-D Complex Vector Spaces}
Suppose
\begin{equation}\label{key}
\mathcal{O}\ket{a} = \ket{b}
\end{equation}
\begin{equation}\label{key}
\Braket{i | \mathcal{O} | j} = O_{ij}
\end{equation}
def the \textbf{adjoint} of $ \mathcal{O} $ as $ \mathcal{O}^\dagger $
\begin{equation}\label{key}
\bra{a}\mathcal{O}^\dagger = \bra{b}
\end{equation}
\begin{equation}\label{key}
\Braket{i | \mathcal{O}^\dagger | j} = O_{ji}^*
\end{equation}

\subsubsection{Change of Basis}
\begin{equation}\label{key}
\ket{\alpha} = \sum_i\ket{i}\braket{i | \alpha} = \sum_i\ket{i} U_{i\alpha}
\end{equation}
\begin{equation}\label{key}
\ket{i} = \sum_\alpha \ket{\alpha}\braket{i | \alpha} = \sum_\alpha \ket{\alpha} U_{i\alpha}^*
\end{equation}
If $ i, \alpha $ are all orthonormal, $ \vb{U} $ must be unitary.

\begin{equation}\label{key}
\Omega_{\alpha\beta} = \Braket{\alpha | \mathcal{O} | \beta} = ... \sum_{ij} U_{\alpha i}^* O_{ij} U_{j\beta}
\end{equation}
or
\begin{equation}\label{key}
\bm\Omega = \vb{U}^\dagger \vb{O} \vb{U}
\end{equation}

\section{Many-electron Wave Functions and Operators}
\subsection{The Electronic Problem}
\subsubsection{Atomic Units}
\subsubsection{The B-O Approximation}
\subsubsection{The Antisymmetry or Pauli Exclusion Principle}
\subsection{Orbitals, Slater Determinants, and Basis Functions}
\subsubsection{Spin Orbitals and Spatial Orbitals}
\subsubsection{Hartree Products}
\subsubsection{Slater Determinants}
def
\begin{equation}\label{key}
\ket{\chi_i(\vb{x}_1)\chi_j(\vb{x}_2)\cdots\chi_k(\vb{x}_N)}
\equiv \dfrac{1}{\sqrt{N!}}
\mqty| \chi_i(\vb{x}_1) & \chi_j(\vb{x}_1) & \cdots & \chi_k(\vb{x}_1)\\
        \chi_i(\vb{x}_2) & \chi_j(\vb{x}_2) & \cdots & \chi_k(\vb{x}_2)\\
        \vdots & \vdots & & \vdots \\
        \chi_i(\vb{x}_N) & \chi_j(\vb{x}_N) & \cdots & \chi_k(\vb{x}_N)|
\end{equation}
It can be further shortened to
\begin{equation}\label{key}
\ket{\chi_i\chi_j\cdots\chi_k}
\end{equation}
\subsubsection{The Hartree-Fock Approximation}
\subsubsection{The Minimal Basis $ \ce{H_2} $ Model}
gerade, ungerade
\subsubsection{Excited Determinants}
Suppose the ground state det
\begin{equation}\label{key}
\ket{\psi_0} = \ket{\chi_1\cdots\chi_a\cdots\chi_b\cdots\chi_N}
\end{equation}
thus, singly excited det
\begin{equation}\label{key}
\ket{\psi_a^r} = \ket{\chi_1\cdots\chi_r\cdots\chi_b\cdots\chi_N}
\end{equation}
\begin{equation}\label{key}
\ket{\psi_{ab}^{rs}} = \ket{\chi_1\cdots\chi_r\cdots\chi_s\cdots\chi_N}
\end{equation}

How does program determine what dets can exist? by gerade/ungerade?

\subsection{Operators and Matrix Elements}
\subsubsection{Minimal Basis $ \ce{H_2} $ Matrix Elements}

\subsubsection{Notations for 1- and 2-Electron Integrals}
For spin orb,\\
physicists'
\begin{equation}\label{key}
\Braket{ij|kl} = \Braket{\chi_i(1)\chi_j(2) | \dfrac{1}{r_{12}} | \chi_k(1)\chi_l(2)}
\end{equation}
\begin{equation}\label{key}
\Braket{ij||kl} = \Braket{ij|kl} - \Braket{ij|lk}
\end{equation}
chemists'
\begin{equation}\label{key}
[ij|kl] = \Braket{\chi_i(1)\chi_j(1) | \dfrac{1}{r_{12}} | \chi_k(2)\chi_l(2)}
\end{equation}
For spatial orb
\begin{equation}\label{key}
(ij|kl) = \Braket{\psi_i(1)\psi_j(1) | \dfrac{1}{r_{12}} | \psi_k(2)\psi_l(2)}
\end{equation}

\subsubsection{General Rules for Matrix Elements}
\begin{enumerate}
	\item $ \ket{K} = \ket{\cdots m n\cdots} $
	\begin{equation}\label{key}
	\Braket{K | \mathscr{H} | K} = \sum_m^N \Braket{m|h|m} + \dfrac{1}{2}\sum_m^N\sum_n^N \Braket{mn||mn} = \sum_m^N [m|h|m] + \dfrac{1}{2}\sum_m^N\sum_n^N \qty([mm|nn] - [mn|nm])
	\end{equation}
	or (Since $ [mm|mm] - [mm|mm] = 0 $)
	\begin{equation}\label{key}
	\Braket{K | \mathscr{H} | K} = \sum_m^N [m|h|m] + \sum_m^N\sum_{n>m}^N \qty([mm|nn] - [mn|nm])
	\end{equation}
	\item $ \ket{K} = \ket{\cdots m n\cdots} $, $ \ket{L} = \ket{\cdots p n\cdots} $
	\begin{equation}\label{key}
	\Braket{K | \mathscr{H} | L} = \Braket{m|h|p} + \sum_n^N \Braket{mn||pn} = [m|h|p] + \sum_n^N \qty([mp|nn] - [mn|np])
	\end{equation}
	\item $ \ket{K} = \ket{\cdots m n\cdots} $, $ \ket{L} = \ket{\cdots p q\cdots} $
	\begin{equation}\label{key}
	\Braket{K | \mathscr{H} | L} = \Braket{mn||pq} = [mp|nq] - [mq|np]
	\end{equation}
\end{enumerate}

\subsection{Second Quantization}
\subsubsection{Creation and Annihilation Operators and Their Anticommutation Relations}
\begin{equation}\label{key}
a_i^\dagger a_j^\dagger + a_j^\dagger a_i^\dagger = 0 \quad a_i a_j + a_j a_i = 0
\end{equation}
\begin{equation}\label{key}
\{a_i, a_j^\dagger\} \equiv a_i a_j^\dagger + a_j^\dagger a_i = \delta_{ij}
\end{equation}

\subsection{Spin-Adapted Configurations}
\subsubsection{Spin Operators}
total spin
\begin{align}
\hat{\mathscr{P}} &= \sum_i^N \hs(i)\\
\hsS_x &= \sum_i^N \hs_x(i)\\
\hsS_+ &= \sum_i^N \hs_+(i)\\
\hsS^2 &= \hsS_+\hsS_- - \hsS_z + \hsS_z^2
\end{align}
\begin{align}
\hsS^2\ket{\Phi} &= S(S+1)\ket{\Phi}\\
\hsS_z\ket{\Phi} &= M_S\ket{\Phi}
\end{align}
\begin{equation}\label{key}
\hsS_z\ket{ij\cdots k} = \dfrac{1}{2}(N^\alpha - N^\beta)\ket{ij\cdots k}
\end{equation}

\subsubsection{Restricted Determinants and Spin-Adapted Configurations}
\begin{equation}\label{key}
\ket{^1\Psi_1^2} = \dfrac{1}{\sqrt{2}}(\ket{1\bar{2}} + \ket{\bar{1}2})
= \dfrac{1}{\sqrt{2}}(\psi_1(1)\psi_2(2)\alpha(1)\beta(2) - \psi_2(1)...)
\end{equation}

\section{The Hartree-Fock Approximation}
\subsection{The HF Equations}
\subsubsection{The Coulomb and Exchange Operators}
\begin{equation}\label{key}
\mathscr{J}_b(1) = \int\dd x_2 \chi_b^*(2)r_{12}^{-1} \chi_b(2)
\end{equation}
\begin{align}\label{key}
\mathscr{K}_b(1) &= \int\dd x_2 \chi_b^*(2) r_{12}^{-1} \hsP_{12} \chi_b(2) \\
&= \int\dd x_2 \chi_b^*(2) r_{12}^{-1} \chi_b(1) \hsP_{12}
\end{align}
\begin{align}
\Braket{\chi_a(1) | \mathscr{J}_b(1) | \chi_a(1)} &= J_{ab} \\
\Braket{\chi_a(1) | \mathscr{K}_b(1) | \chi_a(1)} &= K_{ab}
\end{align}
\subsubsection{The Fock Operator}
\subsection{Derivation of the HF Equations}
\subsubsection{Functional Variation}
\subsubsection{Minimization of the Energy of a Single Determinant}
\subsubsection{The Canonical HF Equations}

\subsection{Interpretation of Solutions to the HF Equations}
\subsubsection{Orbital Energies and Koopmans' Theorem}
\begin{align}\label{key}
\varepsilon_i &= \Braket{i|h|i} + \sum_b \Braket{ib||ib} \\
&= \Braket{i|h|i} + \sum_b \qty(\Braket{ib|ib} - \Braket{ib|bi})
\end{align}
\paragraph{Koopmans' Theorem}
\begin{equation}\label{key}
\text{IP} = -\varepsilon_a \quad
\text{EA} = -\varepsilon_r
\end{equation}
Koopmans' EA is often bad.
\subsubsection{Brillouin's Theorem}
\begin{equation}\label{key}
\Braket{\Psi_0 | \mathscr{H} | \Psi_a^r} = 0
\end{equation}

\subsubsection{The HF Hamiltonian}
\begin{equation}\label{key}
\mathscr{H}_0 = \sum_i^N f(i)
\end{equation}

\subsection{Restricted Closed-shell HF: The Roothaan Equations}
\subsubsection{Closed-shell HF: Restricted Spin Orbitals}
\begin{equation}\label{key}
E_0 = 2\sum_a h_{aa} + \sum_a\sum_b(2J_{ab} - K_{ab})
\end{equation}

\subsubsection{Introduction of a Basis: The Roothaan Equations}

\subsubsection{The Charge Density}

\subsubsection{Expression for the Fock Matrix}

\subsubsection{Orthogonalization of the Basis}
\begin{equation}\label{key}
\vb{X}^\dagger \vb{S} \vb{X} = \iden
\end{equation}
$ \vb{S} $ can be diagonalized by unitary matrix $ \vb{U} $:
\begin{equation}\label{key}
\vb{U}^\dagger \vb{S} \vb{U} = \vb{s}
\end{equation}
\paragraph{Symmetric Orthogonalization}
\begin{equation}\label{key}
\vb{X} = \vb{S}^{-1/2} = \vb{U}\vb{s}^{-1/2}\vb{U}^\dagger
\end{equation}
(linear dependence must be removed)
\paragraph{Canonical Orthogonalization}
\begin{equation}\label{key}
\vb{X} = \vb{U}\vb{S}^{-1/2} = \vb{U}\vb{s}^{-1/2}\vb{U}^\dagger
\end{equation}
Suppose $ \vb{s} $ has $ m $ small values, we make a truncated $ K\cross (K-m) $matrix
\begin{equation}\label{key}
\tilde{\vb{X}} = ...
\end{equation}
thus
\begin{equation}\label{key}
\phi_\mu' = \sum_\nu^K \phi_\nu \tilde{X}_{\nu\mu} \qquad \mu = 1,2,\cdots,K-m
\end{equation}
However, calculate 2e integrals in transformed matrix is very time-consuming.\\
Since
\begin{equation}\label{key}
\bm\phi' = \bm\phi \vb{X}
\end{equation}
\begin{equation}\label{key}
\bm\psi = \bm\phi \vb{C}
\end{equation}
we have
\begin{equation}\label{key}
\bm\psi = \bm\phi' \vb{X}^{-1} \vb{C}
\end{equation}
Let
\begin{equation}\label{key}
\vb{C}' = \vb{X}^{-1} \vb{C} \qquad or \; \vb{C} = \vb{X}\vb{C}'
\end{equation}
thus
\begin{equation}\label{key}
\vb{F} \vb{X}\vb{C}' = \vb{S} \vb{X}\vb{C}' \bm\varepsilon
\end{equation}
\begin{equation}\label{key}
(\vb{X}^\dagger \vb{F}\vb{X}) \vb{C}' = (\vb{X}^\dagger \vb{S}\vb{X}) \vb{C}' \bm\varepsilon = \vb{C}'\bm\varepsilon
\end{equation}
def:
\begin{equation}\label{key}
\vb{F}' = \vb{X}^\dagger \vb{F}\vb{X}
\end{equation}

\subsubsection{The SCF Procedure}
P. 148\\
I think $ \vb{C}' $ should be $ (K-m)\cross K $.

\subsubsection{Expectation Values and Population Analysis}
\begin{equation}\label{key}
N = \sum_\mu\sum_\nu P_{\mu\nu} S_{\mu\nu} = \tr \vb{PS}
\end{equation}
Mulliken:
\begin{equation}\label{key}
q_A = Z_A - \sum_{\mu\in A}(\vb{PS})_{\mu\mu}
\end{equation}
L\"owin:
\begin{equation}\label{key}
q_A = Z_A - \sum_{\mu\in A}(\vb{S}^{1/2} \vb{P} \vb{S}^{1/2})_{\mu\mu}
\end{equation}

\subsection{Model Calculations on \ce{H_2} and \ce{HeH^+}}
\subsubsection{The $ 1s $ Minimal STO-3G Basis Set}
\begin{equation}\label{key}
\alpha = \alpha_{(\zeta=1.0)}\cross \zeta^2
\end{equation}
\subsubsection{STO-3G \ce{H_2}}

\subsubsection{An SCF Calculation on STO-3G \ce{HeH^+}}

\subsection{Polyatomic Basis Sets}
\subsubsection{Contracted Gaussian Functions}
Notation: (pGTO)/[cGTO] (ignore $ p_x,p_y,... $)
\begin{table}[H]
	\begin{tabular}{cc}
		STO-3G & (6s3p/3s)/[2s1p/1s]\\
		4-31G & (8s4p/4s)/[3s2p/2s] \\
		T. Dunning (JCP 1970) & (9s5p/4s)/[3s2p/2s] \\
		6-31G* (sph) & (10s4p1d)/[3s2p1d/2s] \\
		6-31G** (sph) & (10s4p1d/4s1p)/[3s2p1d/2s1p]
	\end{tabular}
\end{table}
\subsubsection{Minimal Basis Sets: STO-3G}

\subsubsection{Double Zeta Basis Sets: 4-31G}

\subsubsection{Polarized Basis Sets: 6-31G* and 6-31G**}
What's D polarized basis?\\
Cartesian: $ xx, yy, zz, xy, yz, xz  $\\
Spherical: $ 3z^2-r^2, x^2-y^2, xy, yz, zx $, ($ r^2 $ is removed)

\subsection{Some Illustrative Closed-shell Calculations}
\subsubsection{Total Energies}

\subsubsection{Ionization Potentials}

\subsubsection{Equilibrium Geometries}

\subsubsection{Population Analysis and Dipole Moments}

\subsection{Unrestricted Open-shell HF: The Pople-Nesbet Equations}
\subsubsection{Open-shell HF: Unrestricted Spin Orbitals}
\begin{equation}\label{key}
f^\alpha(1) = h(1) + \sum_a^{N_\alpha}\qty[J_a^\alpha(1) - K_a^{\alpha}(1) ] + \sum_a^{N_\beta} J_a^\beta(1)
\end{equation}
\begin{equation}\label{key}
E_0 = \sum_a h_{aa} + \dfrac{1}{2}\sum_a^{N_\alpha}\sum_b^{N_\alpha} (J_{ab}^{\alpha\alpha} - K_{ab}^{\alpha\alpha}) + \dfrac{1}{2}\sum_a^{N_\beta}\sum_b^{N_\beta} (J_{ab}^{\beta\beta} - K_{ab}^{\beta\beta})
+ \sum_a^{N_\alpha}\sum_b^{N_\beta} J_{ab}^{\alpha\beta}
\end{equation}

\subsubsection{Introduction of a Basis: The Pople-Nesbet Equations}
\begin{align}
\vb{F}^\alpha \vb{C}^\alpha = \vb{S} \vb{C}^\alpha \bm\varepsilon^\alpha \\
\vb{F}^\beta \vb{C}^\beta = \vb{S} \vb{C}^\beta \bm\varepsilon^\beta
\end{align}

\subsubsection{Unrestricted Density Matrices}
spin density
\begin{equation}\label{key}
\rho^S(\vb{r}) = \rho^\alpha(\vb{r}) - \rho^\beta(\vb{r})
\end{equation}
\begin{equation}\label{key}
\vb{P}^S = \vb{P}^\alpha - \vb{P}^\beta
\end{equation}

\subsubsection{Expression for the Fock Matrices}
\begin{align}
F^\alpha_{\mu\nu} &= H^{\core}_{\mu\nu} + \sum_\lambda\sum_\sigma \qty[ P^T_{\lambda\sigma}(\mu\nu|\sigma\lambda) - P^\alpha_{\lambda\sigma}(\mu\lambda|\sigma\nu)] \\
F^\beta_{\mu\nu} &= H^{\core}_{\mu\nu} + \sum_\lambda\sum_\sigma \qty[ P^T_{\lambda\sigma}(\mu\nu|\sigma\lambda) - P^\beta_{\lambda\sigma}(\mu\lambda|\sigma\nu)]
\end{align}

\subsubsection{Solution of the Unrestricted SCF Equations}

\subsubsection{Illustrative Unrestricted Calculations}

\section{Configuration Interaction}
\subsection{Multiconfigurational Wave Functions and the Structure of Full CI Matrix}
\begin{enumerate}
	\item
	\begin{equation}\label{key}
	\Braket{\Psi_0 | \mathscr{H} | S} = 0
	\end{equation}
	\item
	Slater dets which differ by $ >2 $ spin orbitals are zero.\\
	Non-zero blocks are sparse.
	\item
	Single excitations have a very small effect on the ground state energy, but not small for dipole and excited states.
\end{enumerate}

\subsubsection{Intermediate Normalization and an Expression for the Correlation Energy}
Intermediate Normalization:
\begin{equation}\label{key}
\ket{\Phi_0} = \ket{\Psi_0} + ...
\end{equation}
thus
\begin{equation}\label{key}
\Braket{\Psi_0|\Phi_0} = 0
\end{equation}
thus
\begin{equation}\label{key}
E_{\corr} = \Braket{\Psi_0 | \mathscr{H} - E_0 | \Phi_0} = \sum_{c<d,t<u} c_{cd}^{tu} \Braket{\Psi_0 | \mathscr{H} | \Psi_{cd}^{tu}}
\end{equation}

\subsection{Doubly Exited CI}
\begin{align}
\sum_{c<d,t<u} c_{cd}^{tu} \Braket{\Psi_0 | \mathscr{H} | \Psi_{cd}^{tu}} &= E_{\corr} \\
\Braket{\Psi_{ab}^{rs} | \mathscr{H} | \Psi_0} + \sum_{c<d,t<u} c_{cd}^{tu} \Braket{\Psi_{ab}^{rs} | \mathscr{H} - E_0 | \Psi_{cd}^{tu}} &= c_{ab}^{rs} E_{\corr}
\end{align}
def
\begin{align}
B_{rasb} &= \Braket{\Psi_{ab}^{rs} | \mathscr{H} | \Psi_0} \\
D_{rasb,tcud} &= \Braket{\Psi_{ab}^{rs} | \mathscr{H} - E_0 | \Psi_{cd}^{tu}} \\
c_{rasb} &= c_{ab}^{rs}
\end{align}
thus
\begin{equation}\label{key}
\mqty(0 & \vb{B}^\dagger\\ \vb{B} & \vb{D})\mqty(1\\ \vb{c}) = E_{\corr} \mqty(1\\ \vb{c})
\end{equation}
then diagonalize.\\
Another way:
\begin{equation}\label{key}
E_{\corr} = -\vb{B}^\dagger (\vb{D} - E_{\corr}\iden)^{-1} \vb{B}
\end{equation}
solve it iteratively.

\subsection{Some Illustrative Calculations}

\subsection{Natural Orbitals and the 1-Particle Reduced DM}
reduced density function
\begin{equation}\label{key}
\rho(\vb{x}_1) = N\int \dd\vb{x}_2\cdots\dd\vb{x}_N \Phi^*(\vb{x}_1,\cdots,\vb{x}_N)\Phi(\vb{x}_1,\cdots,\vb{x}_N)
\end{equation}
1st-order reduced DM, or 1-P reduced DM
\begin{equation}\label{key}
\gamma(\vb{x}_1,\vb{x}'_1) = N\int \dd\vb{x}_2\cdots\dd\vb{x}_N \Phi^*(\vb{x}_1,\cdots,\vb{x}_N)\Phi(\vb{x}'_1,\cdots,\vb{x}_N)
\end{equation}
\begin{equation}\label{key}
\gamma(\vb{x}_1,\vb{x}'_1) = \sum_{ij} \chi_i(\vb{x}_1) \gamma_{ij} \chi_j^*(\vb{x}'_1)
\end{equation}
def an orthonormal basis $ \{\eta_i\} $ (natural spin orb),
\begin{equation}\label{key}
\eta_i = \sum_k \chi_k U_{ki}
\end{equation}
\begin{equation}\label{key}
\gamma(\vb{x}_1,\vb{x}'_1) = \sum_{kl} \eta_k(\vb{x}_1) (\vb{U}^\dagger\bm\gamma\vb{U})_{kl} \eta_l^*(\vb{x}'_1)
\end{equation}
def
\begin{equation}\label{key}
\bm\lambda = \vb{U}^\dagger\bm\gamma\vb{U}
\end{equation}
find a $ \vb{U} $ to make $ \bm\lambda $ diagonal, thus
\begin{equation}\label{key}
\gamma(\vb{x}_1,\vb{x}'_1) = \sum_{i} \lambda_i \eta_i(\vb{x}_1)  \eta_j^*(\vb{x}'_1)
\end{equation}
$ \lambda_i $ is called the occupation number of the natural spin orbs.

\subsection{The MCSCF and the GVB Methods}

\subsection{Truncated CI and the Size-consistency Problem}
Truncated CI is not size-consistent.

\section{Pair and Coupled-pair Theories}
\subsection{The Independent Electron Pair Approximation}
Full CI
\begin{equation}\label{key}
E_{\corr} = \sum_{a<b} e_{ab}
\end{equation}
\begin{equation}\label{key}
e_{ab} = \sum_{r<s} c_{ab}^{rs} \Braket{\Psi_0 | \sH | \Psi_{ab}^{rs}}
\end{equation}

IEPA: Do CID for each pair separately.\\
Do some approx., we get Epstein-Nesbet pair corr. E:
\begin{equation}\label{key}
e_{ab}^{\text{EN}} = -\sum_{r<s} \dfrac{\abs{\Braket{\Psi_0|\sH|\Psi_{ab}^{rs}}}^2}{\Braket{\Psi_{ab}^{rs} | \sH - E_0 | \Psi_{ab}^{rs}}}
\end{equation}
more approx., first-order pair E:
\begin{equation}\label{key}
e_{ab}^{\text{FO}} = \sum_{r<s} \dfrac{\abs{\Braket{\Psi_0|\sH|\Psi_{ab}^{rs}}}^2}{\varepsilon_a + \varepsilon_b - \varepsilon_r - \varepsilon_s}
\end{equation}

\subsubsection{Invariance under Unitary Transformations: An Example}
2 independent \ce{H_2} \\
MOs localized on the 2 monomers: $ 1_1, 2_1, 1_2, 2_2 $\\
delocalized MOs:
\begin{align}
a &= \dfrac{1}{\sqrt{2}} (1_1 + 1_2) \\
b &= \dfrac{1}{\sqrt{2}} (1_1 - 1_2) \\
r &= \dfrac{1}{\sqrt{2}} (2_1 - 2_2) \\
s &= \dfrac{1}{\sqrt{2}} (2_1 + 2_2)
\end{align}
\subsubsection{Some Illustrative Calculations}
IEPA is not variational.\\
IEPA is not invariant to unitary tranformations.\\
works bad for \ce{Ne} and \ce{N_2}.

\subsection{Coupled-pair Theories}
Ignore single, triple, etc.
\begin{equation}\label{key}
\ket{\Phi_0} = \ket{\Psi_0} + \sum_{a<b,r<s} c_{ab}^{rs} \ket{\Psi_{ab}^{rs}} + \sum_{a<b<c<d,r<s<t<u} c_{abcd}^{rstu} \ket{\Psi_{abcd}^{rstu}} + \cdots
\end{equation}
then
\begin{align}
& \sum_{c<d, t<u} \Braket{\Psi_0 | \sH | \Psi_{cd}^{tu}} c_{cd}^{tu} = E_{\corr} \label{Ecorr}\\
& \Braket{\Psi_{ab}^{rs} | \sH | \Psi_0} + \sum_{c<d, t<u} \Braket{\Psi_{ab}^{rs} | \sH - E_0 | \Psi_{cd}^{tu}} c_{cd}^{tu} + \sum_{c<d, t<u} \Braket{\Psi_{ab}^{rs} | \sH | \Psi_{abcd}^{rstu}} c_{abcd}^{rstu} = E_{\corr} c_{ab}^{rs} \notag\\
& \cdots
\end{align}
How to truncate/decouple?\\
~\\
$ c_{abcd}^{rstu} := 0 \; \dra $ CID,\\
or, use CC.

\subsubsection{The Coupled-cluster Approximation}
Suppose
\begin{equation}\label{key}
c_{abcd}^{rstu} \approx c_{ab}^{rs} * c_{cd}^{tu} = ...
\end{equation}
thus
\begin{equation}\label{key}
\begin{aligned}
\Braket{\Psi_{ab}^{rs} | \sH | \Psi_0} &+ \sum_{c<d, t<u} \Braket{\Psi_{ab}^{rs} | \sH - E_0 | \Psi_{cd}^{tu}} c_{cd}^{tu} \\
&+ \sum_{c<d, t<u} \Braket{\Psi_{ab}^{rs} | \sH | \Psi_{abcd}^{rstu}} (c_{ab}^{rs} * c_{cd}^{tu}) = \qty(\sum_{c<d, t<u} \Braket{\Psi_0 | \sH | \Psi_{cd}^{tu}} c_{cd}^{tu}) c_{ab}^{rs}
\end{aligned}
\end{equation}
after some tricks
\begin{equation}\label{key}
\begin{aligned}
\Braket{\Psi_{ab}^{rs} | \sH | \Psi_0} &+ \sum_{c<d, t<u} \Braket{\Psi_{ab}^{rs} | \sH - E_0 | \Psi_{cd}^{tu}} c_{cd}^{tu} \\
&+ \sum_{c<d, t<u} \Braket{\Psi_0 | \sH | \Psi_{cd}^{tu}} \qty(c_{ab}^{rs} c_{cd}^{tu} - < c_{ab}^{rs} * c_{cd}^{tu} > ) = \qty(\sum_{c<d, t<u} \Braket{\Psi_0 | \sH | \Psi_{cd}^{tu}} c_{cd}^{tu}) c_{ab}^{rs}
\end{aligned}
\end{equation}
\begin{equation}\label{cca}
%\begin{aligned}
\Braket{\Psi_{ab}^{rs} | \sH | \Psi_0} + \sum_{c<d, t<u} \Braket{\Psi_{ab}^{rs} | \sH - E_0 | \Psi_{cd}^{tu}} c_{cd}^{tu}
- \sum_{c<d, t<u} \Braket{\Psi_0 | \sH | \Psi_{cd}^{tu}} < c_{ab}^{rs} * c_{cd}^{tu} > = 0
%\end{aligned}
\end{equation}
along with \eqref{Ecorr}, we get the energy of Coupled-Pair Many-Electron Theory (CPMET), aka CCA.\\
CCA is derived by J. \v{C}i\v{z}ek and J. Paldus.\\

CC is size-consistent.

CC is invariant to unitary transformations of degenerate orbitals.

But, CC is not variational.

\subsubsection{The Cluster Expansion of the Wave Function}

\subsubsection{Linear CCA and the Coupled-Electron Pair Approximation}
linear CCA: set $ < c_{ab}^{rs} * c_{cd}^{tu} > = 0 $ in \eqref{cca}\\
\begin{equation}\label{key}
E_{\corr}(\text{L-CCA}) = -\vb{B}^\dagger \vb{D}^{-1}\vb{B}
\end{equation}
L-CCA is size-consistent. L-CCA is unitary invariant.

CEPA: set $ < c_{ab}^{rs} * c_{cd}^{tu} > = c_{ab}^{rs}c_{ab}^{tu} $
\begin{equation}\label{key}
e_{ab} = \sum_{t<u} \Braket{\Psi_0 | \sH | \Psi_{ab}^{tu}} c_{ab}^{tu}
\end{equation}
\begin{equation}\label{key}
\Braket{\Psi_{ab}^{rs} | \sH | \Psi_0} + \sum_{c<d,t<u} \Braket{\Psi_{ab}^{rs} | \sH-E_0 | \Psi_{cd}^{tu}}c_{cd}^{tu} = e_{ab}c_{ab}^{rs}
\end{equation}
\begin{equation}\label{key}
E_{\corr}(\text{CEPA}) = \sum_{a<b} e_{ab}
\end{equation}

\subsubsection{Some Illustrative Calculations}

\subsection{Many-electron Theories with Single Particle Hamiltonians}
\subsubsection{The Relaxation Energy via CI, IEPA, CEPA and CCA}

\subsubsection{The Resonance Energy of Polyenes in H\"uckel Theory}

\section{Many-body Perturbation Theory}
\subsection{RS Perturbation Theory}

\subsection{Diagrammatic Representation of RS Perturbation Theory}
\subsubsection{Diagrammatic Perturbation Theory for Two States}
\subsubsection{Diagrammatic Perturbation Theory for $ N $ States}
\subsubsection{Summation of Diagrams}

\subsection{Orbital Perturbation Theory: One-Particle Perturbations}

\subsection{Diagrammatic Representation of Orbital Perturbation Theory}

\subsection{Perturbation Expansion of the Correlation Energy}
MPPT:
\begin{equation}\label{key}
E_0^{(0)} = \sum_a \varepsilon_a
\end{equation}
\begin{equation}\label{key}
E_0^{(1)} = -\dfrac{1}{2}\sum_{ab} \Braket{ab||ab}
\end{equation}
\begin{align}
E_0^{(2)} = %\sum_{n\neq 0} \dfrac{V_{n0}^2
\sum_{a<b,r<s} \dfrac{\abs{\Braket{ab||rs}}^2}{\varepsilon_a + \varepsilon_b - \varepsilon_r - \varepsilon_s}
\end{align}

\subsection{The $ N $-dependence of the RS Perturbation Expansion}

\subsection{Diagrammatic Representation of the Perturbation Expansion of the Correlation Energy}
\subsubsection{Hugenholtz Diagrams}
\begin{itemize}
	\item H1. numerator  $\ra \dis\prod_{\text{dot}}\Braket{in,in || out,out} $
	\item H2. denominator $\ra \dis\prod_{\text{adjacent dots}}\qty(\sum \varepsilon_{\text{holes}} - \sum \varepsilon_{\text{particles}})  $
	\item H3. sign $ \ra (-1)^{h+l} $ ($ h $: \# of holes; $ l $: \# of closed loops)
	\item H5. weight factor $ 2^{-k} $ ($ k $: \# of equivalent line pairs)
\end{itemize}

\subsubsection{Goldstone Diagrams}

\subsubsection{Summation of Diagrams}

\subsubsection{What Is the Linked-Cluster Theorem?}
RS perturbation theory is size-consistent

\subsection{Some Illustrative Calculations}

\section{The 1-Particle Many-body Green's Function}
\subsection{Green's Function in Single-Particle Systems}
Solve Eq for $ \vb{a} $
\begin{equation}\label{key}
(E\iden - \vb{H}_0) \vb{a} = \vb{b} \;\ra\; \vb{G}_0(E) = (E\iden - \vb{H}_0)^{-1}
\end{equation}
%\begin{equation}\label{key}
%\vb{a} = (E\iden - \vb{H}_0)^{-1} \vb{b}
%\end{equation}
%def
%\begin{equation}\label{key}
%\vb{G}_0(E) = (E\iden - \vb{H}_0)^{-1}
%\end{equation}
%thus
%\begin{equation}\label{key}
%a_i = \sum_j [\vb{G}_0(E)]_{ij} b_j
%\end{equation}

\begin{equation}\label{key}
(E - \mathscr{H}_0)a(x) = b(x) \;\ra\;
G_0(x,x',E) = \sum_\alpha \dfrac{\psi_\alpha(x) \psi_\alpha^*(x')}{E - E_\alpha^{(0)}}
\end{equation}

\subsection{The 1-Particle Many-body Green's Function}
HF Green's function
\begin{equation}\label{key}
G_0(\vb{x}, \vb{x}', E) = \sum_i \dfrac{\chi_i(\vb{x})\chi_i^*(\vb{x}')}{E - \varepsilon_i}
\end{equation}
\begin{equation}\label{key}
[G_0(E)]_{ij} = \dfrac{\delta_{ij}}{E - \varepsilon_i}
\end{equation}
i.e.
\begin{equation}\label{key}
\vb{G}_0(E) = (E\iden - \bm\varepsilon)^{-1}
\end{equation}

\subsubsection{The Self-Energy}
Dyson equation
\begin{equation}\label{key}
\vb{G}(E) = \vb{G}_0(E) + \vb{G}_0(E)\bm\Sigma(E)\vb{G}(E)
\end{equation}

\subsubsection{The Solution of the Dyson Equation}

\subsection{Application of the Formalism to \ce{H_2} and \ce{HeH^+}}

\renewcommand\thesection{\Alph{section}}
\setcounter{section}{0}
\section{Integral Evaluation with 1s Primitive Gaussians}

\section{2-Electron Self-consistent-field Program}

\section{Analytic Derivative Methods and Geometry Optimization}
\subsection{Introduction}

\subsection{General Considerations}
\begin{equation}\label{key}
E(\vb{X}_1) = E(\vb{X}) + \vb{q}^\dagger \vb{f}(\vb{X}) + \dfrac{1}{2}\vb{q}^\dagger \vb{H}(\vb{X}) \vb{q} + \cdots
\end{equation}
where
\begin{align}
& \vb{q} = \vb{X}_1 - \vb{X} && f_i = \pdv{E(\vb{X})}{X_i} && H_{ij} = \pdv{E(\vb{X})}{X_i}{X_j} &
\end{align}
\begin{equation}\label{key}
\vb{f}(\vb{X}_1) = \vb{f}(\vb{X}) + \vb{H}(\vb{X})\vb{q}
\end{equation}
%At stationary point
%\begin{equation}\label{key}
%E(\vb{X}_1) = E(\vb{X}_e) + \dfrac{1}{2}\vb{q}^\dagger \vb{H}(\vb{X}_e) \vb{q}
%\end{equation}
Let $ \vb{X}_1 = \vb{X}_e $
\begin{equation}\label{key}
\vb{f}(\vb{X}) = - \vb{H}(\vb{X})\vb{q}
\end{equation}
i.e.
\begin{equation}\label{key}
\vb{q} = - \vb{H}^{-1}(\vb{X})\vb{f}(\vb{X})
\end{equation}

\subsection{Analytic Derivatives}
for HF
\begin{align}
\pdv{E}{X_A} &= \sum_{\mu\nu} P_{\nu\mu} \pdv{H_{\mu\nu}^{\core}}{X_A}
+ \dfrac{1}{2}\sum_{\mu\nu\lambda\sigma} P_{\nu\mu}P_{\lambda\sigma} \pdv{(\mu\nu||\sigma\lambda)}{X_A}
+ \pdv{V_{NN}}{X_A} \notag\\
&\quad {}
+ \sum_{\mu\nu} \pdv{P_{\nu\mu}}{X_A} H_{\mu\nu}^{\core}
+ \sum_{\mu\nu\lambda\sigma} \pdv{P_{\nu\mu}}{X_A}P_{\lambda\sigma} (\mu\nu||\sigma\lambda) \notag\\
&= ... \notag\\
&= \sum_{\mu\nu} P_{\nu\mu} \pdv{H_{\mu\nu}^{\core}}{X_A}
+ \dfrac{1}{2}\sum_{\mu\nu\lambda\sigma} P_{\nu\mu}P_{\lambda\sigma} \pdv{(\mu\nu||\sigma\lambda)}{X_A}
+ \pdv{V_{NN}}{X_A} \notag\\
&\quad {} - \sum_{\mu\nu} Q_{\nu\mu} \pdv{S_{\mu\nu}}{X_A}
\end{align}
where
\begin{equation}\label{key}
Q_{\nu\mu} = 2\sum_a \varepsilon_a C_{\mu a} C_{\nu a}
\end{equation}

\subsection{Optimization Techniques}

\subsection{Some Optimization Algorithms}
\paragraph{Nelder-Mead Optimization}
\begin{verbatim}
find(h)
while(true):
  X* = (1+a) Xbar - a X[h]
  if Emin < E* < E[h] :
    update(X[h], X*)
  elif E* < Emin:
    X** = v X* + (1-v) Xbar
    if E** < Emin:
      update(X[h], X**)
    else:
      update(X[h], X*)
  else:
    X** = b X[h] + (1-b) Xbar
    if E** > E[h]:
      pass
    else:
      update(X[h], X**)
\end{verbatim}

\paragraph{Quasi-Newton Optimization}~\\
Murtagh-Sargent
\begin{equation}\label{key}
\vb{q}_n = -\alpha_{n-1}\vb{G}_{n-1}\vb{f}_{n-1}
\end{equation}
\begin{enumerate}
	\item Set $ \alpha_0 = 1 $ and $ \vb{G_0} = \iden $.\\
	While ($ E_1 > E_0 $) set $ \alpha_0 \leftarrow \alpha_0/2 $
	\item
	\begin{align}
	\vb{U}_k &= -\alpha_{k-1}\vb{G}_{k-1}\vb{f}_{k-1} - \vb{G}_{k-1} (\vb{f}_k - \vb{f}_{k-1}) = -\vb{G}_{k-1}[\vb{f}_k + \vb{f}_{k-1}(\alpha_{k-1}-1)] \\
	a_k^{-1} &= \vb{U}_k^\dagger \vb{d}_k = \vb{U}_k^\dagger (\vb{f}_k - \vb{f}_{k-1}) \\
	T_k = \vb{U}_k^\dagger\vb{U}_k
	\end{align}
	if $ a_k^{-1} < 10^{-5} T_k $ or $ a_k\vb{U}_k^\dagger\vb{f}_{k-1} > 10^{-5} $, goto step 1\\
	else
	\begin{align}
	\vb{G}_k &= \vb{G}_{k-1} + a_k\vb{U}_k\vb{U}_k^\dagger \\
	\alpha_k &= 1
	\end{align}
	\item
	\begin{align}
	\vb{q}_k &= -\alpha_{k-1}\vb{G}_{k-1}\vb{f}_{k-1} \\
	%E_k &= \text{getE}(\vb{X}_k) \\
	\end{align}
\end{enumerate}

\subsection{Transition States}

\subsection{Constrained Variation}

\section{Molecular Integrals for \ce{H_2} as a Function of Bond Length}

\end{document}


%auto-ignore
\providecommand{\MainFolder}{..}
\documentclass[\MainFolder/Text.tex]{subfiles}

\begin{document}

\section{Canonical dIBL-structures on cyclic cochains of de Rham cohomology} \label{Sec:Manifold1}
\allowdisplaybreaks
%Proof of Proposition~\ref{Proposition:TwistedIBLSphere}
%\newlength{\messyeqjot}
%\setlength{\messyeqjot}{8pt}
%\def\IncSpace{\setlength{\jot}{\messyeqjot}
%\setlength{\abovedisplayskip}{1.5\messyeqjot}
%\setlength{\belowdisplayskip}{1.5\messyeqjot}}
Let $M$ be an oriented closed Riemannian manifold of dimension $n$.
We consider the following graded vector spaces:
$$\begin{aligned}
\DR^*(M) &\;\,\dots && \text{smooth de Rham forms}, \\
\Harm^*(M) &\;\,\dots &&\text{harmonic forms}, \\
\H_{\mathrm{dR}}^*(M) &\;\,\dots && \text{de Rham cohomology}.
\end{aligned}$$
Since $M$ is fixed, we often write just $\DR$, $\Harm$ and~$\HDR$.
We consider the Hodge decomposition $\DR=\Harm\oplus\Im\Dd\oplus\Im\CoDd$, where~$\Dd$ is the de Rham differential and~$\CoDd$ the codifferential.
We call the corresponding projection
\begin{equation}\label{Eq:HarmProj}
\pi_\Harm: \DR^*(M) \longrightarrow \Harm^*(M)
\end{equation}
the \emph{harmonic projection} and the induced isomorphism $\pi_\Harm: \H_{\mathrm{dR}} \rightarrow \Harm$ mapping a cohomology class into its unique harmonic representative the \emph{Hodge isomorphism}.

\begin{Notation}[Updated notation for bar complexes] \label{Def:DeRham}
We use Notation~\ref{Def:Notation} for $V=\DR{}$, $\Harm{}$, $\H_{\mathrm{dR}}{}$ and $A=n-3$ with the following changes:
$$\tilde{v}\sim \eta \in V,\quad v \sim \alpha\in V[1],\quad w\sim \omega \in \BCyc V, \quad \W\sim \Omega\in \BCyc V[n-3]. $$
We use the formal symbols $\Susp$ and $\SuspU$ with $\Abs{\Susp} = n - 3$ and $\Abs{\SuspU} = -1$, so that $\alpha = \SuspU \eta$ and $\Omega = \Susp \omega$.
\end{Notation}
%
%\begin{Remark} \label{Rem:SignConv}
%Originally, the author used the following degree shift convention instead of~\eqref{Eq:DegreeShiftConv}:
%$$ (\Susp^{l}_*\widebar{\Susp}^{k*} f)(\Susp^{k} \psi_1 \otimes \dotsb \otimes \psi_k ) = (-1)^{k \Abs{s}\Abs{f} + \frac{1}{2}k(k-1) \Abs{s}} \Susp^l f(\psi_1 \otimes \dotsb \otimes \psi_k). $$
%It is namely a natural extension of the Koszul convention compatible with all common Koszul identifications and the composition in the dg-category. Here $\DeSusp$ denotes the inverse to $\Susp$ with degree $\Abs{\widebar{\Susp}} = - \Abs{\Susp}$, $\Susp_*^l f = \Susp^l \circ f$, $\DeSusp^{k*}f = (-1)^{k \Abs{s}\Abs{f}} f\circ \DeSusp^k$, and the sign $(-1)^{\frac{1}{2}k(k-1) \Abs{s}} = \varepsilon(\Susp, \DeSusp)$ comes from colliding $\DeSusp_1\dots \DeSusp_k \Susp_1 \dots \Susp_k \mapsto \DeSusp_1 \Susp_1 \dots \DeSusp_k \Susp_k = \Id$.
%Notice that according to this convention a sign appears in~\eqref{Eq:EvaluationConvention}. The reason for a ``canonical'' sign convention was to explain some artificial signs in~\cite[Chapters 10--12]{Cieliebak2015} and develop an invariant framework in which the signs for the de Rham case, i.e., the canonical Fr\'echet $\dIBL$-structure from \cite[Chapter~13]{Cieliebak2015} (will appear in \cite{MyPhD}) and the formal pushforward Maurer-Cartan element (see Definition~\ref{Def:PushforwardMCdeRham}), could be deduced naturally. However, Claims 4 and 5 which handle disconnected graphs in the proof of~\cite[Theorem 11.3]{Cieliebak2015} do not seem to hold using this convention. Eventually, instead of the left-right Koszul convention, the top-bottom convention from~\cite{Cieliebak2015} was adopted:
%
%As we mentioned before Definition~\ref{Def:CircS}, we think of $f: \DBCyc \Harm(M)[3-n]^{\otimes k} \rightarrow \DBCyc \Harm(M)[3-n]^{\otimes l}$ as of a Riemannian surface with $k$ incoming ends at the top and $l$ outgoing ends at the bottom (c.f.\ the schematic formulas~\eqref{Eq:TwisteddIBL}). Inputs $\Psi_i$ are fed to the ends at the top and $f(\Psi_1\otimes \dotsb \otimes \Psi_k)$ is evaluated on $\Omega_1\otimes \dotsb \otimes \Omega_l$ by feeding $\Omega_i$ to the ends at the bottom. A (partial) composition of two maps is then viewed as putting the corresponding Riemannian surfaces on top of each other, together with an appropriate number of trivial cylinders so that the number of incoming and outgoing ends in between is equal, and gluing them together at the opposing ends (see~\cite[Figure~2]{Cieliebak2015}).
%\end{Remark}

\begin{Proposition}[De Rham cyclic dga's]\label{Prop:DGAs}
Let $M$ be an oriented closed Riemannian manifold of dimension $n$. The quadruple $(\DR(M), \Pair, m_1, m_2)$ with the operations from~\eqref{Eq:DeRhamDGA} is a cyclic dga of degree $2-n$.
% (see Definition~\ref{Def:CyclicAinfty}).
For the operations before the degree shift, we have
\begin{align*}
\tilde{m}_1(\eta_1) & = \Dd \eta_1, \\[\jot]
\tilde{m}_2(\eta_1, \eta_2) &= \eta_1 \wedge \eta_2, \\
\tilde{\Pair}(\eta_1, \eta_2) &=  \int_M \eta_1 \wedge \eta_2 \eqqcolon (\eta_1,\eta_2),
\end{align*}
where $\Dd$ is the de Rham differential, $\wedge$ the wedge product and $\tilde{\mathcal{P}}$ the \emph{intersection pairing}.
%We call it the \emph{de Rham algebra} and denote simply by $\H_{\mathrm{dR}}(M)$.
The operations restrict to $\H_{\mathrm{dR}}(M)$ and make $(\H_{\mathrm{dR}}(M),\Pair,m_1\equiv 0,m_2)$ into a cyclic dga.
If we define $\mu_1 \equiv 0$ and
\begin{equation}\label{Eq:HarmProd}
\mu_2(\alpha_1, \alpha_2) \coloneqq \pi_{\Harm}(m_2(\alpha_1, \alpha_2))\quad \text{for all }\alpha_1, \alpha_2 \in \Harm(M)[1],
\end{equation}
then $(\Harm(M), \Pair, \mu_1, \mu_2)$ is a cyclic dga as well, and $\pi_\Harm: \H_{\mathrm{dR}} \rightarrow \Harm$ is an isomorphism of cyclic dga's.
All three dga's $\DR$, $\H_{\mathrm{dR}}$ and $\Harm$ are strictly unital and strictly augmented with the unit $\NOne\coloneqq \SuspU 1 \in \DR[1]$, where $1$ is the constant one.
\end{Proposition}

\begin{proof}
The relations \eqref{Eq:CycDGA} follow from the classical properties of $\Dd$ and $\wedge$ and from the Stokes' theorem for oriented closed manifolds.
The Poincar\'e duality asserts that $(\cdot,\cdot)$ is non-degenerate on $\H_{\mathrm{dR}}{}$ and~$\Harm{}$, and thus they are cyclic dga's as well.
The fact that $\pi_\Harm : \H_{\mathrm{dR}}{}\rightarrow \Harm{}$ is an isomorphism of vector spaces follows from the Hodge theory.
As for compatibility with the product, given $\eta_1$, $\eta_2 \in \Harm{}$, then $\eta_1 \wedge \eta_2$ is closed, and since $\Ker \Dd = \Harm \oplus \Im \Dd$, we see that $\pi_{\Harm}(\eta_1 \wedge \eta_2) = \eta_1 \wedge \eta_2 + \Dd \eta$ for some $\eta\in \DR$ is a harmonic representative of the cohomology class $[\eta_1 \wedge \eta_2] = [\eta_1] \wedge [\eta_2]$.
Unitality is obvious, and the construction of an augmentation map clear.
Note that a strict augmentation for $\DR(M)$ is the evaluation at a point, for instance.
\end{proof}

The facts (A) and (C) from the Overview apply to the cyclic dga's $\Harm{}$ and~$\H_{\mathrm{dR}}{}$ (not to $\DR{}$ because it is infinite-dimensional!), and we get the canonical $\dIBL$-algebras $\dIBL(\CycC(\Harm))$ and $\dIBL(\CycC(\H_{\mathrm{dR}}))$ of bidegrees $(n-3,2)$ with the canonical Maurer-Cartan element $\MC = (\MC_{10})$.
The Hodge isomorphism induces an isomorphism of these $\dIBL$-algebras, and hence we can use $\Harm$ and~$\HDR$ interchangeably.
%Note that there is also the reduced version $\dIBL(\RedCycC(\Harm))$.
%We have the $\IBLInfty$-isomorphisms $\dIBL(C(\Harm)) \simeq \dIBL(C(\HDR))$, $\dIBL^{\MC}(C(\Harm)) \simeq \dIBL^{\MC_{\mathrm{dR}}}(C(\HDR))$.
The reduced versions (see Definition~\ref{Def:ReduceddIBL}) also satisfy $\dIBL(C_{\mathrm{red}}(\Harm)) \simeq \dIBL(C_{\mathrm{red}}(\HDR))$, $\dIBL^\MC(C_{\mathrm{red}}(\Harm)) \simeq \dIBL^{\MC_{\mathrm{dR}}}(C_{\mathrm{red}}(\HDR))$.
We have $\OPQ_{110} \equiv 0$, and hence $\dIBL(\CycC(\Harm))$ is, in fact, an $\IBL$-algebra.
However, we will denote it by $\dIBL$ and call it a $\dIBL$ algebra as a reminder of the canonical $\dIBL$-structure.
The canonical Maurer-Cartan element~$\MC$ satisfies
\begin{equation}\label{Eq:CanonMC}
\MC_{10}(\Susp \alpha_1 \alpha_2 \alpha_3) = (-1)^{n-2 + \eta_2} \int_M \eta_1 \wedge \eta_2 \wedge \eta_3 \quad \text{for all } \alpha_1, \alpha_2, \alpha_3 \in \Harm[1].
\end{equation}
We get the canonical twisted $\dIBL$-algebra $\dIBL^\MC(\CycC(\Harm))$ from~\eqref{Eq:CanonMCTwist} with, in general, non-trivial boundary operator $\OPQ_{110}^\MC$ whose homology is the cyclic homology of $\HDR$ up to degree shifts.
%Proposition~\ref{Prop:dIBL} gives the following for $\dIBL^\MC(\Harm)$:
%\begin{equation}\label{Eq:CanonTwisteddIBL}
%\begin{aligned}
%\OPQ_{210}^\MC &= \OPQ_{210}, \quad \OPQ_{120}^\MC = \OPQ_{120}, \quad \OPQ_{110}^\MC(\cdot) = \OPQ_{210}(\MC_{10},\cdot) \\
%\OPQ_{1lg}^\MC &= 0\qquad \forall l\ge 1, g\ge 0, (l,g)\neq (1,0), (2,0).
%\end{aligned}
%\end{equation}
%
%In order to determine the induced $\IBL$-algebra on the homology $\IBL^\MC(\HDR)$ (see Definition~\ref{Def:HomIBL}), which is well-defined due to Proposition~\ref{Prop:Compl}, \ref{Prop:Kuenneth}, we can, based on the theory from Sec.~\ref{Sec:Alg0}, proceed as follows:
%\begin{enumerate}[label=(\arabic*)]
% \item Compute the cyclic cohomology $\H_{\lambda}$ (see Definition~\ref{Def:CycHom}) of the de Rham algebra~$\HDR$ and use Proposition~\ref{Prop:CyclicHom} to get $\HIBL^\MC(\CycC(\HDR))$.
%It is usually easier to compute the cyclic cohomology of the reduced de Rham algebra $\bar{\H}_{\mathrm{dR}}$, use~\eqref{Eq:CycReduced} to get $\HIBL^\MC(\CycC(\bar{\H}_{\mathrm{dR}}))$, and add ``ones''~$\Susp \NOne^{q*}$ according to the splitting~\eqref{Eq:IBLSPlit} to obtain $\HIBL^\MC(\CycC(\HDR))$.
%We can also compute the classical cyclic cohomology of $\HDR$ from \cite{LodayCyclic} and use Proposition~\ref{Prop:DGA} to transform it to~$\H_\lambda$.
% \item Pick a basis $(e_i) \subset \HDR$, find its dual basis $(e^i)$, determine $T^{ij}$ and plug it in Definition~\ref{Def:CanonicaldIBL} to compute the induced operations $\OPQ_{210}: \hat{\Ext}_2 \HIBL^\MC \rightarrow \hat{\Ext}_1 \HIBL^\MC$, $\OPQ_{120}: \hat{\Ext}_1 \HIBL^\MC \rightarrow \hat{\Ext}_2 \HIBL^\MC$.
%We can also compute $\OPQ_{210}$, $\OPQ_{120}$ just on the reduced homology $\HIBL^\MC(\CycC(\bar{\H}_{\mathrm{dR}}))$ and use Proposition~\ref{Prop:Ones} to get the rest of the relations with~$\Susp \NOne^{q*}$.
%\end{enumerate}
%In Sec.~\ref{Section:Computation1}, we carry out the example of $M=\Sph{n}$ and in Sec.~\ref{Section:CPn1} of~$M=\CP^n$.
\end{document}


\chapter{Conclusion}
This paper uses the Gibbs sampler with a Metropolis-Hastings step to generate new samples from a NHPP. Test statistics are used to check if the new samples are from the NHPP. The NHPP used has a rate function which is a combination of a log-linear function and a power-law function. By testing the samples for different parameters in the rate function, non of the null hypothesis were rejected. Hence this sampler can be used to generate new samples from a NHPP given a data set. This model is quite versatile, hence it is difficult to reject a null hypothesis.
\\
\\
Further work could be to try to find a data set to reject the null hypothesis. For instance one might try the renewal Weibull process. Other work could be to test different simulation algorithms. One that might be of interest is the Monte Carlo weighted sampling from \cite{lindqvist2006conditional}. It would be interesting to compare these two algorithms.


\section{Exercise 04}
\subsection{}

\begin{frame}[label={pag:ex-realisation}]
\frametitleTC{Problem}
\framesubtitleTC{This one we solve together}
\myPause
 Take the block diagram
 \begin{center}
  \includegraphics[width=0.85\columnwidth]{./Unit-03/img/PS01-ex04-fig01.pdf}
 \end{center}\myPause
 \begin{itemize}[<+-| alert@+>]
 \item[(a)] compute the transfer function from $u(k)$ to $y(k)$,
 \item[(b)] find a possible state-space description for the system.
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Solution}
\framesubtitleTC{Item (a) -- preliminaries}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Take two blocks in \TC{series} or \TC{cascade}, i.e., the output $y_1(k)$ of the first is the
       input $u_2(k)$ of the second. Name $G_1(z)$ and $G_2(z)$ their transfer functions.
 \item Let the overall system input $u(k)$ be connected to the input $u_1(k)$ of $G_1(z)$, and the overall
       system output $y(k)$ be the output $y_2(k)$ of $G_2(z)$.
 \item Then we have
       \begin{displaymath}
        y(k) = y_2(k) = G_2(z)u_2(k) = G_2(z)y_1(k) = G_2(z)G_1(z)u_1(k)=G_2(z)G_1(z)u(k),
       \end{displaymath}
 \item and therefore the overall transfer function $G(z)$ from $u(k)$ to $y(k)$ is
       \begin{displaymath}
        G(z) = G_2(z)G_1(z).
       \end{displaymath}
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Solution}
\framesubtitleTC{Item (a) -- preliminaries}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Take two blocks $G_1(z)$ and $G_2(z)$ in \TC{parallel}, i.e., they get the same input $u(k)$
       and their outputs sum together to produce the overall system output $y(k)$.
 \item With obvious notation have
       \begin{displaymath}
        y(k) = y_1(k)+y_2(k) = G_1(z)u_1(k)+G_2(z)u_2(k) = (G_1(z)+G_2(z))u(k),
       \end{displaymath}
 \item and therefore the overall transfer function $G(z)$ from $u(k)$ to $y(k)$ is
       \begin{displaymath}
        G(z) = G_1(z)+G_2(z).
       \end{displaymath}
 \item Extending to more blocks and different signs is trivial.
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Solution}
\framesubtitleTC{Item (a)}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item The system under question is composed of three branches in parallel.
 \item The middle one is composed of two blocks in series.
 \item Hence (mind the signs) the overall transfer function $G(z)=y(k)/u(k)$ is
       \begin{displaymath}
        \begin{array}{rcll}
         G(z) &=& & \cfrac{3}{z-0.2}\\
              & &+& \cfrac{2}{z-0.5} \,\cdot\,
                    \cfrac{1}{z-0.5}\\
              & &-& \cfrac{0.5}{z-0.8} \; \ldots\\ \\
              &=& & \cfrac{2.5z^3-2.8z^2+0.925z-0.255}{(z-0.2)(z-0.5)^2(z-0.8)}.
        \end{array}
       \end{displaymath}
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Solution}
\framesubtitleTC{Item (b)}
\myPause%
 \only<2 >{Consider the individual first-order blocks:\\%
           \begin{center}
            \includegraphics[width=0.85\columnwidth]{./Unit-03/img/PS01-ex04-fig01.pdf}
           \end{center}}
 \only<3 >{Take their outputs as state variables:\\%
           \begin{center}
            \includegraphics[width=0.85\columnwidth]{./Unit-03/img/PS01-ex04-fig02.pdf}
           \end{center}}
 \only<4->{write the elementary difference equations for each block:\\%
           \begin{center}
            \includegraphics[width=0.85\columnwidth]{./Unit-03/img/PS01-ex04-fig03.pdf}
           \end{center}}
\end{frame}

\begin{frame}
\frametitleTC{Solution}
\framesubtitleTC{Item (b)}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Now put it all together:
       \begin{displaymath}
        \left\{\begin{array}{rlllll}
         x_1(k) &= 0.2x_1(k-1) &              &              &              & +u(k-1)    \\
         x_2(k) &=             & +0.5x_2(k-1) & +x_3(k-1)                                \\
         x_3(k) &=             &              &  0.5x_3(k-1) &              & +2u(k-1)   \\
         x_4(k) &=             &              &              &  0.8x_4(k-1) & +0.5u(k-1) \\
         y(k)   &= x_1(k)      & +x_2(k)      &              & -x_4(k)                   \\
        \end{array}\right.
       \end{displaymath}
 \item Hence
       \begin{displaymath}
        \begin{array}{c}
         A = \begin{bmatrix}
              0.2 & 0   & 0   & 0   \\
              0   & 0.5 & 1   & 0   \\
              0   & 0   & 0.5 & 0   \\
              0   & 0   & 0   & 0.8
             \end{bmatrix}, \quad
         b = \begin{bmatrix} 1 \\ 0 \\ 2 \\ 0.5 \end{bmatrix}, \\ \\
         c = \begin{bmatrix} 1 & 0 & 1 & -1 \end{bmatrix}, \quad
         d = 0.
        \end{array}
       \end{displaymath}
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Takeaways}
\framesubtitleTC{from exercise 04}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item We know that the poles of $G(z)$ are eigenvalues of $A$.
 \item Not THE eigenvalues, some may be cancelled.
 \item Our matrices are real, hence eigenvalues (and poles) are either real, or in complex
       conjugate couples. Here we limit the math to real ones (but results hold in general).
 \item \vfill It should be clear that \emph{any} $G(z)$, once decomposed in simple fractions,\\
       can be treated as we did.
 \item Can we say something on our $A$? Can we use it to understand\\
       the eigenvalues--stability relationship we mentioned?
 \item Remember that the free motion of a system converges to zero,\\
       diverges or neither, if so  does $A^k$ for $k\rightarrow\infty$. Let us have a look\\
       with this idea in mind.
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Takeaways}
\framesubtitleTC{from exercise 04}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item In general, once treated as we did, matrix $A$ looks e.g. as follows:
 \begin{displaymath}
  A =
  \begin{bmatrix}
   \-& \cellcolor{green!30!white}{\lambda_{1}} & 0 & 0 & 0 & 0 & 0 & 0 & \ldots & \\
   \-& 0 &\cellcolor{green!30!white}{\lambda_{2}}  & 0 & 0 & 0 & 0 & 0 \\
   \-& 0 & 0 &\cellcolor{orange!50!white}{\lambda_{3}}
             &\cellcolor{yellow!30!white}{\textcolor{cyan!80!black}{0}} & 0 & 0 & 0 \\
   \-& 0 & 0 &\cellcolor{yellow!30!white}{0}
             &\cellcolor{orange!50!white}{\lambda_{3}} & 0 & 0 & 0 \\
   \-& 0 & 0 & 0 & 0 &\cellcolor{orange!50!white}{\lambda_{4}}
                     &\cellcolor{orange!30!white}{\textcolor{red}{1}} & \cellcolor{yellow!30!white}{0} \\
   \-& 0 & 0 & 0 & 0 &\cellcolor{orange!30!white}{0}
                     &\cellcolor{orange!50!white}{\lambda_{4}}
                     & \cellcolor{yellow!30!white}{\textcolor{cyan!80!black}{0}} \\
   \-& 0 & 0 & 0 & 0 &\cellcolor{yellow!30!white}{0}
                     &\cellcolor{yellow!30!white}{0} & \cellcolor{orange!50!white}{\lambda_{4}} \\
   \-& \vdots &&&&&&& \ddots \\
  \end{bmatrix}
 \end{displaymath}
 \item Notice the block diagonal structure:
       \begin{itemize}[<+-| alert@+>]
       \item \colorbox{green!30!white}{single} eigenvalues are just diagonal elements;
       \item \colorbox{orange!50!white}{multiple} ones are repeated to form square \colorbox{yellow!30!white}{blocks},
       \item in turn diagonally composed of \colorbox{orange!30!white}{mini-blocks} separated by
             \textcolor{cyan!80!black}{zeroes}\\
             that break the over-diagonal sequence of \textcolor{red}{ones} in the block.
       \end{itemize}
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Takeaways}
\framesubtitleTC{from exercise 04}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Now, let us compute $A^k$:\myPause
 \begin{displaymath}
  A^k =
  \begin{bmatrix}
   \-& \cellcolor{green!30!white}{\lambda_{1}^k} & 0 & 0 & 0 & 0 & 0 & 0 & \ldots & \\
   \-& 0 &\cellcolor{green!30!white}{\lambda_{2}^k}  & 0 & 0 & 0 & 0 & 0 \\
   \-& 0 & 0 &\cellcolor{orange!50!white}{\lambda_{3}^k}
             &\cellcolor{yellow!30!white}{\textcolor{cyan!80!black}{0}} & 0 & 0 & 0 \\
   \-& 0 & 0 &\cellcolor{yellow!30!white}{0}
             &\cellcolor{orange!50!white}{\lambda_{3}^k} & 0 & 0 & 0 \\
   \-& 0 & 0 & 0 & 0 &\cellcolor{orange!50!white}{\lambda_{4}^k}
                     &\cellcolor{orange!30!white}{\textcolor{red}{k\lambda_4^{k-1}}} & \cellcolor{yellow!30!white}{0} \\
   \-& 0 & 0 & 0 & 0 &\cellcolor{orange!30!white}{0}
                     &\cellcolor{orange!50!white}{\lambda_{4}^k}
                     & \cellcolor{yellow!30!white}{\textcolor{cyan!80!black}{0}} \\
   \-& 0 & 0 & 0 & 0 &\cellcolor{yellow!30!white}{0}
                     &\cellcolor{yellow!30!white}{0} & \cellcolor{orange!50!white}{\lambda_{4}^k} \\
   \-& \vdots &&&&&&& \ddots \\
  \end{bmatrix}
 \end{displaymath}\myPause
 \item Does it converge to a matrix of zeroes? Or diverge --- i.e., does\\
       at least one element diverge? Or neither?
 \item In other words, is the system asymptotically stable, unstable,\\
       or (simply) stable?
 \end{itemize}
\end{frame}

\begin{frame}[fragile]
\frametitleTC{Takeaways}
\framesubtitleTC{from exercise 04}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Diagonal terms, in the form $\lambda^k$:
       \begin{displaymath}
        \begin{array}{rcl}
         \lim\limits_{k\rightarrow\infty}|\lambda^k| =
          \begin{cases}
           0        & |\lambda| < 1 \\
           1        & |\lambda| = 1 \\
           \infty   & |\lambda| > 1 \\
          \end{cases}
        \end{array}
       \end{displaymath}
 \item Over-diagonal terms, in the form $k\lambda^k$:
       \begin{displaymath}
        \begin{array}{rcl}
         \lim\limits_{k\rightarrow\infty}|k\lambda^k| =
          \begin{cases}
           0        & |\lambda| < 1 \\
           \infty   & |\lambda| \geq 1 \\
          \end{cases}
        \end{array}
       \end{displaymath}
 \item NOTE: larger mini-blocks give over-diagonal terms in other forms,\\
       but analogous as for the above. Take wxMaxima and try e.g.\\
       {\small
       \begin{verbatim}
  A:matrix([lambda,1,0],[0,lambda,1],[0,0,lambda]);
  A.A.A; /* NOT A^3, that is the elem-by-elem power */
       \end{verbatim}
       }
 \end{itemize}
\end{frame}

\begin{frame}
\frametitleTC{Takeaways}
\framesubtitleTC{from exercise 04}
\myPause
 \begin{itemize}[<+-| alert@+>]
 \item Now let us put it all together:
       \begin{itemize}[<+-| alert@+>]
       \item each single eigenvalue $\lambda_i$ only gives one diagonal term $\lambda_i^k$;
       \item each eigenvalue $\lambda_j$ with multiplicity $n_j$ gives $n_j$ diagonal terms $\lambda_j^k$, plus some\\
             \vspace{-0.75mm}over-diagonal terms $k\lambda_j^k$ -- or analogous -- iff the maximum size of its mini-block\\
             is greater then one.
       \end{itemize}
 \item Hence\\
       {\scriptsize
       %\begin{center}
        \begin{tabular}{rcl}
         all $|\lambda_i|<1$                             & $\Rightarrow$ & System asymptotically stable\\
         \\
         at least one $|\lambda_i|>1$                    & $\Rightarrow$ & System unstable\\
         \\
         all $|\lambda_i|\leq 1$                         & \\
         and at least one has unity magnitude            & $\Rightarrow$ & System (simply) stable\\
         but in this case also unity max mini-block size & \\
         \\
         otherwise (i.e.,all $|\lambda_i|\leq 1$, and    & \\
         at least one has both unity magnitude and       & $\Rightarrow$ & System unstable\\
         maximum mini-block size greater than one)       & \\
        \end{tabular}
       %\end{center}
       }
 \item \vfill This proves (and completes) the statement of slide~\ref{pag:stab-eivals}.
 \end{itemize}
\end{frame}