bachelor_thesis/thesis/chapters/quantum_computing.tex

257 lines
10 KiB
TeX
Raw Normal View History

2020-01-22 14:35:47 +00:00
% vim: ft=tex
\section{Quantum Computing}
\subsection{Qbits and Gates}
\subsubsection{Single Qbits}
\begin{definition}
A qbit is a two level quantum mechanical system, i.e. it has the eigenbasis
$ \{\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-01-22 14:35:47 +00:00
it can be useful to have component vectors, $\ket{\uparrow} \equiv \left(\begin{array}{c} 0 \\ 1\end{array} \right)$ and
$\ket{\downarrow} \equiv \left(\begin{array}{c} 1 \\ 0 \end{array} \right)$
are used in these cases.
\end{definition}
2020-02-19 10:19:06 +00:00
A gate acting on a qbit is a unitary operator $G \in SU(2)$. One can show that
$\forall G \in SU(2)$ $G$ can be approximated arbitrarily good as a product of unitary generator matrices
2020-02-21 16:59:00 +00:00
\cite[Chapter 4.3]{kaye_ea2007}\cite[Chapter 2]{marquezino_ea_2019};
2020-01-22 14:35:47 +00:00
common choices for the generators are $ X, H, R_{\phi}$ and $Z, H, R_{\phi}$ with
\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)\\
& I := \left(\begin{array}{cc} 1 & 0 \\ 0 & 1\end{array}\right) \\
\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-01-22 14:35:47 +00:00
transforming to the other Pauli eigenstates is done using $H$ and $SH$:
\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}
S H Z H^\dagger S^\dagger = S X S^\dagger = Y
\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-02-24 11:05:45 +00:00
A $n$-qbit quantum mechanical state is the tensor product \cite[Definition 14.3]{wuest1995} of the $n$ one-qbit
2020-01-22 14:35:47 +00:00
states.
\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-02-21 16:59:00 +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}
\ket{3} := \ket{0b11} := \ket{1}_s \otimes \ket{1}_s := \left(\begin{array}{c} 0 \\ 0 \\ 0 \\ 1 \end{array} \right)
\end{equation}
2020-02-21 16:59:00 +00:00
The $n$-qbit basis states can be constructed in a similar manner.
A general $n$-qbit state can then be written as a superposition of the
2020-01-22 14:35:47 +00:00
integer states:
\begin{equation}
2020-03-02 09:46:59 +00:00
\label{eq:ci}
2020-02-21 16:59:00 +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
With the normation condition:
2020-01-22 14:35:47 +00:00
\begin{equation}
2020-02-21 16:59:00 +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
that integer states are eigenstates of the $Z$ operators. The computational basis
is $\{\ket{i_0} \otimes ... \otimes \ket{i_{n-1}} | i_0, ..., i_{n-1} = 0, 1\}$.
\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}
CU_{i, j} &:= &\ket{0}\bra{0}_j\otimes I_i
+ \ket{1}\bra{1}_j \otimes U_i \\
&:= &\left(\bigotimes\limits_{l < j} I\right)
\otimes \ket{0}\bra{0}
\otimes \left(\bigotimes\limits_{j < l < i} I\right)
\otimes I
\otimes \left(\bigotimes\limits_{j > l} I \right)\\
& &+ \left(\bigotimes\limits_{l < j} I\right)
\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-01-22 14:35:47 +00:00
In particular for $X, Z$:
\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}
CZ(i, j) = \ket{0}\bra{0}_j\otimes I_i + \ket{1}\bra{1}_j \otimes Z_i
\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-02-24 11:05:45 +00:00
to generate an arbitrary $n$-qbit gate \cite[Chapter 4.3]{kaye_ea2007}\cite{barenco_ea_1995}.
2020-02-21 16:59:00 +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}
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)
\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}
The measuerment in not injective: Measuring both
$\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-02-21 16:59:00 +00:00
Because a measurement is not unitary it is not a gate in the sense 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-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-01-29 10:19:13 +00:00
Writing (possibly huge) products of matrices is quite unpractical and very much
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-02-21 16:59:00 +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-02-21 16:59:00 +00:00
The controlled gates (such as $CX$ and $CZ$) have a vertical line from the control-qbit to
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 \\
& \qw & \gate{X} & \qw & \gate{Z} &\qw \\
}
\]
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-02-19 11:36:56 +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 used in the phase estimation
2020-02-21 16:59:00 +00:00
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}
The eigenvalue of $T$ can now be estimated by using the phase estimation circuit:
\[
\Qcircuit @C=1em @R=.7em {
& \lstick{\ket{0}} & {/^N} \qw & \gate{H^{\otimes n}} & \ctrl{1} & \gate{FT^\dagger} & \qw & \meter & \rstick{x}\\
& \lstick{\ket{\varphi}} & {/} \qw & \qw & \gate{T} & \qw & {/} \qw & \qw& \rstick{\ket{\varphi}} \\
}
\]
Where $T\ket{\varphi} = \exp(2\pi i\varphi) \ket{\varphi}$ and the measurement result $\tilde{\varphi} = \frac{x}{2^n}$ is an
2020-02-21 16:59:00 +00:00
estimation for $\varphi$. If a success rate of $1-\epsilon$ and an accuracy of $| \varphi - \tilde{\varphi} | < 2^{-m}$
2020-02-24 11:05:45 +00:00
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