2020-01-22 14:35:47 +00:00
|
|
|
% vim: ft=tex
|
|
|
|
\section{Quantum Computing}
|
|
|
|
|
|
|
|
\subsection{Qbits and Gates}
|
|
|
|
\subsubsection{Single Qbits}
|
|
|
|
|
|
|
|
\begin{definition}
|
2020-03-23 15:02:07 +00:00
|
|
|
A qbit is a two level quantum mechanical system \cite{nielsen_chuang_2010}, i.e. it has the eigenbasis
|
2020-01-22 14:35:47 +00:00
|
|
|
$ \{\ket{\uparrow} \equiv \ket{1}, \ket{\downarrow} \equiv \ket{0}\} $
|
2020-02-21 16:59:00 +00:00
|
|
|
with $\braket{\uparrow}{\downarrow} = 0$. In the following this basis will be called
|
|
|
|
the $Z$ basis in analogy to the conventions used in spin systems ($\sigma_Z$). For some computations
|
2020-03-05 09:48:13 +00:00
|
|
|
it can be useful to have component vectors; $\ket{\uparrow} \equiv \left(\begin{array}{c} 0 \\ 1\end{array} \right)$ and
|
2020-01-22 14:35:47 +00:00
|
|
|
$\ket{\downarrow} \equiv \left(\begin{array}{c} 1 \\ 0 \end{array} \right)$
|
|
|
|
are used in these cases.
|
|
|
|
\end{definition}
|
|
|
|
|
2020-03-16 12:16:33 +00:00
|
|
|
A gate acting on a qbit is a unitary operator $G \in U(2)$. One can show that
|
2020-03-16 12:20:09 +00:00
|
|
|
$\forall G \in U(2)$ $G$ can be written as a product of unitary generator matrices
|
|
|
|
\cite[Chapter 4.2]{nielsen_chuang_2010}\cite[Chapter 4.3]{kaye_ea2007}\cite[Chapter 2]{marquezino_ea_2019};
|
2020-03-05 09:48:13 +00:00
|
|
|
common choices for the generators are $ X, H, R_{\phi}$ or $Z, H, R_{\phi}$ with
|
2020-01-22 14:35:47 +00:00
|
|
|
\label{ref:singleqbitgates}
|
|
|
|
|
|
|
|
\begin{equation}
|
2020-01-27 19:01:34 +00:00
|
|
|
\begin{aligned}
|
|
|
|
& X := \left(\begin{array}{cc} 0 & 1 \\ 1 & 0\end{array}\right) \\
|
|
|
|
& Z := \left(\begin{array}{cc} 1 & 0 \\ 0 & -1\end{array}\right) \\
|
|
|
|
& H := \frac{1}{\sqrt{2}}\left(\begin{array}{cc} 1 & 1 \\ 1 & -1\end{array}\right) \\
|
|
|
|
& R_{\phi} := \left(\begin{array}{cc} 1 & 0 \\ 0 & \exp(i\phi)\end{array}\right)\\
|
2020-03-05 09:48:13 +00:00
|
|
|
& I := \left(\begin{array}{cc} 1 & 0 \\ 0 & 1\end{array}\right). \\
|
2020-01-27 19:01:34 +00:00
|
|
|
\end{aligned}
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
|
|
|
Note that $X = HZH$ and $Z = R_{\pi}$, so the set of $H, R_\phi$ is sufficient.
|
2020-02-21 16:59:00 +00:00
|
|
|
Further note that the basis vectors are chosen s.t. $Z\ket{0} = +\ket{0}$ and $Z\ket{1} = -\ket{1}$;
|
2020-03-05 09:48:13 +00:00
|
|
|
transforming to the other Pauli eigenstates is done using $H$ and $SH$
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
2020-02-21 16:59:00 +00:00
|
|
|
S := R_{\frac{\pi}{2}} = \left(\begin{array}{cc} 1 & 0 \\ 0 & i\end{array}\right)
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
\begin{equation}
|
2020-03-05 09:48:13 +00:00
|
|
|
S H Z H^\dagger S^\dagger = S X S^\dagger = Y.
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
2020-02-21 16:59:00 +00:00
|
|
|
The following states are the $\pm 1$ eigenstates of the $X,Y,Z$ operators
|
|
|
|
and will be used in some calculations later:
|
2020-01-27 19:01:34 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
\begin{aligned}
|
|
|
|
&\ket{+_X} \equiv \ket{+} := \frac{1}{\sqrt{2}} (\ket{0} + \ket{1}) \\
|
|
|
|
&\ket{-_X} \equiv \ket{-} := \frac{1}{\sqrt{2}} (\ket{0} - \ket{1}) \\
|
|
|
|
&\ket{+_Y} := \frac{1}{\sqrt{2}} (\ket{0} + i\ket{1}) \\
|
|
|
|
&\ket{-_Y} := \frac{1}{\sqrt{2}} (\ket{0} - i\ket{1}) \\
|
|
|
|
&\ket{+_Z} := \ket{0} \\
|
|
|
|
&\ket{-_Z} := \ket{1} \\
|
|
|
|
\end{aligned}
|
|
|
|
\end{equation}
|
|
|
|
|
2020-02-21 16:59:00 +00:00
|
|
|
\subsubsection{Many-Qbit Systems}
|
2020-01-29 10:19:13 +00:00
|
|
|
\label{ref:many_qbits}
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{postulate}
|
2020-03-05 09:48:13 +00:00
|
|
|
A $n$-qbit quantum mechanical state is the tensor product of the $n$ one-qbit
|
|
|
|
states \cite[Postulate 4]{nielsen_chuang_2010}.
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{postulate}
|
|
|
|
|
|
|
|
Let $\ket{0}_s := \left(\begin{array}{c} 1 \\ 0 \end{array} \right)$ and $\ket{1}_s := \left(\begin{array}{c} 0 \\ 1 \end{array} \right)$
|
2020-03-05 09:48:13 +00:00
|
|
|
be the basis of the one-qbit systems. Then two-qbit basis states are
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
\ket{0} := \ket{0b00} := \ket{0}_s \otimes \ket{0}_s := \left(\begin{array}{c} 1 \\ 0 \\ 0 \\ 0 \end{array} \right)
|
|
|
|
\end{equation}
|
|
|
|
\begin{equation}
|
|
|
|
\ket{1} := \ket{0b01} := \ket{0}_s \otimes \ket{1}_s := \left(\begin{array}{c} 0 \\ 1 \\ 0 \\ 0 \end{array} \right)
|
|
|
|
\end{equation}
|
|
|
|
\begin{equation}
|
|
|
|
\ket{2} := \ket{0b10} := \ket{1}_s \otimes \ket{0}_s := \left(\begin{array}{c} 0 \\ 0 \\ 1 \\ 0 \end{array} \right)
|
|
|
|
\end{equation}
|
|
|
|
\begin{equation}
|
2020-03-05 09:48:13 +00:00
|
|
|
\ket{3} := \ket{0b11} := \ket{1}_s \otimes \ket{1}_s := \left(\begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right).
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
2020-02-21 16:59:00 +00:00
|
|
|
The $n$-qbit basis states can be constructed in a similar manner.
|
2020-03-05 09:48:13 +00:00
|
|
|
A general $n$-qbit state is now a superposition of the
|
|
|
|
integer states
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
2020-03-02 09:46:59 +00:00
|
|
|
\label{eq:ci}
|
2020-03-05 09:48:13 +00:00
|
|
|
\ket{\psi} = \sum\limits_{i = 0}^{2^n - 1} c_i \ket{i} .
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
2020-02-21 16:59:00 +00:00
|
|
|
|
2020-03-05 09:48:13 +00:00
|
|
|
with the normation condition
|
2020-01-22 14:35:47 +00:00
|
|
|
\begin{equation}
|
2020-03-05 09:48:13 +00:00
|
|
|
\sum\limits_{i = 0}^{2^n - 1} |c_i|^2 = 1.
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
|
|
|
The states $\ket{i}$ for $i = 0, ..., 2^{n}-1$ are called integer states. Note
|
2020-03-23 15:02:07 +00:00
|
|
|
that integer states are eigenstates of the $Z$ operators.\\
|
|
|
|
The computational basis is
|
|
|
|
$\left\{\ket{i_0} \otimes ... \otimes \ket{i_{n-1}} \middle| i_0, ..., i_{n-1} = 0, 1\right\}$.
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{definition}
|
2020-02-21 16:59:00 +00:00
|
|
|
For a single-qbit gate $U$ and a qbit $j = 0, 1, ..., n - 1$
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
U_j := \left(\bigotimes\limits_{i = 0}^{j - 1} I\right)
|
|
|
|
\otimes U
|
|
|
|
\otimes \left(\bigotimes\limits_{i = j + 1}^{n - 1} I \right)
|
|
|
|
\end{equation}
|
2020-02-21 16:59:00 +00:00
|
|
|
is acting on qbit $j$.
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{definition}
|
|
|
|
|
2020-02-21 16:59:00 +00:00
|
|
|
% XXX
|
|
|
|
\newpage
|
|
|
|
|
2020-01-22 14:35:47 +00:00
|
|
|
\begin{definition}\label{def:CU}
|
|
|
|
For two qbits $i,j = 0, 1, ..., n - 1$, $i \neq j$ and a gate $U_i$ acting on $i$
|
|
|
|
the controlled version of $U$ is defined by
|
2020-02-19 10:19:06 +00:00
|
|
|
\begin{equation}
|
|
|
|
\begin{aligned}\label{eq:CU}
|
2020-03-23 15:02:07 +00:00
|
|
|
CU_{i, j} &:= \ket{0}\bra{0}_j\otimes I_i
|
2020-02-19 10:19:06 +00:00
|
|
|
+ \ket{1}\bra{1}_j \otimes U_i \\
|
2020-03-23 15:02:07 +00:00
|
|
|
&:= \left(\bigotimes\limits_{l < j} I\right)
|
2020-02-19 10:19:06 +00:00
|
|
|
\otimes \ket{0}\bra{0}
|
|
|
|
\otimes \left(\bigotimes\limits_{j < l < i} I\right)
|
|
|
|
\otimes I
|
|
|
|
\otimes \left(\bigotimes\limits_{j > l} I \right)\\
|
2020-03-23 15:02:07 +00:00
|
|
|
&\mbox{ } + \left(\bigotimes\limits_{l < j} I\right)
|
2020-02-19 10:19:06 +00:00
|
|
|
\otimes \ket{1}\bra{1}
|
|
|
|
\otimes \left(\bigotimes\limits_{j < l < i} I\right)
|
|
|
|
\otimes U
|
|
|
|
\otimes \left(\bigotimes\limits_{j > l} I \right)\\
|
|
|
|
\end{aligned}
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
2020-02-19 10:19:06 +00:00
|
|
|
where without loss of generality $j < i$; the other case is analogous.
|
|
|
|
|
2020-03-05 09:48:13 +00:00
|
|
|
In particular for $X, Z$
|
2020-01-22 14:35:47 +00:00
|
|
|
\begin{equation}\label{eq:CX_pr}
|
|
|
|
CX(i, j) = \ket{0}\bra{0}_j\otimes I_i + \ket{1}\bra{1}_j \otimes X_i
|
|
|
|
\end{equation}
|
|
|
|
\begin{equation}\label{eq:CZ_pr}
|
2020-03-05 09:48:13 +00:00
|
|
|
CZ(i, j) = \ket{0}\bra{0}_j\otimes I_i + \ket{1}\bra{1}_j \otimes Z_i .
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
|
|
|
\end{definition}
|
|
|
|
|
2020-02-19 10:19:06 +00:00
|
|
|
In Definition \ref{def:CU} $i$ is called the act-qbit and $j$ the control-qbit. In words
|
2020-01-22 14:35:47 +00:00
|
|
|
$CU$ applies the gate $U$ to the act-qbit if the control-qbit is in its $\ket{1}$ state.
|
|
|
|
|
|
|
|
One can show that the gates in \ref{ref:singleqbitgates} together with an entanglement gate, such as $CX$ or $CZ$ are enough
|
2020-03-23 15:02:07 +00:00
|
|
|
to generate an arbitrary $n$-qbit gate \cite{nielsen_chuang_2010}\cite[Chapter 4.3]{kaye_ea2007}\cite{barenco_ea_1995}.
|
2020-03-05 09:48:13 +00:00
|
|
|
The matrix representation of $CX$ and $CZ$ for two qbits is given by
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
CX_{1, 0} = \left(\begin{array}{cccc} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 1\\ 0 & 0 & 1 & 0 \end{array}\right)
|
|
|
|
\end{equation}
|
|
|
|
\begin{equation}
|
2020-03-05 09:48:13 +00:00
|
|
|
CZ_{1, 0} = \left(\begin{array}{cccc} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & -1 \end{array}\right).
|
2020-01-22 14:35:47 +00:00
|
|
|
\end{equation}
|
|
|
|
|
|
|
|
\subsubsection{Measurements}
|
|
|
|
|
|
|
|
\begin{postulate}
|
|
|
|
Let
|
|
|
|
$$\ket{\psi} = \alpha\ket{\phi_1} \otimes \ket{1}_j + \beta\ket{\phi_0} \otimes \ket{0}_j$$
|
2020-02-21 16:59:00 +00:00
|
|
|
be a $n$-qbit state
|
2020-01-22 14:35:47 +00:00
|
|
|
where $\ket{1}_j, \ket{0}_j$ denote the $j$-th qbit state and $|\alpha|^2 + |\beta|^2 = 1$.
|
|
|
|
Then the measurement of the $j$-th qbit will yield
|
2020-01-28 10:07:52 +00:00
|
|
|
$$\ket{\phi_1} \otimes \ket{1}_j$$
|
2020-01-22 14:35:47 +00:00
|
|
|
with probability $|\alpha|^2$ and
|
2020-01-28 10:07:52 +00:00
|
|
|
$$\ket{\phi_0} \otimes \ket{0}_j$$
|
2020-01-22 14:35:47 +00:00
|
|
|
with probability $|\beta|^2$. This is called collapse of the wave function.
|
|
|
|
\end{postulate}
|
|
|
|
|
|
|
|
Measuring a qbit will also yield a classical result $0$ or $1$ with the respective probabilities.
|
2020-01-27 19:01:34 +00:00
|
|
|
Measurements are always performed in the computational basis, i.e. for a qbit
|
2020-02-21 16:59:00 +00:00
|
|
|
$i$ $Z_i$ is measured. The $+1$ eigenvalue of $Z_i$ is $\ket{0}_i$, $\ket{1}_i$ for $-1$.
|
2020-01-22 14:35:47 +00:00
|
|
|
|
|
|
|
\begin{corrolary}
|
|
|
|
In general the measurement of a qbit is not invertible, in particular it cannot be represented as a
|
|
|
|
unitary operator.
|
|
|
|
\end{corrolary}
|
|
|
|
|
|
|
|
\begin{proof}
|
2020-03-05 09:48:13 +00:00
|
|
|
The measuerment is not injective: Measuring both
|
2020-01-22 14:35:47 +00:00
|
|
|
$\ket{0}$ and $\frac{1}{\sqrt{2}}(\ket{0} + \ket{1})$ (can) map to $\ket{0}$.
|
|
|
|
|
|
|
|
Any unitary matrix $U$ has the inverse $U^\dagger \equiv U^{-1}$.
|
|
|
|
\end{proof}
|
|
|
|
|
2020-03-05 09:48:13 +00:00
|
|
|
Because a measurement is not unitary it is not a gate in the sense of the definition above.
|
2020-01-22 14:35:47 +00:00
|
|
|
In the following discussion the term \textit{measurement gate} will be used from time
|
|
|
|
to time as a measurement can be treated similarely while doing numerics.
|
|
|
|
|
|
|
|
|
|
|
|
\subsection{Quantum Circuits}
|
2020-03-07 14:35:47 +00:00
|
|
|
\label{ref:quantum_circuits}
|
2020-01-22 14:35:47 +00:00
|
|
|
|
2020-02-21 16:59:00 +00:00
|
|
|
As mentioned in \ref{ref:many_qbits} one can approximate an arbitrary $n$-qbit
|
|
|
|
gate $U$ as a product of some single-qbit gates and either $CX$ or $CZ$.
|
2020-03-05 09:48:13 +00:00
|
|
|
Writing (possibly huge) products of matrices is quite unpractical and
|
2020-01-29 10:19:13 +00:00
|
|
|
unreadable. To address this problem quantum circuits have been introduced.
|
2020-02-21 16:59:00 +00:00
|
|
|
These represent the qbits as a horizontal line and a gate acting on a qbit is
|
2020-01-29 10:19:13 +00:00
|
|
|
a box with a name on the respective line. Quantum circuits are read from
|
|
|
|
left to right. This means that a gate $U_i = Z_i X_i H_i$ has the
|
2020-03-05 09:48:13 +00:00
|
|
|
circuit representation
|
2020-01-27 19:01:34 +00:00
|
|
|
|
|
|
|
\[
|
|
|
|
\Qcircuit @C=1em @R=.7em {
|
|
|
|
& \gate{H} & \gate{X} & \gate{Z} &\qw \\
|
2020-03-05 09:48:13 +00:00
|
|
|
}.
|
2020-01-27 19:01:34 +00:00
|
|
|
\]
|
|
|
|
|
2020-02-21 16:59:00 +00:00
|
|
|
The controlled gates (such as $CX$ and $CZ$) have a vertical line from the control-qbit to
|
2020-03-05 09:48:13 +00:00
|
|
|
the gate, for instance the circuit for $CZ_{2, 1}CX_{2,0}$ is
|
2020-01-27 19:01:34 +00:00
|
|
|
|
|
|
|
\[
|
|
|
|
\Qcircuit @C=1em @R=.7em {
|
|
|
|
& \qw & \ctrl{2} & \qw & \qw &\qw \\
|
|
|
|
& \qw & \qw & \qw & \ctrl{1} &\qw \\
|
2020-03-05 09:48:13 +00:00
|
|
|
& \qw & \gate{X} & \qw & \gate{Z} &\qw &\rstick{.}\\
|
2020-01-27 19:01:34 +00:00
|
|
|
}
|
|
|
|
\]
|
|
|
|
|
2020-02-19 11:36:56 +00:00
|
|
|
Several qbits can be abbreviated by writing a slash on the qbit line:
|
|
|
|
|
|
|
|
\[
|
|
|
|
\Qcircuit @C=1em @R=.7em {
|
|
|
|
& {/} \qw & \qw & \gate{Z^{\otimes n}} & \qw \\
|
|
|
|
}
|
|
|
|
\]
|
|
|
|
|
|
|
|
|
2020-01-29 10:19:13 +00:00
|
|
|
\subsection{Quantum Algorithms}
|
2020-03-24 14:11:16 +00:00
|
|
|
\label{ref:quantum_algorithms}
|
2020-01-29 10:19:13 +00:00
|
|
|
|
2020-03-23 15:02:07 +00:00
|
|
|
The great hope behind quantum computing is that it will speed up some
|
|
|
|
computations exponentially using algorithms that utilize the laws of quantum
|
|
|
|
mechanics. Current algorithms are based upon quantum search and quantum fourier
|
|
|
|
transform \cite{nielsen_chuang_2010}. The latter is particular interesting for
|
|
|
|
physical problems as it is a key component in the phase estimation algorithm
|
|
|
|
that can be used to analyze the spectrum of the transfer matrix:
|
2020-02-19 11:36:56 +00:00
|
|
|
|
|
|
|
\begin{equation}
|
|
|
|
T = \exp(itH)
|
|
|
|
\end{equation}
|
|
|
|
|
2020-03-23 15:02:07 +00:00
|
|
|
The spectrum of $T$ can now be estimated by using the phase estimation circuit
|
2020-02-19 11:36:56 +00:00
|
|
|
|
|
|
|
\[
|
|
|
|
\Qcircuit @C=1em @R=.7em {
|
|
|
|
& \lstick{\ket{0}} & {/^N} \qw & \gate{H^{\otimes n}} & \ctrl{1} & \gate{FT^\dagger} & \qw & \meter & \rstick{x}\\
|
2020-03-05 09:48:13 +00:00
|
|
|
& \lstick{\ket{\varphi}} & {/} \qw & \qw & \gate{T} & \qw & {/} \qw & \qw& \rstick{\ket{\varphi}.} \\
|
2020-02-19 11:36:56 +00:00
|
|
|
}
|
|
|
|
\]
|
|
|
|
|
2020-03-23 15:02:07 +00:00
|
|
|
Where $T\ket{\varphi} = \exp(2\pi i\varphi) \ket{\varphi}$ and the measurement
|
|
|
|
result $\tilde{\varphi} = \frac{x}{2^n}$ is an estimation for $\varphi$. If
|
|
|
|
a success rate of $1-\epsilon$ and an accuracy of $| \varphi - \tilde{\varphi}
|
|
|
|
| < 2^{-m}$ is wanted, then $N = m + \log_2(2 + \frac{1}{2\epsilon})$ qbits are
|
|
|
|
required \cite{nielsen_chuang_2010}\cite{lehner2019}.
|
2020-01-29 10:19:13 +00:00
|
|
|
|
2020-03-23 15:02:07 +00:00
|
|
|
%Another possible way to use quantum computers in physics is to simulate a system's
|
|
|
|
%time evolution using the transfer matrix. By mapping an interesting system to
|
|
|
|
%the qbit space and applying the
|