\documentclass[11pt]{article}
\usepackage[colorlinks=true]{hyperref}
\usepackage{fullpage}
\usepackage{graphicx}
\input{Qcircuit}
\usepackage{pict2e}
\usepackage[percent]{overpic}
\usepackage{amsmath}
\usepackage{float}
\usepackage{amsfonts}
\usepackage{float}
\usepackage{tikz}
\usepackage[linesnumbered,lined]{algorithm2e}
\makeatletter
\renewcommand{\@algocf@capt@plain}{above}% formerly {bottom}
\makeatother
\usepackage{scrextend}
\usepackage{enumitem}
\setlist[enumerate]{listparindent=\parindent}
%\newcommand{\ket}[1]{|#1\rangle}
%\newcommand{\bra}[1]{\langle#1|}
\newcommand{\proj}[1]{|#1\rangle\!\langle#1|}
\newcommand{\braket}[2]{\langle{#1}|{#2}\rangle}
\newcommand{\ketbra}[2]{|#1\rangle\!\langle#2|}
\usepackage{cleveref}%[nameinlink]
\crefname{lemma}{Lemma}{Lemmas}
\crefname{proposition}{Proposition}{Propositions}
\crefname{definition}{Definition}{Definitions}
\crefname{theorem}{Theorem}{Theorems}
\crefname{conjecture}{Conjecture}{Conjectures}
\crefname{corollary}{Corollary}{Corollaries}
\crefname{section}{Section}{Sections}
\crefname{appendix}{Appendix}{Appendices}
\crefname{figure}{Fig.}{Figs.}
\crefname{equation}{Eq.}{Eqs.}
\crefname{table}{Table}{Tables}
\crefname{algocf}{Algorithm}{Algorithms}
\title{CS333 - Problem Set 10\\\small{Due: Wednesday, May 7nd before class}}
\author{}
\date{}
\parindent=.25in
\begin{document}
\maketitle
\vspace{-1cm}
See final page for hints.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{enumerate}
\item In class, we showed how to create a quantum error correcting code that protected against an error of the form $X$ on any of the three qubits. Show that this code also protects against any error that is a rotation about the $\hat{x}$ axis of the Bloch sphere. That is, an error of the form:
\begin{align}
X_\theta=\cos(\theta)I+i\sin(\theta)X=
\left(
\begin{array}{cc}
\cos(\theta)& i\sin(\theta)\\
i\sin(\theta)& \cos(\theta).
\end{array}
\right).
\end{align}
To do this, consider the error correcting circuit we looked at in class:
\begin{align}
\Qcircuit @C=1em @R=.7em @!R {
\ustick{A}& \ctrl{3} & \qw & \qw & \qw & \qw \\
\ustick{B}& \qw & \ctrl{2} & \ctrl{3} & \qw & \qw \\
\ustick{C}& \qw & \qw & \qw & \ctrl{2} & \qw \\
\lstick{\ket{0}}& \targ & \targ & \qw & \qw & \meter \\
\lstick{\ket{0}}& \qw & \qw & \targ & \targ & \meter \\
}
\end{align}
\begin{enumerate}
\item \textbf{[6 points]} Suppose that an error $X_\theta$ occurred on the qubit $A$ before running the error correction scheme. So the effective circuit with error is
\begin{align}
\Qcircuit @C=1em @R=.7em @!R {
\ustick{A}& \gate{X_\theta} & \ctrl{3} & \qw & \qw & \qw & \qw \\
\ustick{B}& \qw& \qw & \ctrl{2} & \ctrl{3} & \qw & \qw \\
\ustick{C}& \qw &\qw & \qw & \qw & \ctrl{2} & \qw \\
&\lstick{\ket{0}}& \targ & \targ & \qw & \qw & \meter \\
&\lstick{\ket{0}}& \qw & \qw & \targ & \targ & \meter \\
}
\end{align}
If the input state to the circuit in Eq. (19) is $a\ket{000}_{ABC}+b\ket{111}_{ABC}$, what are the possible measurement outcomes of the final two qubits, and what does the system collapse to in the case of each possible outcome? (Please analyze the circuit above, rather than using projective measurements.)
\item \textbf{[6 points]} Depending on the measurement outcome, what should you do to recover the state $a\ket{000}+b\ket{111}$ on system $ABC$?
\item \textbf{[6 points]} The calculation is similar if $X_\theta$ occurs on $B$ or $C$. What are the possible measurement outcomes in each case, and how should you correct the error based on the measurement outcome? (You do not need to do any calculations, just state what happens and what you should do, given the results of part a/b, and the analysis we did in class.)
\item \textbf{[6 points]} Explain why you don't have to know $\theta$ in order to correct the error. Why is the collapse helpful? What is going on here?
\end{enumerate}
{
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\item \textbf{[This problem has a fair amount of calculation. However, the end result is pretty cool - I think! Also it is good practice.]} In this problem, we consider the same bit flip code as before: $a\ket{0}+b\ket{1}$ is encoded as $a\ket{000}+b\ket{111}$, which we have seen is protected against $X$-rotations on a single qubit. We have so far only considered the case where exactly one qubit has been affected by a unitary error. A more realistic error model is that small rotations affect all of the qubits at any time step. Consider an error model where the error is the unitary $X_\theta$ from question 1 acting in parallel on all 3 qubits in the code:
\begin{align}
X_\theta^{\otimes 3}
\end{align}
\begin{enumerate}
\item \textbf{[6 points]} If the logical qubit is initially in the state $a\ket{000}+b\ket{111}$ for $a,b\in \mathbb{R}$, (this just makes the calculations simpler), what is the state of the logical qubit after this error has occurred? (That is, calculate $X_\theta^{\otimes 3}(a\ket{000}+b\ket{111})$. You can keep your answer undistributed if that is easier.)
\item \textbf{[6 points]} Consider the projective measurement:
\begin{align}
M=\{P_0=\proj{000}+\proj{111},P_1=\proj{100}+\proj{011},\nonumber\\
P_2=\proj{010}+\proj{101},P_3=\proj{001}+\proj{110}\}.
\end{align}
Use the projective measurement formalism (rather than the ancillas used above) to analyze the probability that $P_0$ and $P_1$ each occur, and how the state collapses in each case (the case of $P_2$ and $P_3$ will be similar to $P_1)$.
\item \textbf{[6 points]} If outcome $P_0$ occurs, what gate should you apply to ``fix'' the error, and what does the state become in this case? If outcome $P_1$ occurs, what gate should you apply to ``fix'' the error, and what does the state become in this case?
\item \textbf{[6 points]} Even though we don't get back our original state $a\ket{000}+b\ket{111},$
the states that we do recover are extremely close to $a\ket{000}+b\ket{111}$ when $\theta$ is small. To see this, consider a measurement $M=\{\ket{\phi_i}\}$ where $\ket{\phi_0}=a\ket{000}+b\ket{111}.$ If we measure a state $\ket{\psi}$ with the measurement $M$, the higher the probability of getting outcome $\ket{\phi_0}$, the closer $\ket{\psi}$ is to $\ket{\phi_0}$, and the harder it is to distinguish between $\ket{\psi}$ and $\ket{\phi_0}$. (We can't actually make this measurement without knowing what $a$ and $b$ are...so this is just a thought experiment to see how well the error correction works.) Calculate the probability that we get outcome $a\ket{000}+b\ket{111}$ if we were to measure each of the post-error-correction states (the states from part 2c). Use a Taylor expansion to get an expression for the probability in terms of the lowest power of $\theta$. (You can use the Mathematica function ``Series'' to do this expansion, or it is fun to do by hand if you like this sort of thing! Mathematica should be on any campus PC lab computer.)
\item \textbf{[6 points]} What is the success probability from the previous problem (still using a Taylor series expansion) if we average over the probability of getting outcome $P_0$, $P_1$, $P_2$ and $P_3.$ (Use the probabilities you found in 2b.)
\item \textbf{[6 points]} On the other hand, find the probability of getting outcome $a\ket{000}+b\ket{111}$ if no error correction had been performed after the error. Discuss.
\end{enumerate}
{
}
\end{enumerate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
{\Large{Hints!}}
\begin{enumerate}
\item
\begin{enumerate}
\item The state before the partial measurement is
\begin{align}
\cos(\theta)\left(a\ket{000}+b\ket{111}\right)\ket{00}+i\sin(\theta)\left(a\ket{100}+b\ket{011}\right)\ket{10}.
\end{align}
\end{enumerate}
\item
\begin{enumerate}
\item
\item Prob of $P_0$ is $\cos^6\theta+\sin^6\theta$, and state becomes
\begin{align}
\frac{(a\cos^3\theta-ib\sin^3\theta)\ket{000} +(b\cos^3\theta-ia\sin^3\theta)\ket{111}}{\sqrt{\cos^6\theta+\sin^6\theta}}.
\end{align}
Prob of $P_1$ is $\sin^2\theta\cos^2\theta$ and state becomes
\begin{align}
(ai\cos\theta-b\sin\theta)\ket{100}+(bi\cos\theta-a\sin\theta)\ket{011})
\end{align}
\item
\item Take the probabilities you found in part d, weighted by the corresponding probabilities you found in part b. (Don't forget a factor of 3 for the three outcomes $P_1$, $P_2$, $P_3$. You can assume they are all the same by symmetry!)
\end{enumerate}
\end{enumerate}
\end{document}