\documentclass[11pt]{article}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{qcircuit}

\newcommand{\handout}[5]{
  \noindent
  \begin{center}
  \framebox{
    \vbox{
      \hbox to 5.78in { {\bf Frontiers of Quantum Complexity and Cryptography} \hfill #2 }
      \vspace{4mm}
      \hbox to 5.78in { {\Large \hfill #5  \hfill} }
      \vspace{2mm}
      \hbox to 5.78in { {\em #3 \hfill #4} }
    }
  }
  \end{center}
  \vspace*{4mm}
}

\newcommand{\lecture}[4]{\handout{#1}{#2}{#3}{Scribes: #4}{Lecture #1}}


\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{observation}[theorem]{Observation}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{fact}[theorem]{Fact}
\newtheorem{assumption}[theorem]{Assumption}



%%%%%%QUANTUM MACROS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\newcommand{\ket}[1]{{|#1\rangle}}
\newcommand{\bra}[1]{{\langle#1|}}
\newcommand{\bigket}[1]{{\left |#1 \right \rangle}}
\newcommand{\bigbra}[1]{{\left \langle#1 \right|}}
\newcommand{\ip}[2]{\langle #1 | #2 \rangle}
\newcommand{\ketbra}[2]{|#1\rangle\! \langle #2|}
\newcommand{\Tr}{\mbox{\rm Tr}}
\newcommand{\Id}{\mathbb{I}}
\DeclareMathOperator*{\Ex}{\mathbb{E}}


\newcommand{\C}{\ensuremath{\mathbb{C}}}
\newcommand{\N}{\ensuremath{\mathbb{N}}}
\newcommand{\F}{\ensuremath{\mathbb{F}}}
\newcommand{\K}{\ensuremath{\mathbb{K}}}
\newcommand{\R}{\ensuremath{\mathbb{R}}}
\newcommand{\Z}{\ensuremath{\mathbb{Z}}}

\newcommand{\eps}{\varepsilon}
\newcommand{\conj}[1]{\overline{#1}}





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 1-inch margins, from fullpage.sty by H.Partl, Version 2, Dec. 15, 1988.
\topmargin 0pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
\textheight 8.9in
\oddsidemargin 0pt
\evensidemargin \oddsidemargin
\marginparwidth 0.5in
\textwidth 6.5in

\parindent 0in
\parskip 1.5ex
%\renewcommand{\baselinestretch}{1.25}

\begin{document}

\lecture{1}{Spring 2022}{Lecturer: Henry Yuen}{Sally Student}

\section{Overview}

In the last lecture we \ldots.

In this lecture we \ldots. In particular, we talked about quantum things, like quantum states
\[
	\ket{\psi} = \alpha \ket{0} + \beta \ket{1}.
\]
We also talked about dual vectors
\[
	\bra{\psi} = \alpha^* \bra{0} + \beta^* \bra{1}.
\]

Later, we talked about density matrices
\[
	\rho = \frac{1}{2} \ketbra{0}{0} + \frac{1}{2} \ketbra{1}{1}.
\]


And then we traced out stuff
\[
	\sigma = \Tr_C(\rho).
\]

\section{Some circuits}

Here's a quantum circuit:

\[
\Qcircuit @C=1em @R=.7em {
	& \qw & \gate{R_\frac{1}{4}} & \qw & \qw & \qw & \qw & \qw \\
	& \qw & \qw & \gate{R_\frac{1}{8}} & \qw & \qw & \qw & \qw \\
	& \vdots &  &  &\ddots  &  &  &  \\
	& \qw & \qw & \qw & \qw & \qw & \gate{R_{2^{-n}}} & \qw \\
	& \qw & \ctrl{-4} & \ctrl{-3} & \qw & \qw & \ctrl{-1} & \qw
}
\]
Here's another quantum circuit:
	\[
		\Qcircuit @C=1.7em @R=1.7em {
	\lstick{\ket{0}} & \gate{H} & \ctrl{1} & \gate{H} & \meter \\
	\lstick{\ket{\psi}} & \qw & \multigate{1}{F_n} & \qw & \qw \\
	\lstick{\ket{\varphi}} & \qw & \ghost{F_n} & \qw & \qw  \\
	}
	\]

And another one:
\[
\Qcircuit @C=1em @R=.7em {
\lstick{\ket{0}}   &\gate{R(\theta)}& \ctrl{1}  & \qw \\
\lstick{\ket{0}} &\qw &\gate{B}  & \meter &
} 
\]

\section{Main Section}

We begin by describing the problem \ldots.
Make sure to use sections and subsections.

\subsection{Blah blah blah}
Here is a subsection.

\subsubsection{Blah blah blah}
Here is a subsubsection. You can use these as well.

\subsection{Using Boldface}
Make sure to use lots of boldface.

\paragraph{Question:}
How would you use boldface?

\paragraph{Example:}
This is an example showing how to use boldface to 
help organize your lectures.


\paragraph{Some Formatting.}
Here is some formatting that you can use in your notes:
\begin{itemize}
\item {\em Item One} -- This is the first item.
\item {\em Item Two} -- This is the second item.
\item \dots and here are other items.
\end{itemize}

If you need to number things, you can use this style:
\begin{enumerate}
\item {\em Item One} -- Again, this is the first item.
\item {\em Item Two} -- Again, this is the second item.
\item \dots and here are other items.
\end{enumerate}



\paragraph{Bibliography.}
Please give real bibliographical citations for the papers that we
mention in class. See below for how to include a bibliography section.
If you use BibTeX, integrate the .bbl file into your .tex
source. You should reference papers like this: ``The FKS
dictionary originates in a paper by Fredman, Koml\'{o}s and
Szemer\'{e}di \cite{fks}.'' In general, the name of the authors should
appear in text at most once (for the first citation); further
citations look like: ``Our proof follows that of \cite{fks}''.

Take a look at previous lectures (TeX files are available) to see the
details. A excellent source for bibliographical citations is
DBLP. Just Google DBLP and an author's name.


%\bibliography{mybib}
\bibliographystyle{alpha}

\begin{thebibliography}{77}

\bibitem{fks}
M. Fredman, J. Koml\'{o}s, E. Szemer\'{e}di,
\emph{Storing a Sparse Table with $O(1)$ Worst Case Access Time},
Journal of the ACM, 31(3):538-544, 1984.

\end{thebibliography}

\end{document}
