2024-02-11 10:09:30 -08:00

199 lines
5.1 KiB
TeX

\section{One Bit}
Before we discuss quantum computation, we first need to construct a few tools. \par
To keep things simple, we'll use regular (usually called \textit{classical}) bits for now.
\definition{Binary Digits}
$\mathbb{B}$ is the set of binary digits. In other words, $\mathbb{B} = \{\texttt{0}, \texttt{1}\}$. \par
\note[Note]{We've seen $\mathbb{B}$ before---it's the set of integers mod 2.}
\vspace{2mm}
\definition{Cartesian Products}
Let $A$ and $B$ be sets. \par
The \textit{cartesian product} $A \times B$ is the set of all pairs $(a, b)$ where $a \in A$ and $b \in B$. \par
As usual, we can write $A \times A \times A$ as $A^3$. \par
\vspace{2mm}
In this handout, we'll often see the following sets:
\begin{itemize}
\item $\mathbb{R}^2$, a two-dimensional plane
\item $\mathbb{R}^n$, an n-dimensional space
\item $\mathbb{B}^2$, the set
$\{(\texttt{0},\texttt{0}), (\texttt{0},\texttt{1}), (\texttt{1},\texttt{0}), (\texttt{1},\texttt{1})\}$
\item $\mathbb{B}^n$, the set of all possible states of $n$ bits.
\end{itemize}
\problem{}
What is the size of $\mathbb{B}^n$?
\vfill
\pagebreak
% NOTE: this is time-travelled later in the handout.
% if you edit this, edit that too.
\generic{Remark:}
Consider a single classical bit. It takes states in $\{\texttt{0}, \texttt{1}\}$, picking one at a time. \par
We'll write the states \texttt{0} and \texttt{1} as orthogonal unit vectors, labeled $\vec{e}_0$ and $\vec{e}_1$:
\begin{center}
\begin{tikzpicture}[scale=1.5]
\fill[color = black] (0, 0) circle[radius=0.05];
\draw[->] (0, 0) -- (1.5, 0);
\node[right] at (1.5, 0) {$\vec{e}_0$ axis};
\fill[color = oblue] (1, 0) circle[radius=0.05];
\node[below] at (1, 0) {\texttt{0}};
\draw[->] (0, 0) -- (0, 1.5);
\node[above] at (0, 1.5) {$\vec{e}_1$ axis};
\fill[color = oblue] (0, 1) circle[radius=0.05];
\node[left] at (0, 1) {\texttt{1}};
\end{tikzpicture}
\end{center}
The point marked $1$ is at $[0, 1]$. It is no parts $\vec{e}_0$, and all parts $\vec{e}_1$. \par
Of course, we can say something similar about the point marked $0$: \par
It is at $[1, 0] = (1 \times \vec{e}_0) + (0 \times \vec{e}_1)$, and is thus all $\vec{e}_0$ and no $\vec{e}_1$. \par
\note[Note]{$[0, 1]$ and $[1, 0]$ are coordinates in the basis $\{\vec{e}_0, \vec{e}_1\}$}
\vspace{2mm}
We could, of course, mark the point \texttt{x} at $[1, 1]$ which is equal parts $\vec{e}_0$ and $\vec{e}_1$: \par
\begin{center}
\begin{tikzpicture}[scale=1.5]
\fill[color = black] (0, 0) circle[radius=0.05];
\draw[->] (0, 0) -- (1.5, 0);
\node[right] at (1.5, 0) {$\vec{e}_0$};
\draw[->] (0, 0) -- (0, 1.5);
\node[above] at (0, 1.5) {$\vec{e}_1$};
\fill[color = oblue] (1, 0) circle[radius=0.05];
\node[below] at (1, 0) {\texttt{0}};
\fill[color = oblue] (0, 1) circle[radius=0.05];
\node[left] at (0, 1) {\texttt{1}};
\draw[dashed, color = gray, ->] (0, 0) -- (0.9, 0.9);
\fill[color = oblue] (1, 1) circle[radius=0.05];
\node[above right] at (1, 1) {\texttt{x}};
\end{tikzpicture}
\end{center}
\vspace{4mm}
But \texttt{x} isn't a member of $\mathbb{B}$---it's not a state that a classical bit can take. \par
By our current definitions, the \textit{only} valid states of a bit are $\texttt{0} = [1, 0]$ and $\texttt{1} = [0, 1]$.
\vfill
\pagebreak
\definition{Vectored Bits}
This brings us to what we'll call the \textit{vectored representation} of a bit. \par
Instead of writing our bits as just \texttt{0} and \texttt{1}, we'll break them into their $\vec{e}_0$ and $\vec{e}_1$ components: \par
\null\hfill
\begin{minipage}{0.48\textwidth}
\[ \ket{0} = \begin{bmatrix} 1 \\ 0 \end{bmatrix} = (1 \times \vec{e}_0) + (0 \times \vec{e}_1) \]
\end{minipage}
\hfill
\begin{minipage}{0.48\textwidth}
\[ \ket{1} = \begin{bmatrix} 0 \\ 1 \end{bmatrix} = (0 \times \vec{e}_0) + (1 \times \vec{e}_1) \]
\end{minipage}
\hfill\null
\vspace{2mm}
This may seem needlessly complex---and it is, for classical bits. \par
We'll see why this is useful soon enough.
\vspace{4mm}
The $\ket{~}$ you see in the two expressions above is called a \say{ket,} and denotes a column vector. \par
$\ket{0}$ is pronounced \say{ket zero,} and $\ket{1}$ is pronounced \say{ket one.} This is called bra-ket notation. \par
\note[Note]{$\bra{0}$ is called a \say{bra,} but we won't worry about that for now.}
\problem{}
Write \texttt{x} and \texttt{y} in the diagram below in terms of $\ket{0}$ and $\ket{1}$. \par
\begin{center}
\begin{tikzpicture}[scale=1.5]
\fill[color = black] (0, 0) circle[radius=0.05];
\draw[->] (0, 0) -- (1.5, 0);
\node[right] at (1.5, 0) {$\vec{e}_0$ axis};
\draw[->] (0, 0) -- (0, 1.5);
\node[above] at (0, 1.5) {$\vec{e}_1$ axis};
\fill[color = oblue] (1, 0) circle[radius=0.05];
\node[below] at (1, 0) {$\ket{0}$};
\fill[color = oblue] (0, 1) circle[radius=0.05];
\node[left] at (0, 1) {$\ket{1}$};
\draw[dashed, color = gray, ->] (0, 0) -- (0.9, 0.9);
\fill[color = ored] (1, 1) circle[radius=0.05];
\node[above right] at (1, 1) {\texttt{x}};
\draw[dashed, color = gray, ->] (0, 0) -- (-0.9, 0.9);
\fill[color = ored] (-1, 1) circle[radius=0.05];
\node[above right] at (-1, 1) {\texttt{y}};
\end{tikzpicture}
\end{center}
\vfill
\pagebreak