% vim: ft=tex

\section{The Stabilizer Formalism}

The stabilizer formalism was originally introduced by Gottesman\cite{gottesman1997}
for quantum error correction and is a useful tool to encode quantum information
such that it is protected against noise. The prominent Shor code \cite{shor1995}
is an example of a stabilizer code (although it was discovered before the stabilizer 
formalism was discovered), as are the 3-qbit bit-flip and phase-flip codes.

It was only later that Gottesman and Knill discovered that stabilizer states can
be simulated in polynomial time on a classical machine \cite{gottesman2008}. This
performance has since been improved to $n\log(n)$ time on average \cite{andersbriegel2005}.

\subsection{Stabilizers and Stabilizer States}

\subsubsection{Local Pauli Group and Multilocal Pauli Group}

\begin{definition}
    \begin{equation}
        P := \{\pm 1, \pm i\} \cdot \{I, X, Y, Z\}
    \end{equation}

    Is called the Pauli group.
\end{definition}

The group property of $P$ can be verified easily. Note that 
the elements of $P$ either commute or anticommute.

\begin{definition}
    For $n$ qbits

    \begin{equation}
        P_n := \left\{\bigotimes\limits_{i=0}^{n-1} p_i | p_i \in P\right\}
    \end{equation}

    is called the multilocal Pauli group on $n$ qbits. 
\end{definition}

The group property of $P_n$ follows directly from its definition
via the tensor product as do the (anti-)commutator relationships.
%Further are $p \in P_n$ hermitian and have the eigenvalues $\pm 1$ for
%$p \neq \pm I$, $+1$ for $p = I$  and $-1$ for $p = -I$.

\subsubsection{Stabilizers}

\begin{definition}
    \label{def:stabilizer}
    An abelian subgroup $S = \{S^{(0)}, ..., S^{(N)}\}$ of $P_n$ is called a set of stabilizers iff
    \begin{enumerate}
        \item{$\forall i,j = 1, ..., N$ $[S^{(i)}, S^{(j)}] = 0$ $S^{(i)}$ and $S^{(j)}$ commute}
        \item{$-I \notin S$}
    \end{enumerate}
\end{definition}

\begin{lemma}
    If $S$ is a set of stabilizers, the following statements are follow
    directly

    \begin{enumerate}
        \item{$\pm iI \notin S$}
        \item{$(S^{(i)})^2 = I$ for all $i$}
        \item{$S^{(i)}$ are hermitian for all $i$}
    \end{enumerate}
\end{lemma}
\begin{proof}

    \begin{enumerate}
        \item{$(iI)^2 = (-iI)^2 = -I$. Which contradicts the definition of $S$.}
        \item{From the definition of $S$ ($G_n$ respectively) follows that any
            $S^{(i)} \in S$ has the form $\pm i^l (\bigotimes\limits_{j=0}^{n-1} \tilde{p}_j)$ where
            $\tilde{p}_j \in \{X, Y, Z, I\}$ and $l \in \{0, 1\}$. As $(\bigotimes\limits_{j=0}^{n-1} \tilde{p}_j)$
            is hermitian $(S^{(i)})^2$ is either $+I$ or $-I$. As $-I \notin S$ $(S^{(i)})^2 = I$ follows directly. 
            }
        \item{Following the argumentation above $(S^{(i)})^2 = -I \Leftrightarrow l=1$ 
            therefore $(S^{(i)})^2 = -I \Leftrightarrow (S^{(i)})^\dagger \neq (S^{(i)})$.}
    \end{enumerate}

\end{proof}

As considering all elements of a group can be unpractical for some calculations
the generators of a group are introduced. It is usually enough to discuss the generator's
properties to understand the properties of the group.

\begin{definition}
    For a finite group $G$ and some $m \in \mathbb{N}$ one denotes the generators
    of G

    $$ \langle g_1, ..., g_m \rangle \equiv \langle g_i \rangle_{i=1,...,m}$$

    where $g_i \in G$, every element in $G$ can be written as a product of the $g_i$
    and $m$ is the smallest integer for which these statements hold.
\end{definition}

In the following discussions $\langle S^{(i)} \rangle_{i=0, ..., n-1}$ will be used as
the properties of a set of stabilizers that are used in the discussions can be studied using only its
generators.

\subsubsection{Stabilizer States}

One important basic property of quantum mechanics is that hermitian operators have real eigenvalues
and eigenspaces associated with these eigenvalues. Finding these eigenvalues and eigenvectors
is what one calls solving a quantum mechanical system. One of the most fundamental insights of 
quantum mechanics is that operators that commute have a common set of eigenvectors, i.e. they
can be diagonalized simultaneously. This motivates and justifies the following definition

\begin{definition}
    For a set of stabilizers $S$ the vector space

    \begin{equation}
        V_S := \{\ket{\psi} | S^{(i)}\ket{\psi} = +1\ket{\psi} \forall S^{(i)} \in S\}
    \end{equation}

    is called the space of stabilizer states associated with $S$ and one says
    $\ket{\psi}$ is stabilized by $S$.
\end{definition}

It is clear that it is sufficient to show the stabilization property for the generators of
$S$, as all the generators forming an element in $S$ can be absorbed into $\ket{\psi}$.
The dimension of $V_S$ is not immediately clear. One can however show that
for a set of stabilizers $\langle S^{(i)} \rangle_{i=1, ..., n-m}$ the dimension
$dim V_S = 2^m$ \cite[Chapter 10.5]{nielsen_chuang_2010}. This yields the following important
result:

\begin{theorem}
    \label{thm:unique_s_state}
    For a $n$ qbit system and a set $S = \langle S^{(i)} \rangle_{i=1, ..., n}$ the stabilizer
    space $V_S$ has $dim V_S = 1$, in particular there exists an up to a trivial phase unique
    state $\ket{\psi}$ that is stabilized by $S$.
    
    Without proof.
\end{theorem}

In the following discussions for $n$ qbits a set $S = \langle S^{(i)} \rangle_{i=1,...,n}$ 
of $n$ independent stabilizers will be assumed.


\subsubsection{Dynamics of Stabilizer States}

Consider a $n$ qbit state $\ket{\psi}$ that is the $+1$ eigenstate of $S = \langle S^{(i)} \rangle_{i=1,...,n}$
and a unitary transformation $U$ that describes the dynamics of the system, i.e. 

\begin{equation}
    \ket{\psi'} = U \ket{\psi}
\end{equation}

It is clear that in general $\ket{\psi'}$ will not be stabilized by $S$ anymore. There are
however some statements that can still be made:

\begin{equation}
    \begin{aligned}
    \ket{\psi'} &= U \ket{\psi} \\
                &= U S^{(i)} \ket{\psi} \\
                &= U S^{(i)} U^\dagger U\ket{\psi} \\
                &= U S^{(i)} U^\dagger \ket{\psi'} \\
                &= S^{\prime(i)} \ket{\psi'} \\
    \end{aligned}
\end{equation}

Note that in \ref{def:stabilizer} it has been demanded that stabilizers are a 
subgroup of the multilocal Pauli operators. This does not hold true for an arbitrary
$U$ but there exists a group for which $S'$ will be a set of stabilizers.

\begin{definition}
    For $n$ qbits
    \begin{equation}
        C_n := \left\{U \in SU(n) | UpU^\dagger \in P_n \forall p \in P_n\right\}
    \end{equation}

    is called the Clifford group. $C_1 =: C_L$ is called the local Clifford group.
\end{definition}

\begin{theorem}
    \label{thm:clifford_group_approx}
    \begin{enumerate}
        \item{$C_L$ can be generated using only $H$ and $S$.}
        \item{$C_L$ can be generated from $\sqrt{iZ} = \exp(\frac{i\pi}{4}) S^\dagger$ 
            and $\sqrt{-iX} = \frac{1}{\sqrt{2}} \left(\begin{array}{cc} 1 & -i \\ -i & 1 \end{array}\right)$. 

                Also $C_L$ is generated by a product of at most $5$ matrices $\sqrt{iZ}$, $\sqrt{-iX}$.
                }
            \item{$C_n$ can be generated using $C_L$ and $CZ$ or $CX$.} 
    \end{enumerate} 
\end{theorem}

\begin{proof}
    \begin{enumerate}
        \item{See \cite[Theorem 10.6]{nielsen_chuang_2010}}
        \item{
            One can easily verify that $\sqrt{iZ} \in C_L$ and $\sqrt{-iX} \in C_L$.
            Further one can show easily that (up to a global phase)
            $H = \sqrt{iZ} \sqrt{-iX}^3 \sqrt{iZ}$ and $S = \sqrt{iZ}^3$.

            The length of the product can be seen when explicitly calculating 
            $C_L$.
            }
        \item{See \cite[Theorem 10.6]{nielsen_chuang_2010}}
    \end{enumerate} 
\end{proof}

This is quite an important result: As under a transformation $U \in C_n$ $S'$ is a set of 
$n$ independent stabilizers and $\ket{\psi'}$ is stabilized by $S'$ one can consider
the dynamics of the stabilizers instead of the actual state. This is considerably more
efficient as only $n$ stabilizers have to be modified, each being just the tensor
product of $n$ Pauli matrices. This has led to the simulation using stabilizer tableaux
\cite{gottesman_aaronson2008}.

Interestingly also measurements are dynamics covered by the stabilizers.
When an observable $g_a \in \{\pm X_a, \pm Y_a \pm Z_a\}$ acting on qbit $a$ is measured
one has to consider the projector

\begin{equation}
    P_{g_a,s} = \frac{I + (-1)^s g_a}{2} 
\end{equation}

If now $g_a$ commutes with all $S^{(i)}$ a result of $s=0$ is measured with probability $1$
and the stabilizers are left unchanged:

\begin{equation}
    \begin{aligned}
        \ket{\psi'} &= \frac{I + g_a}{2}\ket{\psi} \\
                    &= \frac{I + g_a}{2}S^{(i)} \ket{\psi} \\
                    &= S^{(i)} \frac{I + g_a}{2}\ket{\psi} \\
                    &= S^{(i)}\ket{\psi'} \\
    \end{aligned}
\end{equation}

As the state that is stabilized by $S$ is unique $\ket{\psi'} = \ket{\psi}$.

If $g_a$ does not commute with all stabilizers the following lemma gives 
the result of the measurement.

\begin{lemma}
    \label{lemma:stab_measurement}
    Let $J := \{ S^{(i)} | [g_a, S^{(i)}] \neq 0\} \neq \{\}$. When measuring 
    $\frac{I + (-1)^s g_a}{2} $
    $1$ and $0$ are obtained with probability $\frac{1}{2}$ and after choosing
    a $j \in J$ the new state $\ket{\psi'}$ is stabilized by 
    \begin{equation}
        \langle \{(-1)^s g_a\} \cup \{S^{(i)} S^{(j)} | S^{(i)} \in J \setminus \{S^{(j)}\} \} \cup J^c\rangle
    \end{equation}
\end{lemma}

\begin{proof}
    As $g_a$ is a Pauli operator and $S^{(i)} \in J$ are multi-local Pauli operators,
    $S^{(i)}$ and $g_a$ anticommute. Choose a $S^{(j)} \in J$. Then

    \begin{equation}
    \begin{aligned}
        P(s=+1) &= \hbox{Tr}\left(\frac{I + g_a}{2}\ket{\psi}\bra{\psi}\right) \\
                &= \hbox{Tr}\left(\frac{I + g_a}{2}S^{(j)} \ket{\psi}\bra{\psi}\right)\\
                &= \hbox{Tr}\left(S^{(j)}\frac{I - g_a}{2}\ket{\psi}\bra{\psi}\right)\\
                &= \hbox{Tr}\left(\frac{I - g_a}{2}\ket{\psi}\bra{\psi}S^{(j)}\right)\\
                &= \hbox{Tr}\left(\frac{I - g_a}{2}\ket{\psi}\bra{\psi}\right)\\
                &= P(s=-1)
    \end{aligned}
    \notag
    \end{equation}

    With $P(s=+1) + P(s=-1) = 1$ follows $P(s=+1) = \frac{1}{2} = P(s=-1)$.
    Further for $S^{(i)},S^{(j)} \in J$

    \begin{equation}
    \begin{aligned}
        \frac{I + (-1)^sg_a}{2}\ket{\psi} &= \frac{I + (-1)^sg_a}{2}S^{(j)}S^{(i)} \ket{\psi} \\
            &= S^{(j)}\frac{I + (-1)^{s + 1}g_a}{2}S^{(i)} \ket{\psi} \\
            &=  S^{(j)}S^{(i)}\frac{I + (-1)^{s + 2}g_a}{2}\ket{\psi} \\
            &=  S^{(j)}S^{(i)}\frac{I + (-1)^sg_a}{2}\ket{\psi}
    \end{aligned}
    \notag
    \end{equation}

    the state after measurement is stabilized by $S^{(j)}S^{(i)}$ $i,j \in J$, and by 
    $S^{(i)} \in J^c$. $(-1)^sg_a$ trivially stabilizes $\ket{\psi'}$.
\end{proof}

\subsection{The VOP-free Graph States}
\subsubsection{VOP-free Graph States}

This section will discuss the vertex operator(VOP)-free graph states. Why they are called
vertex operator-free will be clear in the following section about graph states.

\begin{definition}
    The tuple $(V, E)$ is called a graph iff $V$ is a set of vertices with $|V| = n \in \mathbb{N}$.
    In the following $V = \{0, ..., n-1\}$ will be used.
    $E$ is the set of edges $E = \left\{\{i, j\} | i,i \in V, i \neq j\right\}$.

    For a vertex $i$ $n_i := \left\{j \in V | \{i, j\} \in E\right\}$ is called the neighbourhood
    of $i$.
\end{definition}

This definition of a graph is way less general than the definition of a mathematical graph.
Using this definition will however allow to avoid an extensive list of constraints on the 
mathematical graph that are implied in this definition.

\begin{definition}
    For a graph $G = (V = \{0, ..., n-1\}, E)$ the associated stabilizers are 
    \begin{equation}
        K_G^{(i)} := X_i \prod\limits_{\{i,j\} \in E} Z_i
    \end{equation}
    for all $i \in V$. The vertex operator free graph state $\ket{\bar{G}}$ is the state stabilized by 
    $\langle K_G^{(i)} \rangle_{i = 0, ..., n-1}$.
\end{definition}

It is clear that the $K_G^{(i)}$ multilocal Pauli operators. That they commute 
follows from the fact that $\{i,j\} \in E \Leftrightarrow \{j,i\} \in E$ so for two
operators $K_G^{(i)}$ and $K_G^{(j)}$ either $\{i, j\} \notin E$ so they commute trivially
if $\{i,j\} \in E$  $X_i$, $Z_j$ and $X_j$, $Z_i$ anticommute which yields that the 
operators commute.

This definition of a graph state might not seem to be quite straight forward
but recalling theorem \ref{thm:unique_s_state} it is clear that $\ket{\bar{G}}$
is unique. The following lemma will provide a way to construct this state
from the graph. 

\begin{lemma}
    For a graph $G = (V, E)$ the associated state $\ket{\bar{G}}$ is
    constructed using

    \begin{equation}
        \begin{aligned}
            \ket{\bar{G}} &= \left(\prod\limits_{\{i,j\} \in E} CZ_{i,j}\right)\left(\prod\limits_{i \in V} H_i\right) \ket{0} \\
                        &= \left(\prod\limits_{\{i,j\} \in E} CZ_{i,j}\right) \ket{+} \\
        \end{aligned}
    \end{equation}
\end{lemma}
\begin{proof}
    Let $\ket{+} := \left(\prod\limits_{l \in V} H_l\right) \ket{0}$ as before. Note that for any $X_i$ $X_i \ket{+} = +1 \ket{+}$.
    Set $\ket{\tilde{G}} := \left(\prod\limits_{\{i,j\} \in E} CZ_{i,j} \right)\ket{+}$.

    \begin{equation}
        \begin{aligned}
            K_G^{(i)} \ket{\tilde{G}} & = X_i \left(\prod\limits_{\{i,j\} \in E} Z_j\right)\left(\prod\limits_{\{l,j\} \in E} CZ_{l,j} \right) \ket{+} \\
            & = \left(\prod\limits_{\{i,j\} \in E} Z_j\right)X_i\prod\limits_{\{l,j\} \in E}\left( \ket{0}\bra{0}_j \otimes I_l + \ket{1}\bra{1}_j \otimes Z_l\right) \ket{+} \\
            & = \left(\prod\limits_{\{i,j\} \in E} Z_j\right)\prod\limits_{\{l,j\} \in E}\left( \ket{0}\bra{0}_j \otimes I_l + (-1)^{\delta_{i,l}}\ket{1}\bra{1}_j \otimes Z_l\right) X_i \ket{+} \\
            & = \prod\limits_{\{l,j\} \in E}\left( \ket{0}\bra{0}_j \otimes I_l + (-1)^{2\delta_{i,l}}\ket{1}\bra{1}_j \otimes Z_l\right) \ket{+} \\
			& = \prod\limits_{\{l,j\} \in E}\left( \ket{0}\bra{0}_j \otimes I_l + \ket{1}\bra{1}_j \otimes Z_l\right) \ket{+} \\	
		    & = +1 \ket{\tilde{G}}	
        \end{aligned}
    \end{equation}

    as $X, Z$ anticommute and $Z\ket{1} = -1\ket{1}$.

\end{proof}

\subsubsection{Dynamics of the VOP-free Graph States}

This representation gives an immediate result to how the stabilizers $\langle K_G^{(i)} \rangle_i$ change
under the $CZ$ gate: When applying $CZ_{i,j}$ on $G = (V, E)$ the edge $\{i,j\}$ is toggled,
resulting in a multiplication of $Z_j$ to $K_G^{(i)}$ and $Z_i$ to $K_G^{(j)}$. Toggling edges
is done by using the symmetric set difference:

\begin{definition}
    For to finite sets $A,B$ the symmetric set difference $\Delta$ is 
    defined as

    \begin{equation}
        A \Delta B = (A \cup B) \setminus (A \cap B)
    \end{equation}
\end{definition}

Toggling an edge $\{i, j\}$ updates $E' = E \Delta \left\{\{i,j\}\right\}$.
Another transformation on the VOP-free graph states is for a vertex $a \in V$

\begin{equation}
    M_a := \sqrt{-iX_a} \prod\limits_{j\in n_a} \sqrt{iZ_j}
\end{equation}

This transformation toggles the neighbourhood of $a$ which is an operation
that will be used later.

\begin{lemma}
    When applying $M_a$ to a state $\ket{\bar{G}}$ the new state
    $\ket{\bar{G}'}$ is again a VOP-free graph state and the 
    graph is updated according to 
    \begin{equation}
        \begin{aligned}
            n_a' &= n_a \\
            n_j' &= n_j, \hbox{ if } j \notin n_a\\
            n_j' &= n_j \Delta n_a, \hbox{ if } j \in n_a
        \end{aligned}
    \end{equation}
\end{lemma}
\begin{proof}
    $\ket{\bar{G}'}$ is stabilized by $\langle M_a K_G^{(i)} M_a^\dagger \rangle_i$, so it is sufficient
    to study how the $ K_G^{(i)}$ change under $M_a$.
    At first note that $[K_G^{(a)}, M_a] = 0$ and $\forall i\in V\setminus n_a$ $[K_G^{(i)}, M_a] = 0$,
    so the first two equations follow trivially. For $j \in n_a$ set 

    \begin{equation}
        \begin{aligned}
            S^{(j)} &= M_a K_G^{(j)} M_a^\dagger \\
                &= \sqrt{-iX_a} \left(\prod\limits_{l \in n_a \setminus \{j\}} \sqrt{iZ_l}\right)
                                 \sqrt{iZ_j}  K_G^{(j)} \sqrt{iZ_j}^\dagger 
                                 \left(\prod\limits_{l \in n_a \setminus \{j\}} \sqrt{iZ_l}^\dagger\right)
                                 \sqrt{-iX_a}^\dagger \\
                &= \sqrt{-iX_a} \left(\prod\limits_{l \in n_a \setminus \{j\}} \sqrt{iZ_l}\right)\sqrt{iZ_j}
                                X_j \left(\prod\limits_{m \in n_j \setminus \{a\}} Z_m\right) Z_a
                                \sqrt{iZ_j}^\dagger
                                \left(\prod\limits_{l \in n_a \setminus \{j\}} \sqrt{iZ_l}^\dagger\right)
                                \sqrt{-iX_a}^\dagger \\
                &= \sqrt{iZ_j} X_j\sqrt{iZ_j}^\dagger\left(\prod\limits_{m \in n_j \setminus \{a\}} Z_m\right) 
                                \sqrt{-iX_a} Z_a \sqrt{-iX_a}^\dagger \\
                &= (-1)^2 Y_j Y_a \left(\prod\limits_{m \in n_j \setminus \{a\}} Z_m\right)\\
                &= (-1)i^2 Z_j X_a X_j Z_a \left(\prod\limits_{m \in n_j \setminus \{a\}} Z_m\right)
        \end{aligned}
    \end{equation}

    One can now construct a new set of $K_{G'}^{(i)}$ s.t. $M_a \ket{\bar{G}}$ is the $+1$ eigenvalue
    of the new $K_{G'}^{(i)}$. It is clear that $\forall j \notin n_a$  $K_{G'}^{(j)} = K_G^{(j)}$.
    To construct the $K_{G'}^{(i)}$ let for some $j \in n_a$ $n_a = \{j\} \cup I$ and $n_j = \{a\} \cup J$.
    Then

    \begin{equation}
        \begin{aligned}
            S^{(j)} &= Z_j X_a X_j Z_a \prod\limits_{l \in J} Z_l\\
                    &= Z_j X_a X_j Z_a \left(\prod\limits_{l \in J} Z_l\right)
                                        \left(\prod\limits_{l \in I}Z_l\right)
                                        \left(\prod\limits_{l \in I}Z_l\right) \\
                    &= Z_j X_a X_j Z_a \left(\prod\limits_{l \in ((I\cup J) \setminus (I\cap J))} Z_L\right)
                                        \left(\prod\limits_{l \in I}Z_l\right) \\
                    &= K_{G'}^{(a)} K_{G'}^{(j)} \\
                    &= K_{G}^{(a)} K_{G'}^{(j)}
        \end{aligned}
    \end{equation}

    Using this ine can show that $\ket{\bar{G}'}$ is a $+1$ eigenstate of $K_{G'}^{(j)}$:

    \begin{equation}
        \ket{\bar{G}'} = S^{(j)}\ket{\bar{G}'} = K_{G}^{(a)} K_{G'}^{(j)}\ket{\bar{G}'} 
                        = K_{G'}^{(j)}K_{G}^{(a)}\ket{\bar{G}'} = K_{G'}^{(j)}\ket{\bar{G}'}
    \end{equation}

    Because $\{K_G^{(i)} | i \notin n_a\} \cup \{S^{(i)} | i\in n_a\}$ and 
    $\{K_G^{(i)} | i \notin n_a\} \cup \{K_{G'}^{(i)} | i\in n_a \}$ are both $n$ commuting
    multi-local Pauli operators where the $S^{(i)}$ can be generated from the $K_{G'}^{(i)}$
    and $\ket{\bar{G}'}$ is a $+1$ eigenstate of $K_{G'}^{(j)}$ 
    $\langle\{K_G^{(i)} | i \notin n_a\} \cup \{K_{G'}^{(i)} | i\in n_a \}\rangle$
    are the stabilizers of $\ket{\bar{G}'}$ and the associated graph is changed as given
    in the third equation.
\end{proof}

\subsection{Graph States}

The definition of a VOP-free graph state above raises an obvious question: 
Can any stabilizer state be described using just a graph?
The answer is quite simple: No. The most simple cases are the single qbit
stated $\ket{0},\ket{1}$ and $\ket{+_Y}, \ket{-_Y}$. But there is a simple extension
to the VOP-free graph states that allows the representation of an arbitrary
stabilizer state. The proof that indeed any state can be represented is
just constructive. As seen in theorem \ref{thm:clifford_group_approx} any $c \in C_n$
can be constructed from $CZ$ and $C_L$ and in the following discussion it will become
clear that both $C_L$ and $CZ$ can be applied to a general graph state.

\subsubsection{Graph States and Vertex operators}

