\documentclass{article}   

\usepackage[utf8]{inputenc} 
\usepackage{tikz} 
\usepackage{amsmath}
\usepackage{amssymb} 
\usepackage{cancel} 
\usepackage[spanish]{babel} 
\usepackage{comment} 
\usepackage{latexsym} 
\usepackage{graphicx} 

\graphicspath{{Figuras/}} 

\title{}
\author{}
\date{}

\addtolength{\textwidth}{5.6cm}
\addtolength{\hoffset}{-2.8cm}
\addtolength{\textheight}{6.4cm}
\addtolength{\voffset}{-3.5cm} 

\setlength{\parindent}{0em} 

\newcommand\K{\mathbb{K}}\newcommand\N{\mathbb{N}}\newcommand\Z{\mathbb{Z}}\newcommand\Q{\mathbb{Q}}\newcommand\R{\mathbb{R}}\newcommand\C{\mathbb{C}}

\begin{document}

\section*{Quantum Computing}

\subsection*{Exercises 1: Intro to Quantum Physics}

\bigskip

\textbf{1.} a) Show that the left and right states defined as:

$$|l\rangle=\frac{1}{\sqrt{2}}(|u\rangle+|d\rangle)$$
$$|r\rangle=\frac{1}{\sqrt{2}}(|u\rangle-|d\rangle)$$

\ \ \ are orthogonal:

\ \ \ b) Calculate the expectation values of $\sigma_x$ in the states $|d\rangle$ and $|l\rangle$, and of $\sigma_z$ in the state $|r\rangle$.

\medskip\color{gray}

a) We take their product, which in the braket notation reads as $\langle l|r\rangle$, and verify that it is $0$:

$$\langle l|r\rangle=\frac{1}{\sqrt{2}}(\langle u|+\langle d|)\cdot\frac{1}{\sqrt{2}}(|u\rangle-|d\rangle)=\frac{1}{2}\big( \langle u|u\rangle + \langle u|d\rangle + \langle d|u\rangle - \langle d|d\rangle \big)$$

Now, choosing the computational basis $| u\rangle = \begin{pmatrix}1\\0\end{pmatrix}\ ,\ | d\rangle = \begin{pmatrix}0\\1\end{pmatrix}$, we have:

$$\langle u|u\rangle = \begin{pmatrix}1 & 0\end{pmatrix}\cdot\begin{pmatrix}1\\0\end{pmatrix}=1\quad ,\quad \langle u|d\rangle = \begin{pmatrix}1 & 0\end{pmatrix}\cdot\begin{pmatrix}0\\1\end{pmatrix}=0$$

$$\langle d|u\rangle = \begin{pmatrix}0 & 1\end{pmatrix}\cdot\begin{pmatrix}1\\0\end{pmatrix}=0\quad ,\quad \langle d|d\rangle = \begin{pmatrix}0 & 1\end{pmatrix}\cdot\begin{pmatrix}0\\1\end{pmatrix}=1$$

b) We insert the Pauli matrices in the expression of the expected value for a general operator: $\langle\psi|A|\psi\rangle$

$$\langle d|\sigma_x|d\rangle=\begin{pmatrix}0 & 1\end{pmatrix}\begin{pmatrix}0 & 1\\1 & 0\end{pmatrix}\begin{pmatrix}0 \\ 1\end{pmatrix}=\begin{pmatrix}0 & 1\end{pmatrix}\begin{pmatrix}1 \\ 0\end{pmatrix}=0$$

$$\langle l|\sigma_x|l\rangle=\frac{1}{2}\begin{pmatrix}1 & 1\end{pmatrix}\begin{pmatrix}0 & 1\\1 & 0\end{pmatrix}\begin{pmatrix}1 \\ 1\end{pmatrix}=1$$

$$\langle r|\sigma_z|r\rangle=0$$

\medskip\color{black}

\textbf{2.} a) Normalise the state $$|\psi\rangle=(1-i)|u\rangle+2i|d\rangle.$$

\ \ \ b) For this (normalised) state, calculate the probability of getting both positive $(+1)$ and negative $(-1)$ spin eigenvalues by measuring $\sigma_z$.

\medskip\color{gray}

a) Normalisation means that taking the norm of the state, $|\psi\rangle$, the result is $1$, that is: $\sqrt{\langle\psi|\psi\rangle}=1$.

But taking the squared norm in this case is:

$$\langle\psi|\psi\rangle=(1-i)\cdot(1+i)+(2i)\cdot(-2i)=2+4=6$$

We should then choose the normalisation constant $N$ by which we will multiply the state $|\psi\rangle\rightarrow N\cdot|\psi\rangle$ such that the result is $1$:

$$\langle N\cdot\psi|N\cdot\psi\rangle=N^2\overbrace{\langle\psi|\psi\rangle}^{6}=1\Rightarrow N=\frac{1}{\sqrt{6}}$$

b) $P_\psi(+)=|\langle u|\psi\rangle|^2=\langle\psi|u\rangle^*\langle u|\psi\rangle=\frac{1}{3},$ and, since the state $\psi$ is normalised, we know that $P_\psi(-)=1-1/3=2/3=|\langle d|\psi\rangle|^2.$

\medskip\color{black}

\textbf{3.} [Nielsen \& Chuang Ex. 2.17] (Eigendecomposition of a Pauli matrix) Find the eigenvectors, eigenvalues and diagonal representations of $\sigma_y$.

\medskip\color{gray}

$$\sigma_y=\begin{pmatrix}0 & -i\\i & 0\end{pmatrix}\ ; \ det(\sigma_y-\lambda I)=\begin{vmatrix}-\lambda & -i\\ i & -\lambda\end{vmatrix}=\lambda^2+i^2=0\Rightarrow\lambda=\pm1$$

For the eigenvalue $-1$ we have:

$$\begin{pmatrix}1 & -i\\i & 1\end{pmatrix}\cdot \begin{pmatrix}a\\b \end{pmatrix}=\begin{pmatrix}0\\ 0\end{pmatrix}\Rightarrow \left\{\begin{array}{ll}a-ib=0 \\ ai+b=0\end{array}\right.$$

The eigenvector is therefore $v_-=\begin{pmatrix}a\\ib \end{pmatrix}.$ Choosing $a=b=1,$ we have $v_-=\begin{pmatrix}1\\i \end{pmatrix}.$

And in an analogous way for the positive eigenvalue $+1$:

$v_+=\begin{pmatrix}i\\1 \end{pmatrix}.$

\medskip\color{black}

% Mermin remark between A.29 and A.30
\textbf{4.} Show that the eigenvalues of hermitian matrices, $\mathbf{A}=\mathbf{A}^\dagger$, are real: $\lambda\in\R$.

\medskip\color{gray}



% We start recalling the eigenvalue equation for a general operator, $A$, its eigenvectors $|\psi\rangle$ and eigenvalues $a$:
% 
% $$\mathbf{A}|\psi\rangle=a|\psi\rangle$$
% 
% Making use of it in the calculation of an expected value, we get:
% 
% $$\langle\psi |\mathbf{A}|\psi\rangle=\langle\psi |a|\psi\rangle=a\cdot\langle\psi |\psi\rangle=a$$
% 
% Now we take the operator acting in the bra rather :
% 
% With another intermediate little result: $\langle\phi|\psi\rangle=\langle\psi|\phi\rangle^*$
% 
% Recall that both vectors (states) can be expanded in their bases:
% 
% $$|\psi\rangle=\sum_i^n\alpha_i|i\rangle\quad , \quad |\phi\rangle=\sum_j^n\beta_j|j\rangle$$
% 
% Then the inner products are, by definition:
% 
% $$\left.\begin{array}{ll}\langle\psi|\phi\rangle=\sum_i^n\beta^*_i\alpha_i \\ \langle\phi|\psi\rangle=\sum_i^n\beta_i\alpha_i^*\end{array}\right\}\Rightarrow\langle\phi|\psi\rangle=\langle\psi|\phi\rangle^*$$
% 
% $$\langle\phi|A^\dagger|\psi\rangle=\langle A\phi|\psi\rangle=\langle\psi|A\phi\rangle^*=\langle\psi|A|\phi\rangle^*$$

Consider the matrix element of the adjoint of the operator: $\langle\phi|A^\dagger|\psi\rangle$

The operator can either act on the ket (that is, from the left) or on the bra, in which case it is 'daggered': $$\langle\phi|A^\dagger|\psi\rangle=\langle A\phi|\psi\rangle$$

Now, we know that for any bra(c)ket we have: $\langle\phi|\psi\rangle=\langle\psi|\phi\rangle^*$ 

A fact that comes from the very definition of the inner product which is linear in the second argument and anti-linear in the first, see for instance Nielsen and Chuang eqs. (2.13) and (2.15)

Taking this remark into account: $$\langle\phi|A^\dagger|\psi\rangle=\langle A\phi|\psi\rangle=\langle\psi|A\phi\rangle^*=\langle\psi|A|\phi\rangle^*$$

Particularising for the case where $\phi=\psi$ and taking into account the eigenvalue equation, $\mathbf{A}|\psi\rangle=a|\psi\rangle,$ we retrieve the eigenvalues of the operator:

$$\langle\psi |\mathbf{A}|\psi\rangle=\langle\psi |a|\psi\rangle=a\cdot\langle\psi |\psi\rangle=a$$

Last, by assumption, we have $A^\dagger=A,$ so:

$$\langle\psi|A^\dagger|\psi\rangle=\langle\psi|A|\psi\rangle=\langle\psi|A|\psi\rangle^*\Rightarrow a=a^*$$

\medskip\color{black}

% Susskind and Friedman 5.4, 5.7
% Nielsen a Chuang Thm 
\textbf{5.} [Susskind \& Friedman Ex. 5.2] For any observables $\mathbf{A}$ and $\mathbf{B}$, and state $|\psi\rangle$, derive Heisenberg's uncertainty relation: $\Delta\mathbf{A}\cdot\Delta\mathbf{B}\geq\frac{1}{2}|\langle\psi|[A,B]|\psi\rangle|$, where $(\Delta\mathbf{A})^2=\sum_a(a-\langle\mathbf{A}\rangle)^2P(a)$, is the standard deviation of the operator $\mathbf{A}.$

\medskip\color{gray}

% Cauchy-Schwartz: $$2|X||Y|\geq |\langle X|Y\rangle+\langle Y|X\rangle|$$
% 
% $$\langle\psi|A|\psi\rangle=\langle A\rangle_\psi=\langle A\rangle=\sum_a aP(a)$$
% 
% $$\bar{A}=A-\langle A\rangle\cdot I\ ;\ \bar{a}=a-\langle A\rangle$$
% 
% $$(\Delta A)^2=\sum_a \bar{a}P(a)$$
% 
% Susskind 5.4 $\rightarrow$ 5.7
% 
% $$\Delta A^2=\langle\bar{A}^2\rangle$$
% 
% $$[\bar{A},\bar{B}]=[A,B]$$

Following the reasoning in Susskind 5.4 $\rightarrow$ 5.7, we first prove that $(\Delta\mathbf{A})=\langle\mathbf{\bar{A}}^2\rangle:$

$$(\Delta\mathbf{A})^2=\sum_a(a-\langle\mathbf{A}\rangle)^2P(a)=\sum_a(a-\langle\mathbf{A}\rangle)^2|\langle a|\psi\rangle|^2=\sum_a(a-\langle\mathbf{A}\rangle)^2\langle a|\psi\rangle^*\langle a|\psi\rangle=\sum_a(a-\langle\mathbf{A}\rangle)^2\langle\psi|a\rangle\langle a|\psi\rangle=$$

$$=\langle\psi|\underbrace{\sum_a(a-\langle\mathbf{A}\rangle)^2|a\rangle\langle a|}_{(\mathbf{A}-\langle\mathbf{A}\rangle)^2}\psi\rangle=\langle\mathbf{\bar{A}}^2\rangle$$

Where the last claim in the brace can be shown using the completeness relation: $\mathbf{A}=\sum_a a|a\rangle\langle a|:$

$$(\mathbf{A}-\langle\mathbf{A}\rangle)^2=(\sum_a a -\langle\mathbf{A}\rangle|a\rangle\langle a|)(\sum_\alpha \alpha -\langle\mathbf{A}\rangle|\alpha\rangle\langle\alpha|)=\sum_{a,b}(a -\langle\mathbf{A}\rangle)(\alpha -\langle\mathbf{A}\rangle)|a\rangle\underbrace{\langle a|\alpha\rangle}_{\delta_{a\alpha}}\langle\alpha|=\sum_a (a -\langle\mathbf{A}\rangle)^2|a\rangle\langle a|$$

Secondly, we prove $[\mathbf{\bar{A}},\mathbf{\bar{B}}]=[\mathbf{A},\mathbf{B}],$ by computing explicitly the commutator:

$$[\mathbf{\bar{A}},\mathbf{\bar{B}}]=(\mathbf{A}-\langle\mathbf{A}\rangle)(\mathbf{B}-\langle\mathbf{B}\rangle)-(\mathbf{B}-\langle\mathbf{B}\rangle)(\mathbf{A}-\langle\mathbf{A}\rangle)=\mathbf{A}\mathbf{B}-\mathbf{A}\langle\mathbf{B}\rangle-\langle\mathbf{A}\rangle\mathbf{B}+\langle\mathbf{A}\rangle\langle\mathbf{B}\rangle-\mathbf{B}\mathbf{A}+\mathbf{B}\langle\mathbf{A}\rangle+\langle\mathbf{B}\rangle-\langle\mathbf{A}\rangle\langle\mathbf{B}\rangle$$

Since expected values are just scalars, they commute with operators, and many cancelations take place, giving the result.

Last, by using Cauchy-Schwarz inequality $2|X||Y|\geq |\langle X|Y\rangle+\langle Y|X\rangle|$ and defining the states: $|X\rangle=\mathbf{\bar{A}}|\Psi\rangle\ ,\ |Y\rangle=i\mathbf{\bar{B}}|\Psi\rangle$, one obtains the result wanted by following equations (5.11)$\rightarrow$(5.13) in Susskind.

\medskip\color{black}

\textbf{6.} Derive the evolution operator: $U(t)=e^{-\frac{i}{\hbar}Ht}$, by solving the Schrödinger equation: $i\hbar\frac{d|\psi(t)\rangle}{dt}=H|\psi(t)\rangle.$

\medskip\color{gray}

The Schrödinger equation $,i\hbar\psi'=H\psi,$ is a first order linear homogenous ODE. Its solution is then given by:

$$\int\frac{\psi'}{\psi}dt=-\int\frac{i}{\hbar}Hdt\rightarrow \log\psi=-\frac{i}{\hbar}Ht+k\rightarrow\psi(t)=e^{-\frac{i}{\hbar}Ht+k}$$

The constant $k$ in the last term gives us the initial state of the system, $|\psi(0)\rangle.$ The evolution between this state and any other in time $|\psi(t)\rangle,$ is given by:

$$|\psi(t)\rangle=e^{-\frac{i}{\hbar}Ht}|\psi(0)\iff |\psi(t)\rangle=U(t)|\psi(0)\rangle$$




\end{document}


