\documentclass[11pt]{exam}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage[]{amsthm} %lets us use \begin{proof}
\usepackage{amsmath,amsfonts}
\usepackage[]{amssymb} %gives us the character \varnothing
\usepackage[langfont=caps]{complexity}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage{tcolorbox}
\usepackage{physics}

\tcbuselibrary{breakable}
\tcbset{%any default parameters
  width=0.7\textwidth,
  halign=justify,
  center,
  breakable,
  colback=white    
}

\setstretch{1.5}

\title{QCS - DM1}
\author{Augustin LUCAS}
\date\today
%This information doesn't actually show up on your document unless you use the maketitle command below

\begin{document}
\maketitle %This command prints the title based on information entered above

%Section and subsection automatically number unless you put the asterisk next to them.
\section*{Q1}

\begin{tcolorbox}
A system $X$ is in:

\[v_0 = 
  \begin{pmatrix} \frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} \end{pmatrix} \;
  \text{ or }
  v_1 =
  \begin{pmatrix} \frac{1}{\sqrt{2}} \\ -\frac{1}{\sqrt{2}} \end{pmatrix} \;
\]
We want to know which is the case. Describe a sequence of operations that determines which is the case.
\end{tcolorbox}

Let $A = \begin{pmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{pmatrix}$

$A$ is a unitary matrix, with $Av_0 = \ket{0}$ and  $Av_1 = \ket{1}$

Apply the following sequence of operations:
\begin{itemize}
  \item Apply transformation $A$
  \item Perform measurement
\end{itemize}

This allows us to distinguish in which of both states was the system initially.

\section*{Q2}

\begin{tcolorbox}
Show that $w = \begin{pmatrix} \frac{1}{\sqrt{2}} \\ 0 \\ 0 \\ \frac{1}{\sqrt{2}} \end{pmatrix} \;$ is not of the form $v \otimes v'$
\end{tcolorbox}

Suppose that $w$ is of form $v \otimes v'$. Given such $v=\begin{pmatrix} a \\ b \end{pmatrix}, v'=\begin{pmatrix} c \\ d \end{pmatrix}$,
we have:

\[
v \otimes v' =
\begin{pmatrix} ac \\ ad \\ bc \\ bd \end{pmatrix}
\]

Then:
\left \{
\begin{array}{c @{=} c}
    ac & \frac{1}{\sqrt{2}} \\
    ad & 0 \\
    bc & 0 \\
    bd & \frac{1}{\sqrt{2}}
\end{array}
\right.


As $a=0$ or $d=0$, $ac=0$ or $bd=0$. Impossible !

As such, $w$ is not of form $v \otimes v'$

\end{document}
