\documentclass{article}
\usepackage{amsmath,amsthm}
\usepackage{amssymb,latexsym}
\usepackage{epsfig}
\usepackage{hyperref}
\usepackage{float}
\usepackage{fullpage}
\usepackage{enumerate}
\usepackage{paralist}
\usepackage{graphicx}


\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}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{alg}[theorem]{Algorithm}
\newtheorem{protocol}[theorem]{Protocol}
\newtheorem{problem}[theorem]{Problem}

\newcommand{\ip}[2]{\left\langle #1 , #2\right\rangle}
\newcommand{\tr}{\trace}
\newcommand{\setft}[1]{\mathrm{#1}}
\newcommand{\lin}[1]{\setft{L}\left(#1\right)}
\newcommand{\density}[1]{\setft{D}\left(#1\right)}
\newcommand{\unitary}[1]{\setft{U}\left(#1\right)}
\newcommand{\herm}[1]{\setft{Herm}\left(#1\right)}
\newcommand{\pos}[1]{\setft{Pos}\left(#1\right)}
\newcommand{\sep}[1]{\setft{Sep}\left(#1\right)}
\newcommand{\rank}[1]{\operatorname{rank}(#1)}
\newcommand{\ex}{\paragraph{Exercise.}}

\def\I{I}
\def\({\left(}
\def\){\right)}
\def\X{\mathcal{X}}
\def\Y{\mathcal{Y}}
\def\Z{\mathcal{Z}}
\def\W{\mathcal{W}}
\def\yes{\text{yes}}
\def\no{\text{no}}
\def\blog{\textup{log}}
\newcommand{\A}{\spa{A}}
\newcommand{\B}{\spa{B}}
\newcommand{\UA}{U_A}


\newcommand{\eps}{\varepsilon}
\newcommand{\epssdp}{\varepsilon_{\rm sdp}}
\newcommand{\bra}[1]{\langle #1|}
\newcommand{\ket}[1]{|#1\rangle}
\newcommand{\braket}[2]{\langle #1|#2\rangle}
\newcommand{\ketbra}[2]{\ket{#1}{\bra{#2}}}
\newcommand{\lmin}[1] {\lambda_{\operatorname{min}}(#1)}
\newcommand{\lmax}[1] {\lambda_{\operatorname{max}}(#1)}
\newcommand{\lhyes} {\operatorname{LH_{yes}}}
\newcommand{\lhno} {\operatorname{LH_{no}}}
\newcommand{\CQ}{\mathcal{CQ}}
\newcommand{\lh}{\operatorname{LH}}
\newcommand{\flh}{\operatorname{5-LH}}
\newcommand{\klhh}{\operatorname{k-LH}}
\newcommand{\qma}{\operatorname{QMA}}
\newcommand{\enc}[1]{\left<#1\right>}

\newcommand{\C}{C}
\newcommand{\Id}{Id} %CHECK
\newcommand{\Exs}[2]{E_{#1}[#2]} %CHECK

\newcommand{\beq}{\begin{equation}}
\newcommand{\eeq}{\end{equation}}

\newcommand{\trace}{{\rm Tr}}

%\newcommand{\dim}{\operatorname{dim}}
\newcommand{\norm}[1]{\left\|\,#1\,\right\|}       % norm
\newcommand{\pnorm}[1]{\left\|\,#1\,\right\|_p}       % norm
\newcommand{\onorm}[1]{\norm{#1}_{\mathrm{1}}}      % Euclidean norm for vectors
\newcommand{\enorm}[1]{\norm{#1}_{\mathrm{2}}}      % Euclidean norm for vectors
\newcommand{\trnorm}[1]{\norm{#1}_{\mathrm {tr}}}  % trace norm
\newcommand{\fnorm}[1]{\norm{#1}_{\mathrm {F}}}    % frobenius norm
\newcommand{\snorm}[1]{\norm{#1}_{\mathrm {\infty}}}    % spectral norm

\newcommand{\set}[1]{{\left\{#1\right\}}}    % braces for set notation
\newcommand{\ve}[1]{\mathbf{#1}}
\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}
\newcommand{\swap}{\operatorname{SWAP}}
\newcommand{\poly}{\operatorname{poly}}
\newcommand{\cc}{d^{\frac{k}{2}}}
\newcommand{\OPT}{{\rm OPT}}
\newcommand{\QMA}{{\rm QMA}}
\newcommand{\MQA}{{\rm MQA}}
\newcommand{\NP}{{\rm NP}}
\newcommand{\PP}{{\rm P}}
\newcommand{\PH}{{\rm PH}}
\newcommand{\BPP}{{\rm BPP}}
\newcommand{\BQP}{{\rm BQP}}

\newcommand{\complex}{{\mathbb C}}
\newcommand{\reals}{{\mathbb R}}
\newcommand{\ints}{{\mathbb Z}}
\newcommand{\nats}{{\mathbb N}}

\newcommand{\spa}[1]{\mathcal{#1}}
\newcommand{\dens}{\mathcal{D}(\spa{A}\otimes\spa{B})}

\newcommand{\LL}{\mathcal{L}}
\newcommand{\DD}{\mathcal{D}}
\newcommand{\HH}{\mathcal{H}}
\newcommand{\UU}{\mathcal{U}}

\mathchardef\mhyphen="2D

\newcommand{\ayes}{A_{\rm yes}} %CHECK
\newcommand{\ano}{A_{\rm no}} %CHECK

\bibliographystyle{alpha}

\begin{document}

\title{\vspace{-10mm}Introduction to Quantum Computation, UPB\\Summer 2021, Assignment 2\\{\large To be completed by: Friday, April 30}}
\date{}
\maketitle

\section{Exercises}
\begin{enumerate}
    \item %($4$ marks)
    Use the spectral decompositions of $X$ and $Z$ to prove that $HXH^\dagger=Z$. (Do not simply write out the matrices and multiply!) Why does this immediately also yield that $HZH^\dagger=X$?
    \item %($6$ marks)
    \begin{enumerate}
        \item %($2$ marks)
        Write out the 4-dimensional vector for $(\alpha\ket{0}+\beta\ket{1})\otimes(\gamma\ket{0}+\delta\ket{1})$.
        \item %($4$ marks)
        Let $\mathcal{B}_1=\set{\ket{\psi_1},\ket{\psi_2}}$ and $\mathcal{B}_2=\set{\ket{\phi_1},\ket{\phi_2}}$ be two orthonormal bases for $\complex^2$. Prove that
            \[
            \mathcal{B}_3 = \set{\ket{\psi_1}\otimes\ket{\phi_1},\ket{\psi_1}\otimes\ket{\phi_2},\ket{\psi_2}\otimes\ket{\phi_1},\ket{\psi_2}\otimes\ket{\phi_2}}
            \]
            is an orthonormal basis for $\complex^4$. In other words, show that for each $\ket{v}\in\mathcal{B}_3$, $\enorm{\ket{v}}=1$, and for all pairs of distinct $\ket{v},\ket{w}\in\mathcal{B}_3$, $\braket{v}{w}=0$.
    \end{enumerate}
    \item %($10$ marks)
            \begin{enumerate}
                %\item %($2$ marks)
                %Write out the $4\times 4$ matrix representing $Y\otimes Y$.
                \item %($2$ marks)
                Prove that $(Z\otimes Y)^\dagger=Z\otimes Y$. Do not write out any matrices explicitly; rather, you must use the properties of the tensor product, dagger, and $Y$.
                \item %($6$ marks)
                In class, we saw a quantum circuit which, given starting state $\ket{0}\otimes\ket{0}$, prepared the Bell state $\ket{\Phi^+}=\frac{1}{\sqrt{2}}(\ket{00}+\ket{11})$. In fact, that circuit is a change of basis matrix, mapping the standard basis $\ket{00},\ket{01},\ket{10},\ket{11}$ to the Bell basis $\ket{\Phi^+},\ket{\Psi^+},\ket{\Phi^-},\ket{\Psi^-}$.
                \begin{enumerate}
                    \item %($3$ marks)
                    Write down a quantum circuit which maps $\ket{\Phi^+}$ to $\ket{0}\otimes\ket{0}$. (Hint: Write out the circuit from class as a sequence of matrix operations. Then, recalling that the inverse of any unitary operation $U$ is given by $U^\dagger$, take the inverse of this entire sequence by taking the dagger.)
                    \item %($3$ marks)
                    Your circuit from 3(b)(i) is actually a change of basis which maps the Bell basis \emph{back} to the standard basis. To verify this, run your circuit from 3(b)(i) on input $\ket{\Psi^-}$ and check that the output is $\ket{1}\otimes\ket{1}$.
                \end{enumerate}
            \end{enumerate}
\end{enumerate}

\end{document}
