pre meeting

This commit is contained in:
Daniel Knüttel 2020-04-21 12:41:03 +02:00
parent 91577ef2b6
commit 1a24ef8ddf
3 changed files with 25 additions and 15 deletions

View File

@ -309,8 +309,8 @@
\begin{frame}{Example: The $5$ Qbit EPR State} \begin{frame}{Example: The $5$ Qbit EPR State}
\begin{itemize} \begin{itemize}
\item{Start from $\ket{0}^{\otimes n}$.} \item{Start from $\ket{0}^{\otimes 5}$.}
\item{Get to the state $\ket{\psi} = \frac{\ket{0}^{\otimes n} + \ket{1}^{\otimes n}}{\sqrt{2}}$.} \item{Get to the state $\ket{\psi} = \frac{\ket{0}^{\otimes 5} + \ket{1}^{\otimes 5}}{\sqrt{2}}$.}
\item{Use the circuit \\ \item{Use the circuit \\
\[ \[
\Qcircuit @C=1em @R=.7em { \Qcircuit @C=1em @R=.7em {
@ -319,12 +319,12 @@
& \qw & \qw & \qw & \gate{X} & \qw & \qw & \qw & \qw &\qw \\ & \qw & \qw & \qw & \gate{X} & \qw & \qw & \qw & \qw &\qw \\
& \qw & \qw & \qw & \qw & \qw & \gate{X} & \qw & \qw &\qw \\ & \qw & \qw & \qw & \qw & \qw & \gate{X} & \qw & \qw &\qw \\
& \qw & \qw & \qw & \qw & \qw & \qw & \qw & \gate{X} &\qw \\ & \qw & \qw & \qw & \qw & \qw & \qw & \qw & \gate{X} &\qw \\
} }.
\] \]
} }
\item{The state has the form \item{The state has the form
\begin{equation} \begin{equation}
\ket{\psi} = \left(\prod\limits_{1 < i < 5} CX_{i,0}\right) H_0 \ket{0}. \ket{\psi} = \left(\prod\limits_{1 < i < 5} CX_{i,0}\right) H_0 \ket{0}^{\otimes 5}.
\end{equation}} \end{equation}}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
@ -342,10 +342,10 @@
& \gate{H} & \qw & \qw & \gate{Z} & \qw & \qw & \qw & \qw & \gate{H} &\qw \\ & \gate{H} & \qw & \qw & \gate{Z} & \qw & \qw & \qw & \qw & \gate{H} &\qw \\
& \gate{H} & \qw & \qw & \qw & \qw & \gate{Z} & \qw & \qw & \gate{H} &\qw \\ & \gate{H} & \qw & \qw & \qw & \qw & \gate{Z} & \qw & \qw & \gate{H} &\qw \\
& \gate{H} & \qw & \qw & \qw & \qw & \qw & \qw & \gate{Z} & \gate{H} &\qw \\ & \gate{H} & \qw & \qw & \qw & \qw & \qw & \qw & \gate{Z} & \gate{H} &\qw \\
} }.
\] \]
} }
\item{Switching from starting state $\ket{0}^{\otimes n}$ to $\ket{+}^{\otimes n}$ gives the \item{Switching from starting state $\ket{0}^{\otimes 5}$ to $\ket{+}^{\otimes 5}$ gives the
graphical representation.} graphical representation.}
\end{itemize} \end{itemize}
@ -465,6 +465,8 @@
\item{ \item{
If just one vertex operator has been cleared the other vertex is isolated If just one vertex operator has been cleared the other vertex is isolated
and one can precompute all resulting states.} and one can precompute all resulting states.}
\item{One can show that the probability amplitudes when measuring a qbit of a graphical state
are either $0$, $1$ or $\frac{1}{2}$.}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
} }
@ -500,8 +502,10 @@
\item{To increase simulation efficiency the core of both simulators has been \item{To increase simulation efficiency the core of both simulators has been
implemented in \lstinline{C}.} implemented in \lstinline{C}.}
\item{The dense vector states are stored in \lstinline{numpy} arrays.} \item{The dense vector states are stored in \lstinline{numpy} arrays.}
\item{The graph is stored in an length $n$ array of linked lists. The vertex operators \item{The graph is stored in an length $n$ array of linked lists.}
are stored in a \lstinline{uint8_t} array.} \item{The vertex operators are local Clifford operators. The local Clifford
group as $24$ elements, they are represented by integers
stored in a \lstinline{uint8_t} array.}
\end{itemize} \end{itemize}
\end{frame} \end{frame}
} }

View File

@ -16,7 +16,7 @@ def Mi(nqbits, i, M):
def H_interaction(nqbits): def H_interaction(nqbits):
interaction_terms = [Mi(nqbits, i, Z) @ Mi(nqbits, i+1, Z) for i in range(nqbits)] interaction_terms = [Mi(nqbits, i, Z) @ Mi(nqbits, i+1, Z) for i in range(nqbits - 1)]
return sum(interaction_terms) return sum(interaction_terms)
def H_field(nqbits, g): def H_field(nqbits, g):

View File

@ -20,8 +20,8 @@ matplotlib.rcParams.update(
nqbits = 6 nqbits = 6
g = 3 g = 3
N_trot = 80 N_trot = 80
t_stop = 9 t_stop = 29
delta_t = 0.09 delta_t = 0.1
qbits = list(range(nqbits)) qbits = list(range(nqbits))
n_sample = 2200 n_sample = 2200
@ -49,8 +49,8 @@ for t in np.arange(0, t_stop, delta_t):
errors_sampling.append(bootstrap(result[0], n_sample, n_sample, n_sample // 2, np.average)) errors_sampling.append(bootstrap(result[0], n_sample, n_sample, n_sample // 2, np.average))
#amplitude = np.sum(np.abs(state._qm_state[measure_coefficient_mask])**2) amplitude = np.sum(np.abs(state._qm_state[measure_coefficient_mask])**2)
#amplitudes_qc.append(amplitude) amplitudes_qc.append(amplitude)
# Simulation using matrices # Simulation using matrices
np_zero_state = np.zeros(2**nqbits) np_zero_state = np.zeros(2**nqbits)
@ -68,11 +68,17 @@ print()
print("done.") print("done.")
results_qc = np.array(results_qc) results_qc = np.array(results_qc)
amplitudes_qc = np.array(amplitudes_qc)
errors_trotter = (np.arange(0, t_stop, delta_t) * g)**3 / N_trot**3 errors_trotter = (np.arange(0, t_stop, delta_t))**3 / N_trot**3
errors_sampling = np.array(errors_sampling) errors_sampling = np.array(errors_sampling)
#errors_sampling = np.abs(results_qc - amplitudes_qc)
#errors_sampling = (amplitudes_qc * (1 - amplitudes_qc))**2 / n_sample
#hm1 = plt.errorbar(np.arange(0, t_stop, delta_t)
# , results_qc
# , yerr=(errors_sampling + errors_trotter)
# , color="red")
h0 = plt.errorbar(np.arange(0, t_stop, delta_t) h0 = plt.errorbar(np.arange(0, t_stop, delta_t)
, results_qc , results_qc
, yerr=errors_sampling , yerr=errors_sampling