2019-11-01 18:07:45 +00:00
\section { The Graph Simulator}
2019-10-11 09:47:17 +00:00
2019-11-11 10:22:47 +00:00
\subsection { Mathematical Prerequisites}
2019-10-31 12:58:45 +00:00
2019-11-11 10:22:47 +00:00
The following definitions and lemmata are required to understand both how the
graph formalism works and how the simulator handles gates.
2019-11-01 18:07:45 +00:00
%A $n$ qbit graph or stabilizer state is a $+1$ eigenstate of some $ p \in P_n$ where $P_n$ is the Pauli group\cite{andersbriegel2005}.
2019-11-05 10:21:26 +00:00
One can show that the Clifford group $ C _ n $ can be generated using the elements of $ C _ 1 $ acting on all qbits and
2019-11-01 18:07:45 +00:00
the controlled phase gate $ CZ $ between all qbits\cite { andersbriegel2005} . It is worth noting that the $ CX $ gate can be
2019-11-05 10:21:26 +00:00
generated using $ CZ $ and $ C _ 1 $ gates.
2019-11-01 18:07:45 +00:00
\begin { lemma}
2019-11-05 10:21:26 +00:00
Let $ a \in C _ 1 $ then $ \forall \phi \in [ 0 , 2 \pi ) $ also $ \exp ( i \phi ) a \in C _ 1 $ .
2019-11-01 18:07:45 +00:00
\textbf { Note} : This is also true for $ C _ n \forall n > = 1 $ .
\end { lemma}
\begin { proof}
2019-11-05 10:21:26 +00:00
Let $ a' : = \exp ( i \phi ) a $ . $ a' \in C _ 1 $ iff $ a'pa ^ { \prime \dagger } \in P \forall p \in P $ .
2019-11-01 18:07:45 +00:00
\begin { equation}
\begin { aligned}
a'pa^ { \prime \dagger } & = (\exp (i\phi )a)p(\exp (i\phi )a)^ \dagger \\
& = \exp (i\phi )ap\exp (-i\phi )a^ \dagger \\
& = \exp (i\phi )\exp (-i\phi ) apa^ \dagger \\
& = apa^ \dagger \in P
\end { aligned}
\end { equation}
\end { proof}
2019-12-14 09:29:34 +00:00
%\begin{lemma}
% One cannot measure phases by projecting states.
%\end{lemma}
%\begin{proof}
% Let $\ket{\psi}$ be a state, $\ket{\varphi}\bra{\varphi}$ a projector. $\ket{\psi'} := \exp(i\phi)\ket{\psi}$ for some $\phi \in [0, 2\pi)$.
%
% \begin{equation}
% \begin{aligned}
% \bra{\psi'}\ket{\varphi}\bra{\varphi}\ket{\psi'} &= \exp(-i\phi)\bra{\psi}\ket{\varphi}\bra{\varphi}\exp(i\phi)\ket{\psi} \\
% & = \exp(-i\phi)\exp(i\phi)\bra{\psi}\ket{\varphi}\bra{\varphi}\ket{\psi} \\
% & = \bra{\psi}\ket{\varphi}\bra{\varphi}\ket{\psi}
% \end{aligned}
% \end{equation}
%\end{proof}
%
%\begin{definition}
% A phase $\phi \in [0, 2\pi)$ is called qbit-global, if for some qbit states $\ket{\psi}, \ket{\varphi}$ $\ket{\psi} = \exp(i\phi)\ket{\varphi}$.
%\end{definition}
%
%\begin{lemma}
% When entangling qbits via projections one can disregard qbit-global phases.
%
% Two qbits are entangled via projection, if for some single qbit gates $M,N$
% and two orthonormal states $\ket{a}, \ket{b}$
%
% \begin{equation}
% C^{M,N}(i,j) = \ket{a}\bra{a}_j \otimes M_i + \ket{b}\bra{b}_j \otimes N_i
% \end{equation}
%
% \textbf{Remark.}
% In particular when entangling states using $CX$ and $CZ$ one can disregard qbit-global phases.
% This is immideatly clear when recalling \eqref{eq:CX_pr} and \eqref{eq:CZ_pr}.
%\end{lemma}
%
%\begin{proof}
% Let $\alpha, \beta \in [0, 2\pi)$ be some phases, $\ket{\psi}, \ket{\varphi}, \ket{\psi'} := \exp(i\alpha)\ket{\psi}, \ket{\varphi'} := \exp(i\beta)\ket{\varphi}$ some single qbit states,
% $M, N, \ket{a}, \ket{b}, C^{M,N}(i,j)$ as defined above.
%
%\begin{equation}
%\begin{aligned}
% C^{M,N}(1, 0) (\ket{\psi'}\otimes\ket{\varphi'}) & = \ket{a}\braket{a}{\varphi'}\otimes M\ket{\psi'} + \ket{b}\braket{b}{\varphi'} \otimes N\ket{\psi'} \\
% & = \exp(i\beta)\ket{a}\braket{a}{\varphi}\otimes\exp(i\alpha)M\ket{\phi} + \exp(i\beta)\ket{b}\braket{b}{\varphi}\otimes\exp(i\alpha)N\ket{\phi}\\
% & = \exp(i(\beta + \alpha))(\ket{a}\braket{a}{\varphi}\otimes M\ket{\psi} + \ket{b}\braket{b}{\varphi} \otimes N\ket{\psi})\\
% & = \exp(i(\beta + \alpha))C^{M,N}(1, 0) (\ket{\psi}\otimes\ket{\varphi})
%\end{aligned}
%\end{equation}
%
% Where $\exp(i(\beta + \alpha))$ is a multi-qbit-global phase which can be (following the above argumentation) disregarded.
%
%\end{proof}
%
%\begin{corrolary}
% One can disregard global phases of elements of the $C_1$ group.
%\end{corrolary}
%
%\begin{proof}
% As it has been shown above a quantum computer cannot measure global phases. Also
% the entanglement gates $CX, CZ$ map qbit-global phases to multi-qbit-global phases which cannot
% be measured. It has been shown above that one can choose the $C_1$ operators such that they do not yield
% a phase.
%\end{proof}
2019-11-01 18:07:45 +00:00
2019-11-05 10:21:26 +00:00
\begin { definition}
\begin { equation}
C_ L := \{ a \in C_ 1 | \nexists \phi \in [0, 2\pi ), b \in C_ L : a = \exp (i\phi )b\}
\end { equation}
Is called the non-trivial local Clifford group.
\end { definition}
\textbf { Remark.} When computing the elements of $ C _ L $ and their products one will realize that $ C _ L $ is not a group.
2019-12-14 09:29:34 +00:00
If one however disregards a global phase the product of two $ C _ L $ elements will be in $ C _ L $ again.
2019-11-05 10:21:26 +00:00
\begin { theorem}
\begin { equation}
| C_ L | = 24
\end { equation}
\end { theorem}
\begin { proof}
It is clear that $ \forall a \in C _ L $ a is a group isomorphism $ P \circlearrowleft $ : $ apa ^ \dagger a p' a ^ \dagger = a pp'a ^ \dagger $ .
2019-12-14 09:29:34 +00:00
Therefore $ a $ will preserve the (anti-)commutator relations of $ P $ .
Further note that $ Y = iXZ $ , so one has to consider the anti-commutator relations
of $ X,Z $ only.
2019-11-11 10:22:47 +00:00
2019-12-14 09:29:34 +00:00
As the transformations are unitary they preserve eigenvalues, so $ X $ can be mapped
to $ \pm X, \pm Y, \pm Z $ which gives $ 6 $ degrees of freedom, the image of $ Z $ has to
anti-commute with the image of $ X $ , so there are four degrees of freedom left which gives
a total of $ 24 $ degrees of freedom.
\end { proof}
\begin { theorem}
One can use $ C _ L $ instead of $ C _ 1 $ when studying stabilizer states and
the choice of $ C _ L $ is arbitrary.
\end { theorem}
\begin { proof}
Let $ \ket { \psi } $ be a stabilizer stabilized by $ \langle S _ i \rangle _ i $ . When applying an $ a \in C _ 1 $ to
$ \ket { \psi } $ $ a \ket { \psi } $ is stabilized by $ \langle a S _ i a ^ \dagger \rangle _ i $ , let $ b \in C _ L $ s.t.
$ a = \exp ( i \phi ) b $ then $ \forall j $ $ a S _ j a ^ \dagger = \exp ( i \phi ) b S _ j \exp ( - i \phi ) b ^ \dagger = b S _ j b ^ \dagger $ ,
so the dynamics of a state under the local Clifford group is fully described by $ C _ L $ and the choice of
the phases are arbitrary.
2019-11-05 10:21:26 +00:00
\end { proof}
2019-12-14 09:29:34 +00:00
From now on $ C _ L = \langle H, S \rangle $ (disregarding a global phase) will be used,
one can show (by construction) that $ H, S $ generate a possible choice of $ C _ L $ , as is
$ \langle \sqrt { - iX } , \sqrt { - iZ } \rangle $ that will be used in one specific operation on graph states.
$$ S = \left ( \begin { array } { cc } 1 & 0 \\ 0 & i \end { array } \right ) $$
$$ \sqrt { - iX } = \frac { 1 } { \sqrt { 2 } } \left ( \begin { array } { cc } 1 & i \\ i & 1 \end { array } \right ) $$
$$ \sqrt { - iZ } = \exp ( - i \frac { \pi } { 4 } ) \left ( \begin { array } { cc } 1 & 0 \\ 0 & - i \end { array } \right ) $$
2019-11-11 10:22:47 +00:00
\subsection { Introduction to the Graph Formalism}
The first step towards the simulation in the graph formalism has been
the discovery of the stabilizer states and stabilizer circuits \cite { gottesman2009} \cite { gottesman1997} .
They led to the faster simulation using stabilizer tableaux\cite { gottesman_ aaronson2008} and later
to the graph formalism\cite { schlingenmann2001} \cite { andersbriegel2005} \cite { vandennest_ ea2004} .
The following discussion eludicates the graph formalism and explains how the graph simulator works.
A naive state is just a vector containing the coefficients $ c _ i $ as defined in \ref { ref:nqbitsystems} .
It is a quite straight forward approach and gates are applied by updating the coefficients according
to the gate's matrix representation. A naive state has the time and space complexity $ \mathcal { O } ( 2 ^ n ) $ which limits the number
of qbits drastically. \\
The stabilizer tableaux represent the state by its stabilizers i.e. by those Pauli operators of which the
state is a $ + 1 $ eigenstate. This has a space complexity of $ \mathcal { O } ( n ^ 2 ) $ while updating the tableaux
has a time complexity of $ \mathcal { O } ( n ) $ for unitary gates and $ mathcal { O } ( n ^ 2 ) $ for measurements.
A graph state now represents the state by the gates that have been applied to it starting from the $ \ket { + } $ state:
\begin { equation}
\ket { +} := \bigotimes \limits _ { i=0} ^ { n-1} H_ i \ket { 0}
\end { equation}
2019-11-20 18:28:42 +00:00
\begin { definition}
\label { def:graph_ state}
2019-11-11 10:22:47 +00:00
A graph state $ \ket { G } $ is a 3-tuple $ ( V, E, O ) $ where $ ( V = \{ 0 , ..., n - 1 \} , E ) $ is a graph with the vertices $ V $ , edges $ E $
and vertex operators $ O = \{ o _ i | i = 0 , ..., n - 1 ; o _ i \in C _ L \forall i \} $ . The vertex operators and edges are defined
by the following relation:
\begin { equation}
2019-11-20 18:28:42 +00:00
\label { eq:g_ state}
2019-11-11 10:22:47 +00:00
\ket { G} = \left (\bigotimes \limits _ { i=0} ^ { n-1} o_ i \right )\left (\bigotimes \limits _ { \{ i, j\} \in E} CZ_ { i,j} \right ) \ket { +}
\end { equation}
2019-11-20 18:28:42 +00:00
\end { definition}
2019-11-22 16:27:35 +00:00
Where every $ o _ i $ acts on the $ i $ -th qbit.
2019-11-20 18:28:42 +00:00
One can show that any stabilizer state can be realized as a graph state (for instance in \cite { schlingenmann2001} ).
2019-11-25 20:37:48 +00:00
2019-11-20 18:28:42 +00:00
\subsection { Operations on the Graph State}
\subsubsection { Single Qbit Gates}
Recalling \eqref { eq:g_ state}
2019-11-25 20:37:48 +00:00
Makes it clear that for any single qbit gate $ g \in C _ L $ with $ g _ k $ being the gate
2019-11-20 18:28:42 +00:00
acting on qbit $ k $ the state changes according to
\begin { equation}
\begin { aligned}
2019-11-25 20:37:48 +00:00
g_ k \ket { G} & = g_ k \left (\bigotimes \limits _ { i=0} ^ { n-1} o_ { i} \right )\left (\bigotimes \limits _ { \{ i, j\} \in E} CZ_ { i,j} \right ) \ket { +} \\
& = \left (\bigotimes \limits _ { i=0} ^ { n-1} g_ k^ { \delta _ { i,k} } o_ { i} \right )\left (\bigotimes \limits _ { \{ i, j\} \in E} CZ_ { i,j} \right )\ket { +}
2019-11-20 18:28:42 +00:00
\end { aligned}
\end { equation}
2019-11-25 20:37:48 +00:00
meaning that the graph state $ ( V, E, O ) $ changes to $ ( V, E, \{ o _ 0 , ..., o _ { k - 1 } , go _ k, o _ { k + 1 } , ..., o _ { n - 1 } \} ) $
as $ C _ L $ is almost a group the element $ go _ k \in C _ L $ up to a global phase that is disregarded. All the results
2019-11-20 18:28:42 +00:00
of $ C _ L \times C _ L \rightarrow C _ L, a,b \mapsto ab $ have been precomputed in a lookup table and the vertex operators
are updated according to that lookup table.
\subsubsection { Controlled Phase Gate}
Recalling \eqref { eq:g_ state}
it is clear that some $ CZ $ application is less trivial
than a single qbit gate.
%\begin{struktogramm}(100, 50)
% \ifthenelse[10]{1, 4}
% {Both Vertex operators Commute with CZ}{\sTrue}{\sFalse}
% \change
% \ifend
%\end{struktogramm}
2019-10-31 12:58:45 +00:00
2019-11-22 16:27:35 +00:00
\subsubsection { Measurement of a Qbit}
Note that the $ Z $ gate is diagonal in the $ \{ \ket { 1 } _ s, \ket { 0 } _ s \} $ basis with eigen values $ 1 , - 1 $ .
This gives a simple expression for the projector on the $ \ket { 0 } _ s $ and $ \ket { 1 } _ s $ state of qbit $ k $ :
\begin { equation}
\tilde { P^ { v} _ { k} } := \frac { I_ k + (-1)^ vZ_ k} { 2} , v \in { 0, 1}
\end { equation}
This projector trivially commutes with any non-operand vertex operator yielding for a state
\begin { equation}
\begin { aligned}
\ket { \psi } := \left (\bigotimes \limits _ { \{ i,j\} \in E} CZ_ { i,j} \right ) \ket { +} \\
\tilde { P^ { v} _ { k} } \left (\bigotimes \limits _ { i=0} { n-1} o_ i\right )\ket { \psi } & =
\left (\bigotimes \limits _ { i=0,i \ne k} { n-1} o_ i\right ) \tilde { P^ { v} _ { k} } o_ k \ket { \psi } \\
& = \left (\bigotimes \limits _ { i=0,i \ne k} { n-1} o_ i\right ) o_ ko_ k^ \dagger \tilde { P^ { v} _ { k} } o_ k \ket { \psi } \\
& = \left (\bigotimes \limits _ { i=0,i \ne k} { n-1} o_ i\right ) o_ k = \frac { I_ k + (-1)^ v o_ k^ \dagger Z_ ko_ k} { 2} \ket { \psi }
\end { aligned}
\end { equation}
Now $ o _ k $ stabilizes $ P $ , as it is an element of $ C _ L $ , meaning that $ o _ k ^ \dagger Z _ k o _ k \in \{ - 1 , 1 \} \{ X _ k, Y _ k, Z _ k \} $
Which gives a new projector on a Pauli matrix: $ P _ k : = o _ k ^ \dagger Z _ ko _ k $
2019-10-11 09:47:17 +00:00
\subsection { Graph Storage}
One of the gread advantages of simulating in the graph formalism is a great increase
in simulation performance and a lower memory requirement. The simulation of
at least $ 10 ^ 6 $ qbits on a common desktop computer should be possible\cite { andersbriegel2005} .
Therefore one has to take care when choosing a representation of the graph state.
The following
2019-11-01 18:07:45 +00:00
FIXME
2019-11-11 10:22:47 +00:00
2019-11-01 18:07:45 +00:00
\subsection { Usage}
FIXME
\subsection { Performance}
FIXME