Advanced handouts
Add missing file Co-authored-by: Mark <mark@betalupi.com> Co-committed-by: Mark <mark@betalupi.com>
This commit is contained in:
38
src/Advanced/Introduction to Quantum/Tectonic.toml
Normal file
38
src/Advanced/Introduction to Quantum/Tectonic.toml
Normal file
@ -0,0 +1,38 @@
|
||||
[doc]
|
||||
name = "Definable Sets"
|
||||
bundle = "https://data1.fullyjustified.net/tlextras-2022.0r0.tar"
|
||||
|
||||
extra_paths = [
|
||||
"../../resources"
|
||||
]
|
||||
|
||||
[doc.metadata]
|
||||
publish = true
|
||||
show_solutions = true
|
||||
title = "Definable Sets"
|
||||
description = ""
|
||||
favorite = false
|
||||
|
||||
|
||||
[[output]]
|
||||
shell_escape = false
|
||||
tex_format = "latex"
|
||||
type = "pdf"
|
||||
|
||||
name = "handout"
|
||||
inputs = [
|
||||
{ inline = "\\def\\argNoSolutions{1}" },
|
||||
"week 1.tex"
|
||||
]
|
||||
|
||||
|
||||
[[output]]
|
||||
shell_escape = false
|
||||
tex_format = "latex"
|
||||
type = "pdf"
|
||||
|
||||
name = "solutions"
|
||||
inputs = [
|
||||
{ inline = "\\def\\argYesSolutions{1}" },
|
||||
"week 1.tex"
|
||||
]
|
29
src/Advanced/Introduction to Quantum/main.tex
Executable file
29
src/Advanced/Introduction to Quantum/main.tex
Executable file
@ -0,0 +1,29 @@
|
||||
\documentclass[
|
||||
solutions,
|
||||
singlenumbering
|
||||
]{../../../lib/tex/ormc_handout}
|
||||
\usepackage{../../../lib/tex/macros}
|
||||
\usepackage{units}
|
||||
\input{src/tikzset}
|
||||
|
||||
\uptitlel{Advanced 2}
|
||||
\uptitler{\smallurl{}}
|
||||
\title{Intro to Quantum Computing}
|
||||
\subtitle{Prepared by Mark on \today{}}
|
||||
|
||||
\def\ket#1{\left|#1\right\rangle}
|
||||
\def\bra#1{\left\langle#1\right|}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\input{src/parts/01 bits}
|
||||
\input{src/parts/02 qubit}
|
||||
\input{src/parts/03 two qubits}
|
||||
\input{src/parts/04 logic gates}
|
||||
\input{src/parts/05 quantum gates}
|
||||
\input{src/parts/06 hxh}
|
||||
\input{src/parts/07 superdense}
|
||||
\input{src/parts/08 teleport}
|
||||
\end{document}
|
6
src/Advanced/Introduction to Quantum/meta.toml
Normal file
6
src/Advanced/Introduction to Quantum/meta.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[metadata]
|
||||
title = "Quantum Computing"
|
||||
|
||||
[publish]
|
||||
handout = true
|
||||
solutions = true
|
54
src/Advanced/Introduction to Quantum/src/main.tex
Executable file
54
src/Advanced/Introduction to Quantum/src/main.tex
Executable file
@ -0,0 +1,54 @@
|
||||
% Copyright (C) 2023 <Mark (mark@betalupi.com)>
|
||||
%
|
||||
% This program is free software: you can redistribute it and/or modify
|
||||
% it under the terms of the GNU General Public License as published by
|
||||
% the Free Software Foundation, either version 3 of the License, or
|
||||
% (at your option) any later version.
|
||||
%
|
||||
% You may have received a copy of the GNU General Public License
|
||||
% along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
%
|
||||
%
|
||||
%
|
||||
% If you edit this, please give credit!
|
||||
% Quality handouts take time to make.
|
||||
|
||||
% use the [nosolutions] flag to hide solutions,
|
||||
% use the [solutions] flag to show solutions.
|
||||
\documentclass[
|
||||
solutions,
|
||||
singlenumbering
|
||||
]{../../../../lib/tex/ormc_handout}
|
||||
\usepackage{../../../../lib/tex/macros}
|
||||
\usepackage{units}
|
||||
\input{tikzset}
|
||||
|
||||
\uptitlel{Advanced 2}
|
||||
\uptitler{\smallurl{}}
|
||||
\title{Intro to Quantum Computing}
|
||||
\subtitle{Prepared by Mark on \today{}}
|
||||
|
||||
\def\ket#1{\left|#1\right\rangle}
|
||||
\def\bra#1{\left\langle#1\right|}
|
||||
|
||||
|
||||
% TODO: spend more time on probabalastic bits.
|
||||
% This could even be its own handout, especially
|
||||
% for younger classes!
|
||||
|
||||
% Why are qubits amplitudes instead of probabilities?
|
||||
% (Asher question)
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\input{parts/01 bits}
|
||||
\input{parts/02 qubit}
|
||||
\input{parts/03 two qubits}
|
||||
\input{parts/04 logic gates}
|
||||
\input{parts/05 quantum gates}
|
||||
\input{parts/06 hxh}
|
||||
\input{parts/07 superdense}
|
||||
\input{parts/08 teleport}
|
||||
\end{document}
|
565
src/Advanced/Introduction to Quantum/src/parts/01 bits.tex
Normal file
565
src/Advanced/Introduction to Quantum/src/parts/01 bits.tex
Normal file
@ -0,0 +1,565 @@
|
||||
\section{Probabilistic Bits}
|
||||
|
||||
|
||||
\definition{}
|
||||
|
||||
As we already know, a \textit{classical bit} may take the values \texttt{0} and \texttt{1}. \par
|
||||
We can model this with a two-sided coin, one face of which is labeled \texttt{0}, and the other, \texttt{1}. \par
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Of course, if we toss such a \say{bit-coin,} we'll get either \texttt{0} or \texttt{1}. \par
|
||||
We'll denote the probability of getting \texttt{0} as $p_0$, and the probability of getting \texttt{1} as $p_1$. \par
|
||||
As with all probabilities, $p_0 + p_1$ must be equal to 1.
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\definition{}
|
||||
|
||||
Say we toss a \say{bit-coin} and don't observe the result. We now have a \textit{probabilistic bit}, with a probability $p_0$
|
||||
of being \texttt{0}, and a probability $p_1$ of being \texttt{1}.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
We'll represent this probabilistic bit's \textit{state} as a vector:
|
||||
$\left[\begin{smallmatrix}
|
||||
p_0 \\ p_1
|
||||
\end{smallmatrix}\right]$ \par
|
||||
We do \textbf{not} assume this coin is fair, and thus $p_0$ might not equal $p_1$.
|
||||
|
||||
\note{
|
||||
This may seem a bit redundant: since $p_0 + p_1$, we can always calculate one probability given the other. \\
|
||||
We'll still include both probabilities in the state vector, since this provides a clearer analogy to quantum bits.
|
||||
}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\definition{}
|
||||
|
||||
The simplest probabilistic bit states are of course $[0]$ and $[1]$, defined as follows:
|
||||
\begin{itemize}
|
||||
\item $[0] = \left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]$
|
||||
\item $[1] = \left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]$
|
||||
\end{itemize}
|
||||
That is, $[0]$ represents a bit that we known to be \texttt{0}, \par
|
||||
and $[1]$ represents a bit we know to be \texttt{1}.
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\definition{}
|
||||
$[0]$ and $[1]$ form a \textit{basis} for all possible probabilistic bit states: \par
|
||||
Every other probabilistic bit can be written as a \textit{linear combination} of $[0]$ and $[1]$:
|
||||
|
||||
\begin{equation*}
|
||||
\begin{bmatrix} p_0 \\ p_1 \end{bmatrix}
|
||||
=
|
||||
p_0 \begin{bmatrix} 1 \\ 0 \end{bmatrix} +
|
||||
p_1 \begin{bmatrix} 0 \\ 1 \end{bmatrix}
|
||||
=
|
||||
p_0 [0] + p_1 [1]
|
||||
\end{equation*}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
Every possible state of a probabilistic bit is a two-dimensional vector. \par
|
||||
Draw all possible states on the axis below.
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 2.0]
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
\node[below left] at (0, 0) {$\left[\begin{smallmatrix} 0 \\ 0 \end{smallmatrix}\right]$};
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\node[right] at (1.2, 0) {$p_0$};
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below] at (1, 0) {$[0]$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\node[above] at (0, 1.2) {$p_1$};
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[left] at (0, 1) {$[1]$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\begin{solution}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 2.0]
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
\node[below left] at (0, 0) {$\left[\begin{smallmatrix} 0 \\ 0 \end{smallmatrix}\right]$};
|
||||
|
||||
\draw[ored, -, line width = 2] (0, 1) -- (1, 0);
|
||||
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\node[right] at (1.2, 0) {$p_0$};
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below] at (1, 0) {$[0]$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\node[above] at (0, 1.2) {$p_1$};
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[left] at (0, 1) {$[1]$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section{Measuring Probabilistic Bits}
|
||||
|
||||
|
||||
\definition{}
|
||||
As we noted before, a probabilistic bit represents a coin we've tossed but haven't looked at. \par
|
||||
We do not know whether the bit is \texttt{0} or \texttt{1}, but we do know the probability of both of these outcomes. \par
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
If we \textit{measure} (or \textit{observe}) a probabilistic bit, we see either \texttt{0} or \texttt{1}---and thus our
|
||||
knowledge of its state is updated to either $[0]$ or $[1]$, since we now certainly know what face the coin landed on.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Since measurement changes what we know about a probabilistic bit, it changes the probabilistic bit's state.
|
||||
When we measure a bit, it's state \textit{collapses} to either $[0]$ or $[1]$, and the original state of the
|
||||
bit vanishes. We \textit{cannot} recover the state $[x_0, x_1]$ from a measured probabilistic bit.
|
||||
|
||||
|
||||
\definition{Multiple bits}
|
||||
Say we have two probabilistic bits, $x$ and $y$, \par
|
||||
with states
|
||||
$[x]=[ x_0, x_1]$
|
||||
and
|
||||
$[y]=[y_0, y_1]$
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
The \textit{compound state} of $[x]$ and $[y]$ is exactly what it sounds like: \par
|
||||
It is the probabilistic two-bit state $\ket{xy}$, where the probabilities of the first bit are
|
||||
determined by $[x]$, and the probabilities of the second are determined by $[y]$.
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}<firstcompoundstate>
|
||||
Say $[x] = [\nicefrac{2}{3}, \nicefrac{1}{3}]$ and $[y] = [\nicefrac{3}{4}, \nicefrac{1}{4}]$. \par
|
||||
\begin{itemize}[itemsep = 1mm]
|
||||
\item If we measure $x$ and $y$ simultaneously, \par
|
||||
what is the probability of getting each of \texttt{00}, \texttt{01}, \texttt{10}, and \texttt{11}?
|
||||
|
||||
|
||||
\item If we measure $y$ first and observe \texttt{1}, \par
|
||||
what is the probability of getting each of \texttt{00}, \texttt{01}, \texttt{10}, and \texttt{11}?
|
||||
\end{itemize}
|
||||
\note[Note]{$[x]$ and $[y]$ are column vectors, but I've written them horizontally to save space.}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Say $[x] = [\nicefrac{2}{3}, \nicefrac{1}{3}]$ and $[y] = [\nicefrac{3}{4}, \nicefrac{1}{4}]$. \par
|
||||
What is the probability that $x$ and $y$ produce different outcomes?
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section{Tensor Products}
|
||||
|
||||
\definition{Tensor Products}
|
||||
The \textit{tensor product} of two vectors is defined as follows:
|
||||
\begin{equation*}
|
||||
\begin{bmatrix}
|
||||
x_1 \\ x_2
|
||||
\end{bmatrix}
|
||||
\otimes
|
||||
\begin{bmatrix}
|
||||
y_1 \\ y_2
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
x_1
|
||||
\begin{bmatrix}
|
||||
y_1 \\ y_2
|
||||
\end{bmatrix}
|
||||
|
||||
\\[4mm]
|
||||
|
||||
x_2
|
||||
\begin{bmatrix}
|
||||
y_1 \\ y_2
|
||||
\end{bmatrix}
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
x_1y_1 \\[1mm]
|
||||
x_1y_2 \\[1mm]
|
||||
x_2y_1 \\[1mm]
|
||||
x_2y_2 \\[0.5mm]
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
|
||||
That is, we take our first vector, multiply the second
|
||||
vector by each of its components, and stack the result.
|
||||
You could think of this as a generalization of scalar
|
||||
mulitiplication, where scalar mulitiplication is a
|
||||
tensor product with a vector in $\mathbb{R}^1$:
|
||||
\begin{equation*}
|
||||
a
|
||||
\begin{bmatrix}
|
||||
x_1 \\ x_2
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
a_1
|
||||
\end{bmatrix}
|
||||
\otimes
|
||||
\begin{bmatrix}
|
||||
y_1 \\ y_2
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
a_1
|
||||
\begin{bmatrix}
|
||||
y_1 \\ y_2
|
||||
\end{bmatrix}
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
a_1y_1 \\[1mm]
|
||||
a_1y_2
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
\problem{}
|
||||
Say $x \in \mathbb{R}^n$ and $y \in \mathbb{R}^m$. \par
|
||||
What is the dimension of $x \otimes y$?
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}<basistp>
|
||||
What is the pairwise tensor product
|
||||
$
|
||||
\Bigl\{
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
1 \\ 0 \\ 0
|
||||
\end{smallmatrix}
|
||||
\right],
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
0 \\ 1 \\ 0
|
||||
\end{smallmatrix}
|
||||
\right],
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
0 \\ 0 \\ 1
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
\Bigr\}
|
||||
\otimes
|
||||
\Bigl\{
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
1 \\ 0
|
||||
\end{smallmatrix}
|
||||
\right],
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
0 \\ 1
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
\Bigr\}
|
||||
$?
|
||||
|
||||
\note{in other words, distribute the tensor product between every pair of vectors.}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
What is the \textit{span} of the vectors we found in \ref{basistp}? \par
|
||||
In other words, what is the set of vectors that can be written as linear combinations of the vectors above?
|
||||
|
||||
\vfill
|
||||
|
||||
% This is wrong, but there's something here.
|
||||
% maybe fix later?
|
||||
%
|
||||
%Look through the above problems and convince yourself of the following fact: \par
|
||||
%If $a$ is a basis of $A$ and $b$ is a basis of $B$, $a \otimes b$ is a basis of $A \times B$. \par
|
||||
%\note{If you don't understand what this says, ask an instructor. \\ This is the reason we did the last few problems!}
|
||||
%
|
||||
%\begin{instructornote}
|
||||
% \textbf{The idea here is as follows:}
|
||||
%
|
||||
% If $a$ is in $\{\texttt{0}, \texttt{1}\}$ and $b$ is in $\{\texttt{0}, \texttt{1}\}$,
|
||||
% the values $ab$ can take are
|
||||
% $\{\texttt{0}, \texttt{1}\} \times \{\texttt{0}, \texttt{1}\} = \{\texttt{00}, \texttt{01}, \texttt{10}, \texttt{11}\}$.
|
||||
%
|
||||
% \vspace{2mm}
|
||||
%
|
||||
% The same is true of any other state set: if $a$ takes values in $A$ and $b$ takes values in $B$, \par
|
||||
% the compound state $(a,b)$ takes values in $A \times B$.
|
||||
%
|
||||
% \vspace{2mm}
|
||||
%
|
||||
% We would like to do the same with probabilistic bits. \par
|
||||
% Given bits $\ket{a}$ and $\ket{b}$, how should we represent the state of $\ket{ab}$?
|
||||
%\end{instructornote}
|
||||
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Say $[x] = [\nicefrac{2}{3}, \nicefrac{1}{3}]$ and $[y] = [\nicefrac{3}{4}, \nicefrac{1}{4}]$. \par
|
||||
What is $[x] \otimes [y]$? How does this relate to \ref{firstcompoundstate}?
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
The compound state of two vector-form bits is their tensor product. \par
|
||||
Compute the following. Is the result what we'd expect?
|
||||
\begin{itemize}
|
||||
\item $[0] \otimes [0]$
|
||||
\item $[0] \otimes [1]$
|
||||
\item $[1] \otimes [0]$
|
||||
\item $[1] \otimes [1]$
|
||||
\end{itemize}
|
||||
\hint{
|
||||
Remember that
|
||||
$[0] = \left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]$
|
||||
and
|
||||
$[1] = \left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]$.
|
||||
}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}<fivequant>
|
||||
Of course, writing $[0] \otimes [1]$ is a bit excessive. We'll shorten this notation to $[01]$. \par
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
In fact, we could go further: if we wanted to write the set of bits $[1] \otimes [1] \otimes [0] \otimes [1]$, \par
|
||||
we could write $[1101]$---but a shorter alternative is $[13]$, since $13$ is \texttt{1101} in binary.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Write $[5]$ as three-bit probabilistic state. \par
|
||||
|
||||
\begin{solution}
|
||||
$[5] = [101] = [1] \otimes [0] \otimes [1] = [0,0,0,0,0,1,0,0]^T$ \par
|
||||
Notice how we're counting from the top, with $[000] = [1,0,...,0]$ and $[111] = [0, ..., 0, 1]$.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Write the three-bit states $[0]$ through $[7]$ as column vectors. \par
|
||||
\hint{You do not need to compute every tensor product. Do a few and find the pattern.}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section{Operations on Probabilistic Bits}
|
||||
|
||||
Now that we can write probabilistic bits as vectors, we can represent operations on these bits
|
||||
with linear transformations---in other words, as matrices.
|
||||
|
||||
\definition{}
|
||||
Consider the NOT gate, which operates as follows: \par
|
||||
\begin{itemize}
|
||||
\item $\text{NOT}[0] = [1]$
|
||||
\item $\text{NOT}[1] = [0]$
|
||||
\end{itemize}
|
||||
What should NOT do to a probabilistic bit $[x_0, x_1]$? \par
|
||||
If we return to our coin analogy, we can think of the NOT operation as
|
||||
flipping a coin we have already tossed, without looking at its state.
|
||||
Thus,
|
||||
\begin{equation*}
|
||||
\text{NOT} \begin{bmatrix}
|
||||
x_0 \\ x_1
|
||||
\end{bmatrix} = \begin{bmatrix}
|
||||
x_1 \\ x_0
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
|
||||
\begin{ORMCbox}{Review: Multiplying Vectors by Matrices}{black!10!white}{black!65!white}
|
||||
\begin{equation*}
|
||||
Av =
|
||||
\begin{bmatrix}
|
||||
1 & 2 \\
|
||||
3 & 4 \\
|
||||
\end{bmatrix}
|
||||
\begin{bmatrix}
|
||||
v_0 \\ v_1
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
1v_0 + 2v_1 \\
|
||||
3v_0 + 4v_1
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
Note that each element of $Av$ is the dot product of a row in $A$ and a column in $v$.
|
||||
\end{ORMCbox}
|
||||
|
||||
\problem{}
|
||||
Compute the following product:
|
||||
\begin{equation*}
|
||||
\begin{bmatrix}
|
||||
1 & 0.5 \\ 0 & 1
|
||||
\end{bmatrix}
|
||||
\begin{bmatrix}
|
||||
3 \\ 2
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\generic{Remark:}
|
||||
Also, recall that every matrix is linear map, and that every linear map may be written as a matrix. \par
|
||||
We often use the terms \textit{matrix}, \textit{transformation}, and \textit{linear map} interchangeably.
|
||||
|
||||
\pagebreak
|
||||
|
||||
|
||||
\problem{}
|
||||
Find the matrix that represents the NOT operation on one probabilistic bit.
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
\begin{bmatrix}
|
||||
0 & 1 \\ 1 & 0
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\problem{Extension by linearity}
|
||||
Say we have an arbitrary operation $M$. \par
|
||||
If we know how $M$ acts on $[1]$ and $[0]$, can we compute $M[x]$ for an arbitrary state $[x]$? \par
|
||||
Say $[x] = [x_0, x_1]$.
|
||||
\begin{itemize}
|
||||
\item What is the probability we observe $0$ when we measure $x$?
|
||||
\item What is the probability that we observe $M[0]$ when we measure $Mx$?
|
||||
\end{itemize}
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}<linearextension>
|
||||
Write $M[x_0, x_1]$ in terms of $M[0]$, $M[1]$, $x_0$, and $x_1$.
|
||||
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
M \begin{bmatrix}
|
||||
x_0 \\ x_1
|
||||
\end{bmatrix}
|
||||
=
|
||||
x_0 M \begin{bmatrix}
|
||||
1 \\ 0
|
||||
\end{bmatrix}
|
||||
+
|
||||
x_1 M \begin{bmatrix}
|
||||
0 \\ 1
|
||||
\end{bmatrix}
|
||||
=
|
||||
x_0 M [0] +
|
||||
x_1 M [1]
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\generic{Remark:}
|
||||
Every matrix represents a \textit{linear} map, so the following is always true:
|
||||
\begin{equation*}
|
||||
A \times (px + qy) = pAx + qAy
|
||||
\end{equation*}
|
||||
\ref{linearextension} is just a special case of this fact.
|
||||
|
||||
\pagebreak
|
347
src/Advanced/Introduction to Quantum/src/parts/02 qubit.tex
Normal file
347
src/Advanced/Introduction to Quantum/src/parts/02 qubit.tex
Normal file
@ -0,0 +1,347 @@
|
||||
\section{One Qubit}
|
||||
|
||||
Quantum bits (or \textit{qubits}) are very similar to probabilistic bits, but have one major difference: \par
|
||||
probabilities are replaced with \textit{amplitudes}.
|
||||
|
||||
\vspace{2mm}
|
||||
Of course, a qubit can take the values \texttt{0} and \texttt{1}, which are denoted $\ket{0}$ and $\ket{1}$. \par
|
||||
Like probabilistic bits, a quantum bit is written as a linear combination of $\ket{0}$ and $\ket{1}$:
|
||||
\begin{equation*}
|
||||
\ket{\psi} = \psi_0\ket{0} + \psi_1\ket{1}
|
||||
\end{equation*}
|
||||
Such linear combinations are called \textit{superpositions}.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
The $\ket{~}$ you see in the 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.}
|
||||
|
||||
\vspace{2mm}
|
||||
This is very similar to the \say{box} $[~]$ notation we used for probabilistic bits. \par
|
||||
As before, we will write $\ket{0} = \left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]$
|
||||
and $\ket{1} = \left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]$.
|
||||
|
||||
|
||||
\vspace{8mm}
|
||||
|
||||
Recall that probabilistic bits are subject to the restriction that $p_0 + p_1 = 1$. \par
|
||||
Quantum bits have a similar condition: $\psi_0^2 + \psi_1^2 = 1$. \par
|
||||
Note that this implies that $\psi_0$ and $\psi_1$ are both in $[-1, 1]$. \par
|
||||
Quantum amplitudes may be negative, but probabilistic bit probabilities cannot.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
If we plot the set of valid quantum states on our plane, we get a unit circle centered at the origin:
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=1.5]
|
||||
\draw[dashed] (0,0) circle(1);
|
||||
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below right] at (1, 0) {$\ket{0}$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[above left] at (0, 1) {$\ket{1}$};
|
||||
|
||||
\fill[color = ored] (0.87, 0.5) circle[radius=0.05];
|
||||
\node[above right] at (0.87, 0.5) {$\ket{\psi}$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
|
||||
|
||||
Recall that the set of probabilistic bits forms a line instead:
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1.5]
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
\node[below left] at (0, 0) {$\left[\begin{smallmatrix} 0 \\ 0 \end{smallmatrix}\right]$};
|
||||
|
||||
\draw[ored, -, line width = 2] (0, 1) -- (1, 0);
|
||||
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\node[right] at (1.2, 0) {$p_0$};
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below] at (1, 0) {$[0]$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\node[above] at (0, 1.2) {$p_1$};
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[left] at (0, 1) {$[1]$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
|
||||
\problem{}
|
||||
In the above unit circle, the counterclockwise angle from $\ket{0}$ to $\ket{\psi}$ is $30^\circ$\hspace{-1ex}. \par
|
||||
Write $\ket{\psi}$ as a linear combination of $\ket{0}$ and $\ket{1}$.
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
\definition{Measurement I}
|
||||
Just like a probabilistic bit, we must observed $\ket{0}$ or $\ket{1}$ when we measure a qubit. \par
|
||||
If we were to measure $\ket{\psi} = \psi_0\ket{0} + \psi_1\ket{1}$, we'd observe either $\ket{0}$ or $\ket{1}$, \par
|
||||
with the following probabilities:
|
||||
\begin{itemize}[itemsep = 2mm, topsep = 2mm]
|
||||
\item $\mathcal{P}(\ket{1}) = \psi_1^2$
|
||||
\item $\mathcal{P}(\ket{0}) = \psi_0^2$
|
||||
\end{itemize}
|
||||
\note{Note that $\mathcal{P}(\ket{0}) + \mathcal{P}(\ket{1}) = 1$.}
|
||||
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
As before, $\ket{\psi}$ \textit{collapses} when it is measured: its state becomes that which we observed in our measurement,
|
||||
leaving no trace of the previous superposition. \par
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
\begin{itemize}
|
||||
\item What is the probability we observe $\ket{0}$ when we measure $\ket{\psi}$? \par
|
||||
\item What can we observe if we measure $\ket{\psi}$ a second time? \par
|
||||
\item What are these probabilities for $\ket{\varphi}$?
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=1.5]
|
||||
\draw[dashed] (0,0) circle(1);
|
||||
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below right] at (1, 0) {$\ket{0}$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[above left] at (0, 1) {$\ket{1}$};
|
||||
|
||||
\draw[dotted] (0, 0) -- (0.87, 0.5);
|
||||
\draw[color=gray,->] (0.5, 0.0) arc (0:30:0.5);
|
||||
\node[right, color=gray] at (0.47, 0.12) {$30^\circ$};
|
||||
\fill[color = ored] (0.87, 0.5) circle[radius=0.05];
|
||||
\node[above right] at (0.87, 0.5) {$\ket{\psi}$};
|
||||
|
||||
|
||||
\draw[dotted] (0, 0) -- (-0.707, -0.707);
|
||||
\draw[color=gray,->] (0.25, 0.0) arc (0:-135:0.25);
|
||||
\node[below, color=gray] at (0.2, -0.2) {$135^\circ$};
|
||||
\fill[color = ored] (-0.707, -0.707) circle[radius=0.05];
|
||||
\node[below left] at (-0.707, -0.707) {$\ket{\varphi}$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
As you may have noticed, we don't need two coordinates to fully define a quibit's state. \par
|
||||
We can get by with one coordinate just as well.
|
||||
|
||||
Instead of referring to each state using its cartesian coordinates $\psi_0$ and $\psi_1$, \par
|
||||
we can address it using its \textit{polar angle} $\theta$, measured from $\ket{0}$ counterclockwise:
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=1.5]
|
||||
\draw[dashed] (0,0) circle(1);
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
|
||||
\draw[dotted] (0, 0) -- (0.707, 0.707);
|
||||
\draw[color=gray,->] (0.5, 0.0) arc (0:45:0.5);
|
||||
\node[above right, color=gray] at (0.5, 0) {$\theta$};
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below right] at (1, 0) {$\ket{0}$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[above left] at (0, 1) {$\ket{1}$};
|
||||
|
||||
\fill[color = ored] (0.707, 0.707) circle[radius=0.05];
|
||||
\node[above right] at (0.707, 0.707) {$\ket{\psi}$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
|
||||
\problem{}
|
||||
Find $\psi_0$ and $\psi_1$ in terms of $\theta$ for an arbitrary qubit $\psi$.
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
\problem{}
|
||||
Consider the following qubit states:
|
||||
|
||||
\null\hfill\begin{minipage}{0.48\textwidth}
|
||||
\begin{equation*}
|
||||
\ket{+} = \frac{\ket{0} + \ket{1}}{\sqrt{2}}
|
||||
\end{equation*}
|
||||
\end{minipage}\hfill\begin{minipage}{0.48\textwidth}
|
||||
\begin{equation*}
|
||||
\ket{-} = \frac{\ket{0} - \ket{1}}{\sqrt{2}}
|
||||
\end{equation*}
|
||||
\end{minipage}\hfill\null
|
||||
|
||||
\begin{itemize}
|
||||
\item Where are these on the unit circle?
|
||||
\item What are their polar angles?
|
||||
\item What are the probabilities of observing $\ket{0}$ and $\ket{1}$ when measuring $\ket{+}$ and $\ket{-}$?
|
||||
\end{itemize}
|
||||
|
||||
\vfill
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 2.5]
|
||||
\draw[dashed] (0,0) circle(1);
|
||||
\fill[color = black] (0, 0) circle[radius=0.05];
|
||||
|
||||
\draw[->] (0, 0) -- (1.2, 0);
|
||||
\fill[color = oblue] (1, 0) circle[radius=0.05];
|
||||
\node[below right] at (1, 0) {$\ket{0}$};
|
||||
|
||||
\draw[->] (0, 0) -- (0, 1.2);
|
||||
\fill[color = oblue] (0, 1) circle[radius=0.05];
|
||||
\node[above left] at (0, 1) {$\ket{1}$};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\vfill
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
\section{Operations on One Qubit}
|
||||
|
||||
We may apply transformations to qubits just as we apply transformations to probabilistic bits.
|
||||
Again, we'll represent transformations as $2 \times 2$ matrices, since we want to map
|
||||
one qubit state to another. \par
|
||||
\note{In other words, we want to map elements of $\mathbb{R}^2$ to elements of $\mathbb{R}^2$.} \par
|
||||
We will call such maps \textit{quantum gates,} since they are the quantum equivalent of classical logic gates.
|
||||
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
There are two conditions a valid quantum gate $G$ must satisfy:
|
||||
\begin{itemize}[itemsep = 1mm]
|
||||
\item For any valid state $\ket{\psi}$, $G\ket{\psi}$ is a valid state. \par
|
||||
Namely, $G$ must preserve the length of any vector it is applied to. \par
|
||||
Recall that the set of valid quantum states is the set of unit vectors in $\mathbb{R}^2$
|
||||
|
||||
\item Any quantum gate must be \textit{invertible}. \par
|
||||
We'll skip this condition for now, and return to it later.
|
||||
\end{itemize}
|
||||
In short, a quantum gate is a linear map that maps the unit circle to itself. \par
|
||||
There are only two kinds of linear maps that do this: reflections and rotations.
|
||||
|
||||
\problem{}
|
||||
The $X$ gate is the quantum analog of the \texttt{not} gate, defined by the following table:
|
||||
\begin{itemize}
|
||||
\item $X\ket{0} = \ket{1}$
|
||||
\item $X\ket{1} = \ket{0}$
|
||||
\end{itemize}
|
||||
Find the matrix $X$.
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
\begin{bmatrix}
|
||||
0 & 1 \\ 1 & 0
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
What is $X\ket{+}$ and $X\ket{-}$? \par
|
||||
\hint{Remember that all matrices are linear maps. What does this mean?}
|
||||
|
||||
\begin{solution}
|
||||
$X\ket{+} = \ket{+}$ and $X\ket{-} = -\ket{-}$ (that is, negative ket-minus). \par
|
||||
Most notably, remember that $G(a\ket{0} + b\ket{1}) = aG\ket{0} + bG\ket{1}$
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\problem{}
|
||||
In terms of geometric transformations, what does $X$ do to the unit circle?
|
||||
|
||||
\begin{solution}
|
||||
It is a reflection about the $45^\circ$ axis.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
\problem{}
|
||||
Let $Z$ be a quantum gate defined by the following table: \par
|
||||
\begin{itemize}
|
||||
\item $Z\ket{0} = \ket{0}$,
|
||||
\item $Z\ket{1} = -\ket{1}$.
|
||||
\end{itemize}
|
||||
What is the matrix $Z$? What are $Z\ket{+}$ and $Z\ket{-}$? \par
|
||||
What is $Z$ as a geometric transformation?
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Is the map $B$ defined by the table below a valid quantum gate?
|
||||
\begin{itemize}
|
||||
\item $B\ket{0} = \ket{0}$
|
||||
\item $B\ket{1} = \ket{+}$
|
||||
\end{itemize}
|
||||
\hint{Find a $\ket{\psi}$ so that $B\ket{\psi}$ is not a valid qubit state}
|
||||
|
||||
\begin{solution}
|
||||
$B\ket{+} = \frac{1 + \sqrt{2}}{2}\ket{0} + \frac{1}{2}\ket{1}$, which has a non-unit length of $\frac{\sqrt{2} + 1}{\sqrt{2}}$.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
|
||||
\problem{Rotation}
|
||||
As we noted earlier, any rotation about the center is a valid quantum gate. \par
|
||||
Let's derive all transformations of this form.
|
||||
\begin{itemize}[itemsep = 1mm]
|
||||
\item Let $U_\phi$ be the matrix that represents a counterclockwise rotation of $\phi$ degrees. \par
|
||||
What is $U\ket{0}$ and $U\ket{1}$?
|
||||
|
||||
\item Find the matrix $U_\phi$ for an arbitrary $\phi$.
|
||||
\end{itemize}
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\problem{}
|
||||
Say we have a qubit that is either $\ket{+}$ or $\ket{-}$. We do not know which of the two states it is in. \par
|
||||
Using one operation and one measurement, how can we find out, for certain, which qubit we received? \par
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
145
src/Advanced/Introduction to Quantum/src/parts/03 two qubits.tex
Normal file
145
src/Advanced/Introduction to Quantum/src/parts/03 two qubits.tex
Normal file
@ -0,0 +1,145 @@
|
||||
\section{Two Qubits}
|
||||
|
||||
|
||||
\definition{}
|
||||
Just as before, we'll represent multi-qubit states as linear combinations of multi-qubit basis states. \par
|
||||
For example, a two-qubit state $\ket{ab}$ is the four-dimensional unit vector
|
||||
\begin{equation}
|
||||
\begin{bmatrix}
|
||||
a \\ b \\ c \\ d
|
||||
\end{bmatrix}
|
||||
= a \ket{00} + b\ket{01} + c\ket{10} + d\ket{11}
|
||||
\end{equation}
|
||||
|
||||
As always, multi-qubit states are unit vectors. \par
|
||||
Thus, $a^2 + b^2 + c^2 + d^2 = 1$ in the two-bit case above.
|
||||
|
||||
|
||||
\problem{}
|
||||
Say we have two qubits $\ket{\psi}$ and $\ket{\varphi}$. \par
|
||||
Show that $\ket{\psi} \otimes \ket{\varphi}$ is always a unit vector (and is thus a valid quantum state).
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\definition{Measurement II}<measureii>
|
||||
Measurement of a two-qubit state works just like measurement of a one-qubit state: \par
|
||||
If we measure $a\ket{00} + b\ket{01} + c\ket{10} + d\ket{11}$, \par
|
||||
we get one of the four basis states with the following probabilities:
|
||||
|
||||
\begin{itemize}
|
||||
\item $\mathcal{P}(\ket{00}) = a^2$
|
||||
\item $\mathcal{P}(\ket{01}) = b^2$
|
||||
\item $\mathcal{P}(\ket{10}) = c^2$
|
||||
\item $\mathcal{P}(\ket{11}) = d^2$
|
||||
\end{itemize}
|
||||
As before, the sum of all the above probabilities is $1$.
|
||||
|
||||
|
||||
\problem{}
|
||||
Consider the two-qubit state
|
||||
$\ket{\psi} = \frac{1}{\sqrt{2}} \ket{00} + \frac{1}{2} \ket{01} + \frac{\sqrt{3}}{4} \ket{10} + \frac{1}{4} \ket{11}$
|
||||
|
||||
\begin{itemize}[itemsep=2mm]
|
||||
\item If we measure both bits of $\ket{\psi}$ simultaneously, \par
|
||||
what is the probability of getting each of $\ket{00}$, $\ket{01}$, $\ket{10}$, and $\ket{11}$?
|
||||
|
||||
\item If we measure the ONLY the first qubit, what is the probability we get $\ket{0}$? How about $\ket{1}$? \par
|
||||
\hint{There are two basis states in which the first qubit is $\ket{0}$.}
|
||||
|
||||
\item Say we measured the second bit and read $\ket{1}$. \par
|
||||
If we now measure the first bit, what is the probability of getting $\ket{0}$?
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
Again, consider the two-qubit state
|
||||
$\ket{\psi} = \frac{1}{\sqrt{2}} \ket{00} + \frac{1}{2} \ket{01} + \frac{\sqrt{3}}{4} \ket{10} + \frac{1}{4} \ket{11}$ \par
|
||||
If we measure the first qubit of $\ket{\psi}$ and get $\ket{0}$, what is the resulting state of $\ket{\psi}$? \par
|
||||
What would the state be if we'd measured $\ket{1}$ instead?
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Consider the three-qubit state $\ket{\psi} = c_0\ket{000} + c_1\ket{001} + ... + c_7 \ket{111}$. \par
|
||||
Say we measure the first two qubits and get $\ket{00}$. What is the resulting state of $\ket{\psi}$?
|
||||
|
||||
\begin{solution}
|
||||
We measure $\ket{00}$ with probability $c_0^2 + c_1^2$, and $\ket{\psi}$ collapses to
|
||||
\begin{equation*}
|
||||
\frac{c_0\ket{000} + c_1\ket{001}}{\sqrt{c_0^2 + c_1^2}}
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
\definition{Entanglement}
|
||||
Some product states can be factored into a tensor product of individual qubit states. For example,
|
||||
\begin{equation*}
|
||||
\frac{1}{2} \bigl(\ket{00} + \ket{01} + \ket{10} + \ket{11}\bigr)
|
||||
= \frac{1}{\sqrt{2}}\bigl( \ket{0} + \ket{1} \bigr) \otimes
|
||||
\frac{1}{\sqrt{2}}\bigl( \ket{0} + \ket{1} \bigr)
|
||||
\end{equation*}
|
||||
Such states are called \textit{product states.} States that aren't product states are called \textit{entangled} states.
|
||||
|
||||
\problem{}
|
||||
Factor the following product state:
|
||||
\begin{equation*}
|
||||
\frac{1}{2\sqrt{2}} \bigl(\sqrt{3}\ket{00} - \sqrt{3}\ket{01} + \ket{10} - \ket{11}\bigr)
|
||||
\end{equation*}
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
\frac{1}{2\sqrt{2}} \biggl(\sqrt{3}\ket{00} - \sqrt{3}\ket{01} + \ket{10} - \ket{11}\biggr)
|
||||
= \biggl( \frac{\sqrt{3}}{2}\ket{0} + \frac{1}{2}\ket{1} \biggr) \otimes
|
||||
\biggl(\frac{1}{\sqrt{2}}\ket{0} - \frac{1}{\sqrt{2}}\ket{1} \biggr)
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Show that the following is an entangled state.
|
||||
\begin{equation*}
|
||||
\frac{1}{\sqrt{2}}\ket{00} + \frac{1}{\sqrt{2}}\ket{11}
|
||||
\end{equation*}
|
||||
|
||||
\begin{solution}
|
||||
$
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
a_0 \\ a_1
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
\otimes
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
b_0 \\ b_1
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
=
|
||||
a_0b_0\ket{00} + a_0b_1\ket{01} + a_1b_0\ket{10} + a_1b_1\ket{11}
|
||||
$
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
So, we have that $a_1b_1 = a_0b_0 = \sqrt{2}^{-1}$ \par
|
||||
But $a_0b_1 = a_1b_0 = 0$, so one of $a_0$ and $b_1$ must be zero. \par
|
||||
We thus have a contradiction.
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
@ -0,0 +1,312 @@
|
||||
\section{Logic Gates}
|
||||
|
||||
\definition{Matrices}
|
||||
Throughout this handout, we've been using matrices. Again, recall that every linear map may be written as a matrix,
|
||||
and that every matrix represents a linear map. For example, if $f: \mathbb{R}^2 \to \mathbb{R}^2$ is a linear
|
||||
map, we can write it as follows:
|
||||
\begin{equation*}
|
||||
f\left(
|
||||
\ket{x}
|
||||
\right)
|
||||
=
|
||||
\begin{bmatrix}
|
||||
m_1 & m_2 \\
|
||||
m_3 & m_4
|
||||
\end{bmatrix}
|
||||
\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}
|
||||
=
|
||||
\left[
|
||||
\begin{matrix}
|
||||
m_1x_1 + m_2x_2 \\
|
||||
m_3x_1 + m_4x_2
|
||||
\end{matrix}
|
||||
\right]
|
||||
\end{equation*}
|
||||
|
||||
|
||||
\definition{}
|
||||
Before we discussing multi-qubit quantum gates, we need to review to classical logic. \par
|
||||
Of course, a classical logic gate is a linear map from $\{0,1\}^m$ to $\{0,1\}^n$
|
||||
|
||||
|
||||
\problem{}<notgatex>
|
||||
The \texttt{not} gate is a map defined by the following table: \par
|
||||
|
||||
\begin{itemize}
|
||||
\item $X\ket{0} = \ket{1}$
|
||||
\item $X\ket{1} = \ket{0}$
|
||||
\end{itemize}
|
||||
|
||||
Write the \texttt{not} gate as a matrix that operates on single-bit vector states. \par
|
||||
That is, find a matrix $X$ so that
|
||||
$
|
||||
X\left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]
|
||||
= \left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]
|
||||
$
|
||||
and
|
||||
$
|
||||
X\left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]
|
||||
= \left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]
|
||||
$ \par
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
X = \begin{bmatrix}
|
||||
0 & 1 \\ 1 & 0
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
\problem{}
|
||||
The \texttt{and} gate is a map $\mathbb{B}^2 \to \mathbb{B}$ defined by the following table:
|
||||
\begin{center}
|
||||
\begin{tabular}{ c | c | c }
|
||||
\hline
|
||||
\texttt{a} & \texttt{b} & \texttt{a} and \texttt{b} \\
|
||||
\hline
|
||||
0 & 0 & 0 \\
|
||||
0 & 1 & 0 \\
|
||||
1 & 0 & 0 \\
|
||||
1 & 1 & 1
|
||||
\end{tabular}
|
||||
\end{center}
|
||||
|
||||
Find a matrix $A$ so that $A\ket{\texttt{ab}}$ works as expected. \par
|
||||
\hint{Remember, we write bits as vectors.}
|
||||
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
A = \begin{bmatrix}
|
||||
1 & 1 & 1 & 0 \\
|
||||
0 & 0 & 0 & 1 \\
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
\begin{instructornote}
|
||||
Because of the way we represent bits here, we also have the following property: \par
|
||||
The columns of $A$ correspond to the output for each input---i.e, $A$ is just a table of outputs. \par
|
||||
|
||||
\vspace{2mm}
|
||||
For example, if we look at the first column of $A$ (which is $[1, 0]$), we see: \par
|
||||
$A\ket{00} = A[1,0,0,0] = [1,0] = \ket{0}$
|
||||
|
||||
\vspace{2mm}
|
||||
Also with the last column (which is $[0,1]$): \par
|
||||
$A\ket{00} = A[0,0,0,1] = [0,1] = \ket{1}$
|
||||
\end{instructornote}
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\generic{Remark:}
|
||||
The way a quantum circuit handles information is a bit different than the way a classical circuit does.
|
||||
We usually think of logic gates as \textit{functions}: they consume one set of bits, and return another:
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[circuit logic US, scale=2]
|
||||
\node[and gate] (and) at (0,-0.8) {\tiny\texttt{and}};
|
||||
\draw[->] ([shift={(-0.5, 0)}] and.input 1) node[left] {\texttt{input A}} -- ([shift={(-0.25, 0)}]and.input 1);
|
||||
\draw[->] ([shift={(-0.5, 0)}] and.input 2) node[left] {\texttt{input B}} -- ([shift={(-0.25, 0)}]and.input 2);
|
||||
\draw ([shift={(-0.25, 0)}] and.input 1) -- (and.input 1);
|
||||
\draw ([shift={(-0.25, 0)}] and.input 2) -- (and.input 2);
|
||||
\draw[->] (and.output) -- ([shift={(0.5, 0)}] and.output) node[right] {\texttt{output}};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
|
||||
This model, however, won't work for quantum logic. If we want to understand quantum gates, we need to see them
|
||||
not as \textit{functions}, but as \textit{transformations}. This distinction is subtle, but significant:
|
||||
\begin{itemize}
|
||||
\item functions \textit{consume} a set of inputs and \textit{produce} a set of outputs
|
||||
\item transformations \textit{change} a set of objects, without adding or removing any elements
|
||||
\end{itemize}
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Our usual logic circuit notation models logic gates as functions---we thus can't use it. \par
|
||||
We'll need a different diagram to draw quantum circuits. \par
|
||||
|
||||
\vfill
|
||||
|
||||
|
||||
First, we'll need a set of bits. For this example, we'll use two, drawn in a vertical array. \par
|
||||
We'll also add a horizontal time axis, moving from left to right:
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=1]
|
||||
\node[qubit] (a) at (0, 0) {\texttt{0}};
|
||||
\node[qubit] (b) at (0, -1) {\texttt{1}};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(4, 0)}] a.center) node[qubit] {\texttt{0}};
|
||||
\draw[wire] (b) -- ([shift={(4, 0)}] b.center) node[qubit] {\texttt{1}};
|
||||
|
||||
\draw[
|
||||
color = oblue,
|
||||
->>,
|
||||
line width = 0.5mm
|
||||
] (-1,-1.5) -- (5, -1.5);
|
||||
|
||||
\node[fill=white, text=oblue] at (2, -1.5) {\texttt{time axis}};
|
||||
|
||||
|
||||
\node[left, gray] at (-1, -0.5) {State of each bit at start};
|
||||
\node[right, gray] at (5, -0.5) {State of each bit at end};
|
||||
|
||||
\draw[
|
||||
->,
|
||||
color = gray,
|
||||
line width = 0.2mm,
|
||||
rounded corners = 2mm
|
||||
]
|
||||
(-1, -0.5) -- (-0.8, -0.5) -- (-0.8, 0) --(a)
|
||||
;
|
||||
\draw[
|
||||
->,
|
||||
color = gray,
|
||||
line width = 0.2mm,
|
||||
rounded corners = 2mm
|
||||
]
|
||||
(-1, -0.5) -- (-0.8, -0.5) -- (-0.8, -1) -- (b)
|
||||
;
|
||||
|
||||
\draw[
|
||||
<-,
|
||||
color = gray,
|
||||
line width = 0.2mm,
|
||||
rounded corners = 2mm
|
||||
]
|
||||
(4.2, 0) -- (4.8, 0) -- (4.8, -0.5) -- (5, -0.5)
|
||||
;
|
||||
\draw[
|
||||
<-,
|
||||
color = gray,
|
||||
line width = 0.2mm,
|
||||
rounded corners = 2mm
|
||||
]
|
||||
(4.2, -1) -- (4.8, -1) -- (4.8, -0.5) -- (5, -0.5)
|
||||
;
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
In the diagram above, we didn't change our bits---so the labels at the start match those at the end.
|
||||
|
||||
\vfill
|
||||
|
||||
Thus, our circuit forms a grid, with bits ordered vertically and time horizontally. \par
|
||||
If we want to change our state, we draw transformations as vertical boxes. \par
|
||||
Every column represents a single transformation on the entire state:
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=1]
|
||||
\node[qubit] (a) at (0, 0) {\texttt{1}};
|
||||
\node[qubit] (b) at (0, -1) {\texttt{0}};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(5, 0)}] a.center) node[qubit] {\texttt{0}};
|
||||
\draw[wire] (b) -- ([shift={(5, 0)}] b.center) node[qubit] {\texttt{1}};
|
||||
|
||||
\ghostqubox{a}{1}{b}{2}{$T_1$}
|
||||
\ghostqubox{a}{2}{b}{3}{$T_2$}
|
||||
\ghostqubox{a}{3}{b}{4}{$T_3$}
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
Note that the transformations above span the whole state. This is important: \par
|
||||
we cannot apply transformations to individual bits---we always transform the \textit{entire} state.
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\generic{Setup:}
|
||||
Say we want to invert the first bit of a two-bit state. That is, we want a transformation $T$ so that \par
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {\texttt{a}};
|
||||
\node[qubit] (b) at (0, -1) {\texttt{b}};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(4, 0)}] a.center) node[qubit] {\texttt{not a}};
|
||||
\draw[wire] (b) -- ([shift={(4, 0)}] b.center) node[qubit] {\texttt{b}};
|
||||
|
||||
\qubox{a}{1.5}{b}{2.5}{$T$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
In other words, we want a matrix $T$ satisfying the following equalities:
|
||||
\begin{itemize}
|
||||
\item $T\ket{00} = \ket{10}$
|
||||
\item $T\ket{01} = \ket{11}$
|
||||
\item $T\ket{10} = \ket{00}$
|
||||
\item $T\ket{11} = \ket{01}$
|
||||
\end{itemize}
|
||||
|
||||
|
||||
|
||||
\problem{}
|
||||
Find the matrix that corresponds to the above transformation. \par
|
||||
\hint{
|
||||
Remember that
|
||||
$\ket{0} = \left[\begin{smallmatrix} 1 \\ 0 \end{smallmatrix}\right]$ and
|
||||
$\ket{1} = \left[\begin{smallmatrix} 0 \\ 1 \end{smallmatrix}\right]$ \\
|
||||
Also, we found earlier that $X = \left[\begin{smallmatrix} 0 && 1 \\ 1 && 0 \end{smallmatrix}\right]$,
|
||||
and of course $I = \left[\begin{smallmatrix} 1 && 0 \\ 0 && 1 \end{smallmatrix}\right]$.
|
||||
}
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
T = \begin{bmatrix}
|
||||
0 & 0 & 1 & 0 \\
|
||||
0 & 0 & 0 & 1 \\
|
||||
1 & 0 & 0 & 0 \\
|
||||
0 & 1 & 0 & 0 \\
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
\generic{Remark:}
|
||||
We could draw the above transformation as a combination $X$ and $I$ (identity) gate:
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{0}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{1}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{0}$};
|
||||
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\qubox{b}{1}{b}{2}{$I$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
We can even omit the $I$ gate, since we now know that transformations affect the whole state: \par
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{0}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{1}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{0}$};
|
||||
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
We're now done: this is how we draw quantum circuits.
|
||||
Don't forget that transformations \textit{always} affect the whole state---even if our diagram doesn't explicitly state this.
|
||||
|
||||
\pagebreak
|
||||
|
||||
% TODO:
|
||||
% distributive property of tensor product
|
||||
% quantum gate algebra
|
@ -0,0 +1,217 @@
|
||||
\section{Quantum Gates}
|
||||
|
||||
|
||||
In the previous section, we stated that a quantum gate is a linear map. \par
|
||||
Let's complete that definition.
|
||||
|
||||
\definition{}
|
||||
A quantum gate is a \textit{orthonormal matrix}, which means any gate $G$
|
||||
satisfies $GG^\text{T} = I$. \par
|
||||
This implies the following: \par
|
||||
|
||||
\begin{itemize}
|
||||
\item $G$ is square. In other words, it has as many rows as it has columns. \par
|
||||
\note{
|
||||
If we think of $G$ as a map, this means that $G$ has as many inputs as it has outputs. \\
|
||||
This is to be expected: we stated earlier that quantum gates do not destroy or create qubits.
|
||||
}
|
||||
|
||||
\item $G$ preserves lengths; i.e $|x| = |Gx|$. \par
|
||||
\note{This ensures that $G\ket{\psi}$ is always a valid state.}
|
||||
\end{itemize}
|
||||
|
||||
(You will prove all these properties in any introductory linear algebra course. \\
|
||||
This isn't a lesson on linear algebra, so you may take them as given today.)
|
||||
|
||||
\generic{Remark:}
|
||||
Let $G$ be a quantum gate. \par
|
||||
Since quantum gates are, by definition, \textit{linear} maps,
|
||||
the following holds: \par
|
||||
|
||||
\begin{equation*}
|
||||
G\bigl(a_0 \ket{0} + a_1\ket{1}\bigr) = a_0G\ket{0} + a_1G\ket{1}
|
||||
\end{equation*}
|
||||
|
||||
\problem{}<cnot>
|
||||
Consider the \textit{controlled not} (or \textit{cnot}) gate, defined by the following table: \par
|
||||
\begin{itemize}
|
||||
\item $\text{X}_\text{c}\ket{00} = \ket{00}$
|
||||
\item $\text{X}_\text{c}\ket{01} = \ket{01}$
|
||||
\item $\text{X}_\text{c}\ket{10} = \ket{11}$
|
||||
\item $\text{X}_\text{c}\ket{11} = \ket{10}$
|
||||
\end{itemize}
|
||||
In other words, the cnot gate inverts its second bit if its first bit is $\ket{1}$. \par
|
||||
Find the matrix that applies the cnot gate.
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
\text{X}_\text{c} = \left[\begin{smallmatrix}
|
||||
1 & 0 & 0 & 0 \\
|
||||
0 & 1 & 0 & 0 \\
|
||||
0 & 0 & 0 & 1 \\
|
||||
0 & 0 & 1 & 0 \\
|
||||
\end{smallmatrix}\right]
|
||||
\end{equation*}
|
||||
|
||||
\vspace{4mm}
|
||||
|
||||
If $\ket{a}$ is $\ket{0}$, $\ket{a} \otimes \ket{b}$ is
|
||||
$
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
b_1 \\ b_2
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
\\ 0 \\ 0
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
$, and the \say{not} portion of the matrix is ignored.
|
||||
|
||||
|
||||
\vspace{4mm}
|
||||
|
||||
If $\ket{a}$ is $\ket{1}$, $\ket{a} \otimes \ket{b}$ is
|
||||
$
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
0 \\ 0 \\
|
||||
\left[
|
||||
\begin{smallmatrix}
|
||||
b_1 \\ b_2
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
\end{smallmatrix}
|
||||
\right]
|
||||
$, and the \say{identity} portion of the matrix is ignored.
|
||||
|
||||
|
||||
The state of $\ket{a}$ is always preserved, since it's determined by the position of
|
||||
$\left[\begin{smallmatrix}b_1 \\ b_2\end{smallmatrix}\right]$ in the tensor product.
|
||||
If $\left[\begin{smallmatrix}b_1 \\ b_2\end{smallmatrix}\right]$ is on top, $\ket{a}$ is $\ket{0}$,
|
||||
and if $\left[\begin{smallmatrix}b_1 \\ b_2\end{smallmatrix}\right]$ is on the bottom, $\ket{a}$ is $\ket{1}$.
|
||||
\end{solution}
|
||||
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
\problem{}<applycnot>
|
||||
Evaluate the following:
|
||||
\begin{equation*}
|
||||
\text{X}_\text{C}
|
||||
\Bigl(
|
||||
\frac{1}{2}\ket{00} +
|
||||
\frac{1}{2}\ket{01} -
|
||||
\frac{1}{2}\ket{10} -
|
||||
\frac{1}{2}\ket{11}
|
||||
\Bigr)
|
||||
\end{equation*}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
If we measure the result of \ref{applycnot}, what are the probabilities of getting each state?
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}<cnotflipped>
|
||||
Finally, modify the original cnot gate so that the roles of its bits are reversed: \par
|
||||
$\text{X}_\text{c, flipped} \ket{ab}$ should invert $\ket{a}$ iff $\ket{b}$ is $\ket{1}$.
|
||||
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
\text{X}_\text{c, flipped} = \begin{bmatrix}
|
||||
1 & 0 & 0 & 0 \\
|
||||
0 & 0 & 0 & 1 \\
|
||||
0 & 0 & 1 & 0 \\
|
||||
0 & 1 & 0 & 0 \\
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\definition{}
|
||||
The \textit{Hadamard Gate} is given by the following matrix: \par
|
||||
\begin{equation*}
|
||||
H = \frac{1}{\sqrt{2}}\begin{bmatrix}
|
||||
1 & 1 \\
|
||||
1 & -1
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
\note{Note that we divide by $\sqrt{2}$, since $H$ must be orthonormal.}
|
||||
|
||||
\begin{ORMCbox}{Review: Matrix Multiplication}{black!10!white}{black!65!white}
|
||||
Matrix multiplication works as follows:
|
||||
|
||||
\begin{equation*}
|
||||
AB =
|
||||
\begin{bmatrix}
|
||||
1 & 2 \\
|
||||
3 & 4 \\
|
||||
\end{bmatrix}
|
||||
\begin{bmatrix}
|
||||
a_0 & b_0 \\
|
||||
a_1 & b_1 \\
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
1a_0 + 2a_1 & 1b_0 + 2b_1 \\
|
||||
3a_0 + 4a_1 & 3b_0 + 4b_1 \\
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
|
||||
Note that this is very similar to multiplying each column of $B$ by $A$. \par
|
||||
The product $AB$ is simply $Ac$ for every column $c$ in $B$:
|
||||
|
||||
\begin{equation*}
|
||||
Ac_0 =
|
||||
\begin{bmatrix}
|
||||
1 & 2 \\
|
||||
3 & 4 \\
|
||||
\end{bmatrix}
|
||||
\begin{bmatrix}
|
||||
a_0 \\ a_1
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
1a_0 + 2a_1 \\
|
||||
3a_0 + 4a_1
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
This is exactly the first column of the matrix product. \par
|
||||
Also, note that each element of $Ac_0$ is the dot product of a row in $A$ and a column in $c_0$.
|
||||
\end{ORMCbox}
|
||||
|
||||
|
||||
\problem{}
|
||||
What is $HH$? \par
|
||||
Using this result, find $H^{-1}$.
|
||||
|
||||
\begin{solution}
|
||||
$HH = I$, so $H^{-1} = H$
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
What geometric transformation does $H$ apply to the unit circle? \par
|
||||
\hint{Rotation or reflection? How much, or about which axis?}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
421
src/Advanced/Introduction to Quantum/src/parts/06 hxh.tex
Normal file
421
src/Advanced/Introduction to Quantum/src/parts/06 hxh.tex
Normal file
@ -0,0 +1,421 @@
|
||||
\section{HXH}
|
||||
|
||||
Let's return to the quantum circuit diagrams we discussed a few pages ago. \par
|
||||
Keep in mind that we're working with quantum gates and proper half-qubits---not classical bits, as we were before.
|
||||
|
||||
\definition{Controlled Inputs}
|
||||
A \textit{control input} or \textit{inverted control input} may be attached to any gate. \par
|
||||
These are drawn as filled and empty circles in our circuit diagrams:
|
||||
|
||||
\null\hfill
|
||||
\begin{minipage}{0.48\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{0}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{0}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{0}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
|
||||
\node[gray] at ($([shift={(0,-0.75)}] dot)$) {Non-inverted control input};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.48\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{0}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{1}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{0}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wireijoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
|
||||
\node[gray] at ($([shift={(0,-0.75)}] dot)$) {Inverted control input};
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill\null
|
||||
\vspace{2mm}
|
||||
|
||||
An $X$ gate with a (non-inverted) control input behaves like an $X$ gate if \textit{all} its control inputs are $\ket{1}$,
|
||||
and like $I$ otherwise. An $X$ gate with an inverted control inputs does the opposite, behaving like $I$ if its input is $\ket{1}$
|
||||
and like $X$ otherwise. The two circuits above illustrate this fact---take a look at their inputs and outputs.
|
||||
|
||||
\vspace{2mm}
|
||||
Of course, we can give a gate multiple controls. \par
|
||||
An $X$ gate with multiple controls behaves like an $X$ gate if...
|
||||
\begin{itemize}
|
||||
\item all non-inverted controls are $\ket{1}$, and
|
||||
\item all inverted controls are $\ket{0}$
|
||||
\end{itemize}
|
||||
...and like $I$ otherwise.
|
||||
|
||||
\problem{}
|
||||
What are the final states of the qubits in the diagram below?
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1.0]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{1}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{0}$};
|
||||
\node[qubit] (c) at (0, -2) {$\ket{1}$};
|
||||
\node[qubit] (d) at (0, -3) {$\ket{0}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {?};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {?};
|
||||
\draw[wire] (c) -- ([shift={(3, 0)}] c.center) node[qubit] {?};
|
||||
\draw[wire] (d) -- ([shift={(3, 0)}] d.center) node[qubit] {?};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] d)!0.5!([shift={(2,0)}] d)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\draw[wireijoin]
|
||||
($([shift={(1,0)}] c)!0.5!([shift={(2,0)}] c)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] d)!0.5!([shift={(2,0)}] d)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{b}{1}{b}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
Consider the diagram below, with one controlled $X$ gate: \par
|
||||
\note[Note]{The CNOT gate from \ref{cnot} is a controlled $X$ gate.}
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{a}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{b}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
Find a matrix $\text{X}_\text{c}$ that represents this gate, so that $\text{X}_\text{c}\ket{ab}$ works as expected.
|
||||
|
||||
\begin{solution}
|
||||
\begin{equation*}
|
||||
\text{X}_\text{c} = \begin{bmatrix}
|
||||
1 & 0 & 0 & 0 \\
|
||||
0 & 0 & 0 & 1 \\
|
||||
0 & 0 & 1 & 0 \\
|
||||
0 & 1 & 0 & 0
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
Note that this is also the solution to \ref{cnotflipped}.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Now, evaluate the following. Remember that
|
||||
$\ket{+} = \frac{1}{\sqrt{2}}\Bigl(\ket{0} + \ket{1}\Bigr)$ and
|
||||
$\ket{-} = \frac{1}{\sqrt{2}}\Bigl(\ket{0} - \ket{1}\Bigr)$
|
||||
|
||||
\null\hfill
|
||||
\begin{minipage}{0.48\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{1}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{a}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{b}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.48\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{+}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{a}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{b}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill\null
|
||||
|
||||
\vspace{5mm}
|
||||
|
||||
\null\hfill
|
||||
\begin{minipage}{0.48\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{-}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{1}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{a}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{b}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.48\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{+}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{-}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(3, 0)}] a.center) node[qubit] {$\ket{a}$};
|
||||
\draw[wire] (b) -- ([shift={(3, 0)}] b.center) node[qubit] {$\ket{b}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill\null
|
||||
|
||||
\hint{
|
||||
Note that some of these states are entangled. The circuit diagrams are a bit misleading:
|
||||
we can't write an entangled state as two distinct qubits!
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
So, don't try to find $\ket{a}$ and $\ket{b}$. \par
|
||||
Instead find $\ket{ab} = \psi_0\ket{00} + \psi_1\ket{01} + \psi_2\ket{10} + \psi_3\ket{11}$, and factor it into $\ket{a} \otimes \ket{b}$ if you can.
|
||||
}
|
||||
|
||||
\begin{solution}
|
||||
In all the below equations, let $\tau = \frac{1}{\sqrt{2}}$.
|
||||
\begin{itemize}[itemsep = 1mm]
|
||||
\item $
|
||||
\text{X}_\text{c}\ket{01}
|
||||
= \ket{11}
|
||||
$
|
||||
|
||||
\item $
|
||||
\text{X}_\text{c}\ket{0+}
|
||||
= \tau\ket{00} + \tau\ket{11}
|
||||
$ \note[Note]{This state is entangled!}
|
||||
|
||||
\item $
|
||||
\text{X}_\text{c}\ket{-1}
|
||||
= -\tau\ket{10} + \tau\ket{11}
|
||||
= (-\ket{-}) \otimes \ket{1}
|
||||
$
|
||||
|
||||
\item $
|
||||
\text{X}_\text{c}\ket{+-}
|
||||
= \frac{1}{2}(\ket{00} - \ket{01} + \ket{10} - \ket{11})
|
||||
= \ket{+-}
|
||||
$
|
||||
\end{itemize}
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\generic{Remark:}
|
||||
Now, consider the following circuit:
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{1}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(5, 0)}] a.center) node[qubit] {$\ket{a}$};
|
||||
\draw[wire] (b) -- ([shift={(5, 0)}] b.center) node[qubit] {$\ket{b}$};
|
||||
|
||||
\qubox{b}{1}{b}{2}{$H$}
|
||||
\qubox{b}{3}{b}{4}{$H$}
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(2,0)}] a)!0.5!([shift={(3,0)}] a)$) --
|
||||
($([shift={(2,0)}] b)!0.5!([shift={(3,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(2,0)}] b)!0.5!([shift={(3,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{2}{a}{3}{$X$}
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
We already know that $H$ is its own inverse: $HH = I$. \par
|
||||
Applying $H$ to a qubit twice does not change its state.
|
||||
|
||||
\note{
|
||||
Recall that $H = \frac{1}{\sqrt{2}}\left[\begin{smallmatrix} 1 & 1 \\ 1 & -1 \end{smallmatrix}\right]$
|
||||
}
|
||||
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
So, we might expect that the two circuits below are equivalent: \par
|
||||
After all, we $H$ the second bit, use it to control an $X$ gate, and then $H$ it back to its previous state.
|
||||
|
||||
\null\hfill
|
||||
\begin{minipage}{0.48\textwidth}\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{1}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(5, 0)}] a.center) node[qubit] {$\ket{a}$};
|
||||
\draw[wire] (b) -- ([shift={(5, 0)}] b.center) node[qubit] {$\ket{b}$};
|
||||
|
||||
\qubox{b}{1}{b}{2}{$H$}
|
||||
\qubox{b}{3}{b}{4}{$H$}
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(2,0)}] a)!0.5!([shift={(3,0)}] a)$) --
|
||||
($([shift={(2,0)}] b)!0.5!([shift={(3,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(2,0)}] b)!0.5!([shift={(3,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{2}{a}{3}{$X$}
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.48\textwidth}\begin{center}
|
||||
\begin{tikzpicture}[scale=0.8]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{0}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{1}$};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(5, 0)}] a.center) node[qubit] {$\ket{c}$};
|
||||
\draw[wire] (b) -- ([shift={(5, 0)}] b.center) node[qubit] {$\ket{d}$};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(2,0)}] a)!0.5!([shift={(3,0)}] a)$) --
|
||||
($([shift={(2,0)}] b)!0.5!([shift={(3,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(2,0)}] b)!0.5!([shift={(3,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{a}{2}{a}{3}{$X$}
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}\end{minipage}
|
||||
\hfill\null
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
This, however, isn't the case: \par
|
||||
If we compute the state $\ket{ab}$ in the left circuit, we get $[0.5, ~0.5, -0.5, ~0.5]$ (which is entangled), \par
|
||||
but the state $\ket{cd}$ on the right is $\ket{11} = [0,0,0,1]$. \par
|
||||
\note{This is easy to verify with a few matrix multiplications.}
|
||||
|
||||
|
||||
\vspace{4mm}
|
||||
|
||||
How does this make sense? \par
|
||||
Remember that a two-bit quantum state is \textit{not} equivalent to a pair of one-qubit quantum states.
|
||||
We must treat a multi-qubit state as a single unit.
|
||||
|
||||
Recall that a two-bit state $\ket{ab}$ comes with four probabilities:
|
||||
$\mathcal{P}(\texttt{00})$, $\mathcal{P}(\texttt{01})$, $\mathcal{P}(\texttt{10})$, and $\mathcal{P}(\texttt{11})$.
|
||||
If we change the probabilities of only $\ket{a}$, \textit{all four of these change!}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
Because of this fact, \say{controlled gates} may not work as you expect. They may seem
|
||||
to \say{read} their controlling qubit without affecting its state, but remember---a
|
||||
controlled gate still affects the \textit{entire} state. As we noted before, it is
|
||||
not possible to apply a transformation to one bit of a quantum state.
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale=1]
|
||||
\node[qubit] (a) at (0, 0) {\texttt{1}};
|
||||
\node[qubit] (b) at (0, -1) {\texttt{0}};
|
||||
|
||||
\draw[wire] (a) -- ([shift={(5, 0)}] a.center) node[qubit] {\texttt{0}};
|
||||
\draw[wire] (b) -- ([shift={(5, 0)}] b.center) node[qubit] {\texttt{1}};
|
||||
|
||||
\ghostqubox{a}{1}{b}{2}{$T_1$}
|
||||
\ghostqubox{a}{2}{b}{3}{$T_2$}
|
||||
\ghostqubox{a}{3}{b}{4}{$T_3$}
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
195
src/Advanced/Introduction to Quantum/src/parts/07 superdense.tex
Normal file
195
src/Advanced/Introduction to Quantum/src/parts/07 superdense.tex
Normal file
@ -0,0 +1,195 @@
|
||||
\section{Superdense Coding}
|
||||
|
||||
Consider the following entangled two-qubit states, called the \textit{bell states}:
|
||||
\begin{itemize}
|
||||
\item $\ket{\Phi^+} = \frac{1}{\sqrt{2}}\ket{00} + \frac{1}{\sqrt{2}}\ket{11}$
|
||||
\item $\ket{\Phi^-} = \frac{1}{\sqrt{2}}\ket{00} - \frac{1}{\sqrt{2}}\ket{11}$
|
||||
\item $\ket{\Psi^+} = \frac{1}{\sqrt{2}}\ket{01} + \frac{1}{\sqrt{2}}\ket{10}$
|
||||
\item $\ket{\Psi^-} = \frac{1}{\sqrt{2}}\ket{01} - \frac{1}{\sqrt{2}}\ket{10}$
|
||||
\end{itemize}
|
||||
|
||||
\problem{}
|
||||
The probabilistic bits we get when measuring any of the above may be called \textit{anticorrelated bits}. \par
|
||||
If we measure the first bit of any of these states and observe $1$, what is the resulting compound state? \par
|
||||
What if we observe $0$ instead? \par
|
||||
Do you see why we can call these bits anticorrelated?
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
Show that the bell states are orthogonal \par
|
||||
\hint{Dot product}
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}<bellmeasure>
|
||||
Say we have a pair of qubits in one of the four bell states. \par
|
||||
How can we find out which of the four states we have, with certainty? \par
|
||||
\hint{$H\ket{+} = \ket{0}$, and $H\ket{-} = \ket{1}$}
|
||||
|
||||
\begin{solution}
|
||||
$X_\text{c}\ket{\Phi^+} = \ket{+0}$ and $(H \otimes I)\ket{+0} = \ket{00}$ \par
|
||||
$X_\text{c}\ket{\Psi^+} = \ket{+1}$ and $(H \otimes I)\ket{+1} = \ket{01}$ \par
|
||||
$X_\text{c}\ket{\Phi^-} = \ket{-0}$ and $(H \otimes I)\ket{-0} = \ket{10}$ \par
|
||||
$X_\text{c}\ket{\Psi^-} = \ket{-1}$ and $(H \otimes I)\ket{-1} = \ket{11}$ \par
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\definition{}
|
||||
The $Z$ gate is defined as follows: \par
|
||||
\begin{equation*}
|
||||
Z\begin{bmatrix}
|
||||
\psi_0 \\ \psi_1
|
||||
\end{bmatrix}
|
||||
=
|
||||
\begin{bmatrix}
|
||||
\psi_0 \\ -\psi_1
|
||||
\end{bmatrix}
|
||||
\end{equation*}
|
||||
|
||||
\problem{}
|
||||
Suppose that Alice and Bob are each in possession of one qubit. \par
|
||||
These two qubits are entangled, and have the compound state $\ket{\Phi^+}$. \par
|
||||
\note[Note]{We could say that they each have \say{half} of $\ket{\Phi^+}$.}
|
||||
How can Alice send a two-bit classical state
|
||||
(i.e, one of the four values \texttt{00}, \texttt{01}, \texttt{10}, \texttt{11}) \par
|
||||
to Bob by only sending one qubit?
|
||||
|
||||
\begin{solution}
|
||||
Alice can turn any bell state into any other by applying operations to her qubit. \par
|
||||
Once she does so, Bob may use the procedure in \ref{bellmeasure} to read one of four states.
|
||||
|
||||
\null\hfill
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1]
|
||||
\node[qubit] (a) at (0, 0) {};
|
||||
\node[qubit] (b) at (0, -1) {};
|
||||
\draw[wire] (a) -- ([shift={(4, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire] (b) -- ([shift={(4, 0)}] b.center) node[qubit] {};
|
||||
\node[right] at (0, -0.5) {$\ket{\Phi^+}$};
|
||||
\node[left] at (4, -0.5) {$\ket{\Phi^-}$};
|
||||
|
||||
\qubox{a}{1.5}{a}{2.5}{$Z$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1]
|
||||
\node[qubit] (a) at (0, 0) {};
|
||||
\node[qubit] (b) at (0, -1) {};
|
||||
\draw[wire] (a) -- ([shift={(4, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire] (b) -- ([shift={(4, 0)}] b.center) node[qubit] {};
|
||||
\node[right] at (0, -0.5) {$\ket{\Phi^+}$};
|
||||
\node[left] at (4, -0.5) {$\ket{\Psi^+}$};
|
||||
|
||||
\qubox{a}{1.5}{a}{2.5}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{0.3\textwidth}
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1]
|
||||
\node[qubit] (a) at (0, 0) {};
|
||||
\node[qubit] (b) at (0, -1) {};
|
||||
\draw[wire] (a) -- ([shift={(4, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire] (b) -- ([shift={(4, 0)}] b.center) node[qubit] {};
|
||||
\node[right] at (0, -0.5) {$\ket{\Phi^+}$};
|
||||
\node[left] at (4, -0.5) {$\ket{\Psi^-}$};
|
||||
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\qubox{a}{2}{a}{3}{$Z$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{minipage}
|
||||
\hfill\null
|
||||
|
||||
\vspace{4mm}
|
||||
\linehack{}
|
||||
|
||||
The complete circuit is shown below. Double lines indicate classical bits.
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1]
|
||||
\node[qubit] (a) at (0, 0) {$a$};
|
||||
\node[qubit] (b) at (0, -1) {$b$};
|
||||
\node[qubit] (c) at (0, -2) {$\ket{\Phi^+_\text{A}}$};
|
||||
\node[qubit] (d) at (0, -3) {$\ket{\Phi^+_\text{B}}$};
|
||||
\draw[wire, double] (a) -- ([shift={(9, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire, double] (b) -- ([shift={(9, 0)}] b.center) node[qubit] {};
|
||||
\draw[wire] (c) -- ([shift={(7, 0)}] c.center) node[qubit] {};
|
||||
\draw[wire] (d) -- ([shift={(7, 0)}] d.center) node[qubit] {};
|
||||
|
||||
\draw[wire, double]
|
||||
([shift={(7, 0)}] c.center)
|
||||
-- ([shift={(9, 0)}] c.center)
|
||||
node[qubit] {$a$}
|
||||
;
|
||||
|
||||
\draw[wire, double]
|
||||
([shift={(7, 0)}] d.center)
|
||||
-- ([shift={(9, 0)}] d.center)
|
||||
node[qubit] {$b$}
|
||||
;
|
||||
|
||||
|
||||
\draw[wire, double]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$) --
|
||||
($([shift={(1,0)}] c)!0.5!([shift={(2,0)}] c)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
|
||||
\qubox{c}{1}{c}{2}{$X$}
|
||||
|
||||
\draw[wire, double]
|
||||
($([shift={(2,0)}] a)!0.5!([shift={(3,0)}] a)$) --
|
||||
($([shift={(2,0)}] c)!0.5!([shift={(3,0)}] c)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(2,0)}] a)!0.5!([shift={(3,0)}] a)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
|
||||
\qubox{c}{2}{c}{3}{$Z$}
|
||||
|
||||
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(4,0)}] c)!0.5!([shift={(5,0)}] c)$) --
|
||||
($([shift={(4,0)}] d)!0.5!([shift={(5,0)}] d)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(4,0)}] c)!0.5!([shift={(5,0)}] c)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
|
||||
\qubox{d}{4}{d}{5}{$X$}
|
||||
\qubox{c}{5}{c}{6}{$H$}
|
||||
|
||||
|
||||
|
||||
\qubox{c}{6.3}{c}{8}{measure}
|
||||
\qubox{d}{6.3}{d}{8}{measure}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
|
||||
\generic{Remark:}
|
||||
Superdense coding consumes a pre-shared entangled pair to transmit two bits of information.
|
||||
This entanglement may \textit{not} be re-used---it is destroyed when Bob measures the final qubit states.
|
||||
|
||||
\pagebreak
|
||||
|
179
src/Advanced/Introduction to Quantum/src/parts/08 teleport.tex
Normal file
179
src/Advanced/Introduction to Quantum/src/parts/08 teleport.tex
Normal file
@ -0,0 +1,179 @@
|
||||
\section{Quantum Teleportation}
|
||||
|
||||
Superdense coding lets us convert quantum bandwidth into classical bandwidth. \par
|
||||
Quantum teleportation does the opposite, using two classical bits and an entangled pair
|
||||
to transmit a quantum state.
|
||||
|
||||
\generic{Setup:}
|
||||
Again, suppose Alice and Bob each have half of a $\ket{\Phi^+}$ state. \par
|
||||
We'll call the state Alice wants to teleport $\ket{\psi} = \psi_0\ket{0} + \psi_1\ket{1}$. \par
|
||||
|
||||
\problem{}
|
||||
What is the three-qubit state $\ket{\psi}\ket{\Phi^+}$ in terms of $\psi_0$ and $\psi_1$?
|
||||
|
||||
\vfill
|
||||
|
||||
\problem{}
|
||||
To teleport $\ket{\psi}$, Alice applies the following circuit to her two qubits, where $\ket{\Phi^+_\text{A}}$ is her half of $\ket{\Phi^+}$. \par
|
||||
She then measures both qubits and sends the result to Bob.
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1]
|
||||
\node[qubit] (a) at (0, 0) {$\ket{\Phi^+_\text{A}}$};
|
||||
\node[qubit] (b) at (0, -1) {$\ket{\psi}$};
|
||||
\draw[wire] (a) -- ([shift={(4, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire] (b) -- ([shift={(4, 0)}] b.center) node[qubit] {};
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] b)!0.5!([shift={(2,0)}] b)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
|
||||
\qubox{b}{2}{b}{3}{$H$}
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
What should Bob do so that $\ket{\Phi^+_B}$ takes the state $\ket{\psi}$ had initially?
|
||||
|
||||
\begin{solution}
|
||||
\begin{itemize}
|
||||
\item
|
||||
If Bob receives \texttt{00}, he does nothing.
|
||||
|
||||
\item
|
||||
If Bob receives \texttt{01}, he applies an $X$ gate to his qubit.
|
||||
|
||||
\item
|
||||
If Bob receives \texttt{01}, he applies a $Z$ gate to his qubit.
|
||||
|
||||
\item
|
||||
If Bob receives \texttt{11}, he applies $ZX$ to his qubit.
|
||||
\end{itemize}
|
||||
|
||||
\linehack{}
|
||||
|
||||
The complete circuit is shown below. Double lines indicate classical bits.
|
||||
|
||||
|
||||
\begin{center}
|
||||
\begin{tikzpicture}[scale = 1]
|
||||
\node[qubit] (a) at (0, -1) {$\ket{\Phi^+_\text{A}}$};
|
||||
\node[qubit] (b) at (0, -2) {$\ket{\Phi^+_\text{B}}$};
|
||||
\node[qubit] (c) at (0, 0) {$\ket{\psi}$};
|
||||
\draw[wire] (a) -- ([shift={(5, 0)}] a.center) node[qubit] {};
|
||||
\draw[wire] (b) -- ([shift={(9, 0)}] b.center) node[qubit] {$\ket{\psi}$};
|
||||
\draw[wire] (c) -- ([shift={(5, 0)}] c.center) node[qubit] {};
|
||||
|
||||
\draw[wire, double]
|
||||
([shift={(5, 0)}] a.center)
|
||||
-- ([shift={(9, 0)}] a.center)
|
||||
node[qubit] {}
|
||||
;
|
||||
|
||||
\draw[wire, double]
|
||||
([shift={(5, 0)}] c.center)
|
||||
-- ([shift={(9, 0)}] c.center)
|
||||
node[qubit] {}
|
||||
;
|
||||
|
||||
\draw[wire]
|
||||
($([shift={(1,0)}] a)!0.5!([shift={(2,0)}] a)$) --
|
||||
($([shift={(1,0)}] c)!0.5!([shift={(2,0)}] c)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(1,0)}] c)!0.5!([shift={(2,0)}] c)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
|
||||
\qubox{c}{2}{c}{3}{$H$}
|
||||
\qubox{a}{1}{a}{2}{$X$}
|
||||
|
||||
\qubox{a}{3.8}{a}{5.5}{measure}
|
||||
\qubox{c}{3.8}{c}{5.5}{measure}
|
||||
|
||||
|
||||
\draw[wire, double]
|
||||
($([shift={(6,0)}] a)!0.5!([shift={(7,0)}] a)$) --
|
||||
($([shift={(6,0)}] b)!0.5!([shift={(7,0)}] b)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(6,0)}] a)!0.5!([shift={(7,0)}] a)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
|
||||
\qubox{b}{6}{b}{7}{$X$}
|
||||
|
||||
|
||||
\draw[wire, double]
|
||||
($([shift={(7,0)}] b)!0.5!([shift={(8,0)}] b)$) --
|
||||
($([shift={(7,0)}] c)!0.5!([shift={(8,0)}] c)$)
|
||||
;
|
||||
\draw[wirejoin]
|
||||
($([shift={(7,0)}] c)!0.5!([shift={(8,0)}] c)$)
|
||||
circle[radius=0.1] coordinate(dot)
|
||||
;
|
||||
\qubox{b}{7}{b}{8}{$Z$}
|
||||
|
||||
\end{tikzpicture}
|
||||
\end{center}
|
||||
|
||||
Note how similar this is to the superdense coding circuit.
|
||||
\end{solution}
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\problem{}
|
||||
With an informal proof, show that it is not possible to use superdense coding to send
|
||||
more than two classical bits through an entangled two-qubit quantum state.
|
||||
|
||||
\begin{solution}
|
||||
If superdense coding was any more efficient, we could repeatedly apply superdense coding and quantum teleportation,
|
||||
to compress an arbitrary number of bits into two \say{seed} bits.
|
||||
|
||||
\linehack{}
|
||||
|
||||
\textbf{Even worse, this would allow faster-than-light communication:} \par
|
||||
|
||||
Because the seed message is only 4 bits, Alice has decent odds of just
|
||||
guessing it. She'll guess wrong and trash the message the majority of the
|
||||
time but, by using an error correcting code, she can tell whether or not
|
||||
the guess was correct or she trashed the message. And by repeating the protocol
|
||||
enough times, we can increase the odds of the message being received arbitrarily
|
||||
close to certainty.
|
||||
|
||||
\note[Note]{
|
||||
I'm implicitly assuming that if Alice uses the wrong seed, she gets a totally random message---or
|
||||
at least a message that isn't guaranteed to follow the error correction scheme better than chance would.
|
||||
The alternative, where Alice receives noise that's uncorrelated with the message and yet somehow satisfies
|
||||
arbitrary error correction schemes, is waaay too magical for me to even consider.
|
||||
}
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Suppose Alice and Bob perform the iterated-ultradense-encode-and-guess process 100 times.
|
||||
That gives a failure rate of $(\nicefrac{15}{16})^{100} \approx 0.5\%$.
|
||||
Sure it's a hundred times more work than just sending the 4 bits, and less likely to succeed to boot,
|
||||
but the new protocol \textit{doesn't require any bits to be physically transmitted}.
|
||||
There's no signalling delay!
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
In fact, Alice could even perform the decoding process \textit{before} Bob did the encoding.
|
||||
But we're already so far into \say{everything is clearly broken} territory that creating time travel paradoxes is overkill.
|
||||
|
||||
|
||||
\vspace{5mm}
|
||||
|
||||
|
||||
From \url{https://algassert.com/2016/05/29/ultra-dense-coding-allows-ftl.html}
|
||||
\end{solution}
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
79
src/Advanced/Introduction to Quantum/src/tikzset.tex
Normal file
79
src/Advanced/Introduction to Quantum/src/tikzset.tex
Normal file
@ -0,0 +1,79 @@
|
||||
\usetikzlibrary{arrows.meta}
|
||||
\usetikzlibrary{shapes.geometric}
|
||||
\usetikzlibrary{calc}
|
||||
\usetikzlibrary{circuits.logic.US}
|
||||
\usetikzlibrary{plotmarks}
|
||||
|
||||
|
||||
\tikzset{
|
||||
gate/.style = {
|
||||
draw,
|
||||
rectangle,
|
||||
fill = white,
|
||||
line width = 0.35mm
|
||||
},
|
||||
qubit/.style = {
|
||||
fill = \ORMCbgcolor,
|
||||
line width = 0.35mm
|
||||
},
|
||||
wire/.style = {
|
||||
line width = 1
|
||||
},
|
||||
wirejoin/.style = {
|
||||
fill = oblue,
|
||||
draw = oblue,
|
||||
line width = 1.5
|
||||
},
|
||||
wireijoin/.style = {
|
||||
fill = white,
|
||||
draw = oblue,
|
||||
line width = 1.5
|
||||
},
|
||||
}
|
||||
|
||||
% Macros
|
||||
|
||||
|
||||
% Do NOT put a semicolon after qubox,
|
||||
% it gives a "character ; not found" error.
|
||||
% LaTeX is odd.
|
||||
\def\qubox#1#2#3#4#5{
|
||||
% 1: point ne
|
||||
% 2: point ne x offset
|
||||
% 3: point sw
|
||||
% 4: point sw x offset
|
||||
% 5: label text
|
||||
\draw[
|
||||
line width = 1,
|
||||
fill = white,
|
||||
draw = black
|
||||
]
|
||||
([shift={(#2 + 0.1, 0.4)}] #1.center)
|
||||
-- ([shift={(#2 + 0.1, -0.4)}] #1.center |- #3.center)
|
||||
-- ([shift={(#4 - 0.1, -0.4)}] #3.center)
|
||||
-- ([shift={(#4 - 0.1, 0.4)}] #1.center -| #3.center)
|
||||
-- cycle
|
||||
;
|
||||
\node at ($([shift={(#2,0)}] #1)!0.5!([shift={(#4,0)}] #3)$) {#5};
|
||||
}
|
||||
|
||||
\def\ghostqubox#1#2#3#4#5{
|
||||
% 1: point ne
|
||||
% 2: point ne x offset
|
||||
% 3: point sw
|
||||
% 4: point sw x offset
|
||||
% 5: label text
|
||||
\draw[
|
||||
line width = 1,
|
||||
fill = white,
|
||||
draw = gray,
|
||||
dashed
|
||||
]
|
||||
([shift={(#2 + 0.1, 0.4)}] #1.center)
|
||||
-- ([shift={(#2 + 0.1, -0.4)}] #1.center |- #3.center)
|
||||
-- ([shift={(#4 - 0.1, -0.4)}] #3.center)
|
||||
-- ([shift={(#4 - 0.1, 0.4)}] #1.center -| #3.center)
|
||||
-- cycle
|
||||
;
|
||||
\node[gray] at ($([shift={(#2,0)}] #1)!0.5!([shift={(#4,0)}] #3)$) {#5};
|
||||
}
|
Reference in New Issue
Block a user