|
|
|
@@ -172,7 +172,13 @@ For the graphical state $(V, E, O)$ the list of vertices $V$ can be stored impli
|
|
|
|
|
by demanding $V = \{0, ..., n - 1\}$. This leaves two components that have to be stored:
|
|
|
|
|
The edges $E$ and the vertex operators $O$. Storing the vertex operators is
|
|
|
|
|
done using a \lstinline{uint8_t} array. Every local Clifford operator is
|
|
|
|
|
associated with an integer ranging from $0$ to $23$. Their order is
|
|
|
|
|
associated with an integer ranging from $0$ to $23$
|
|
|
|
|
\footnote{
|
|
|
|
|
\cite{andersbriegel2005} also uses integers from $0$ to $23$ to represent
|
|
|
|
|
the Clifford operators. The authors do not describe the mapping from integer
|
|
|
|
|
to operator and the order might be different.
|
|
|
|
|
}
|
|
|
|
|
. Their order is
|
|
|
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
|
\begin{aligned}
|
|
|
|
@@ -224,7 +230,8 @@ a vertex. Also one must take care to keep the memory required to store a state
|
|
|
|
|
low. To meet both requirements a linked list-array hybrid is used. For every
|
|
|
|
|
vertex the neighbourhood is stored in a sorted linked list (which is a sparse
|
|
|
|
|
representation of a column vector) and these adjacency lists are stored in
|
|
|
|
|
a length $n$ array.
|
|
|
|
|
a length $n$ array. \cite{andersbriegel2005} uses the same representation for
|
|
|
|
|
the graph.
|
|
|
|
|
|
|
|
|
|
Using this storage method all operations - including searching and toggling edges -
|
|
|
|
|
inherit their time complexity from the sorted linked list.
|
|
|
|
@@ -240,7 +247,7 @@ three classes of operations.
|
|
|
|
|
\begin{description}
|
|
|
|
|
\item[\hspace{-1em}]{\lstinline{RawGraphState.apply_C_L}\\
|
|
|
|
|
This method implements local Clifford gates. It takes the qbit index
|
|
|
|
|
and the index of the local Clifford operator (ranging form $0$ to $23$).}
|
|
|
|
|
and the index of the local Clifford operator (ranging from $0$ to $23$).}
|
|
|
|
|
\item[\hspace{-1em}]{\lstinline{RawGraphState.apply_CZ}\\
|
|
|
|
|
Applies the $CZ$ gate to the state. The first argument is the
|
|
|
|
|
act-qbit, the second the control qbit (note that this is just for
|
|
|
|
@@ -270,7 +277,7 @@ of the user.
|
|
|
|
|
This implementation reads byte code from a file and executes it. The execution is
|
|
|
|
|
always done in three steps:
|
|
|
|
|
|
|
|
|
|
\begin{enumerate}[1]
|
|
|
|
|
\begin{enumerate}[1.]
|
|
|
|
|
\item{Initializing the state according the header of the byte code file.}
|
|
|
|
|
\item{Applying operations given by the byte code to the state. This includes local
|
|
|
|
|
Clifford gates, $CZ$ gates and measurements (the measurement outcome is ignored).}
|
|
|
|
@@ -363,7 +370,7 @@ circuits are used. Length $m$ circuits are generated from the probability space
|
|
|
|
|
with the uniform distribution. The continuous part $[0, 2\pi)$ is ignored when
|
|
|
|
|
generating random circuits for the graphical simulator; in order to generate
|
|
|
|
|
random circuits for dense vector simulations this is used as the argument $\phi$ of the
|
|
|
|
|
$R_\phi$ gate. For $m=1$ an outcome is mapped to a gate where
|
|
|
|
|
$R_\phi$ gate. For $m=1$ an outcome is mapped to a gate with
|
|
|
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
|
\begin{aligned}
|
|
|
|
@@ -382,7 +389,12 @@ dense vector simulator $S$ can be replaced by $R_\phi$ with the parameter $x$.
|
|
|
|
|
|
|
|
|
|
Using this method circuits are generated and applied both to graphical and
|
|
|
|
|
dense vector states and the time required to execute the operations
|
|
|
|
|
\cite{timeit} is measured. The resulting graph can be seen in
|
|
|
|
|
\cite{timeit} is measured\footnote{
|
|
|
|
|
The used computer had an \lstinline{Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz} processor,
|
|
|
|
|
\lstinline{7.7 GiB} RAM, and \lstinline{27 GiB} SSD swap space (which was unused).
|
|
|
|
|
The operating system was \lstinline{Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux}.
|
|
|
|
|
|
|
|
|
|
}. The resulting graph can be seen in
|
|
|
|
|
Figure \ref{fig:scaling_qbits_linear} and Figure \ref{fig:scaling_qbits_log}.
|
|
|
|
|
Note that in both cases the length of the circuits have been scaled linearly
|
|
|
|
|
with the amount of qbits and the measured time was divided by the number of
|
|
|
|
@@ -421,11 +433,11 @@ the stabilizer tableaux like CHP \cite{CHP} with an average runtime behaviour
|
|
|
|
|
of $\mathcal{O}\left(n\log(n)\right)$ instead of $\mathcal{O}\left(n^2\right)$.
|
|
|
|
|
|
|
|
|
|
One should be aware that the gate execution time (the time required to apply
|
|
|
|
|
a gate to the state) highly depends on the state it is applied to. For the
|
|
|
|
|
a gate to the state) highly depends on the state it is applied to \cite{andersbriegel2005}. For the
|
|
|
|
|
dense vector simulator and CHP this is not true: Gate execution time is
|
|
|
|
|
constant for all gates and states. Because the graphical simulator has to
|
|
|
|
|
toggle neighbourhoods the gate execution time of the $CZ$ gate varies
|
|
|
|
|
significantly. The plot Figure \ref{fig:scaling_circuits_linear}
|
|
|
|
|
toggle neighbourhoods the gate execution time of the $CZ$ and $M$ gates vary
|
|
|
|
|
significantly \cite{andersbriegel2005}. The plot Figure \ref{fig:scaling_circuits_linear}
|
|
|
|
|
shows the circuit execution time for two different numbers of qbits. One can observe three
|
|
|
|
|
regimes:
|
|
|
|
|
|
|
|
|
@@ -455,7 +467,7 @@ regimes:
|
|
|
|
|
|
|
|
|
|
These three regimes can be explained when considering the graphical states that
|
|
|
|
|
typical live in these regimes. With increased circuit length the amount of
|
|
|
|
|
edges increases which makes toggling neighbourhoods harder. Graphs from the
|
|
|
|
|
edges increases which makes toggling neighbourhoods harder \cite{andersbriegel2005}. Graphs from the
|
|
|
|
|
low-linear, intermediate and high-linear regime can be seen in Figure
|
|
|
|
|
\ref{fig:graph_low_linear_regime}, Figure \ref{fig:graph_intermediate_regime}
|
|
|
|
|
and Figure \ref{fig:graph_high_linear_regime}. Due to the great amount of edges
|
|
|
|
|