Add DM2 & DM3.typ

This commit is contained in:
augustin64 2024-09-27 09:26:24 +02:00
parent 1eefe32fe4
commit 9578811c14
3 changed files with 142 additions and 0 deletions

77
DM2.typ Normal file
View File

@ -0,0 +1,77 @@
#set page(
paper: "a4",
header: align(center)[
QCS - DM2 - Augustin LUCAS
],
)
== Q1
We want to *simplify* the following circuit:
#{
import "@preview/quill:0.4.0": *
quantum-circuit(
lstick($|v_0〉$), $H$, ctrl(1), $H$, [\ ],
lstick($|v_1〉$), $H$, targ(), $H$
)
}
The gates
#{
import "@preview/quill:0.4.0": *
quantum-circuit(
lstick($$), $H$, rstick($$), [\ ],
lstick($$), $H$, rstick($$)
)
}
correspond to the following matrice: $1/2 mat(H, H; H, -H;)$
And CNOT = $mat(1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 0, 1; 0, 0, 1, 0;)$
The circuit then corresponds to the following operation:
$A&=1/2 mat(1, 1, 1, 1; 1, -1, 1, -1; 1, 1, -1, -1; 1, -1, -1, 1)
mat(1, 0, 0, 0; 0, 1, 0, 0; 0, 0, 0, 1; 0, 0, 1, 0;)
1/2 mat(1, 1, 1, 1; 1, -1, 1, -1; 1, 1, -1, -1; 1, -1, -1, 1) \
&=1/4 mat(4, 0, 0, 0; 0, 0, 0, 4; 0, 0, 4, 0; 0, 4, 0, 0) \
&=mat(1, 0, 0, 0; 0, 0, 0, 1; 0, 0, 1, 0; 0, 1, 0, 0)$
Which gives $cases(
|00〉 => |00〉,
|01〉 => |11〉,
|10〉 => |10〉,
|11〉 => |01〉
)$ that corresponds to an *inversed CNOT* that we can denote:
#{
import "@preview/quill:0.4.0": *
quantum-circuit(
lstick($|v_0〉$), targ(), rstick($$), [\ ],
lstick($|v_1〉$), ctrl(-1), rstick($$)
)
}
== Q2
In the *classical case*, we need $2^(n-1)+1$ queries to determine if $f$ is constant.
Using only $2^n$ queries, all queries could have the same value with $f$ balanced.
In the *quantum version*, we may use the following circuit:
#{
import "@preview/quill:0.4.0": *
quantum-circuit(
lstick($|0〉$), $H$, mqgate($U_f$, n:4), $H$, meter(), setwire(2), rstick($$), [\ ],
lstick($|0〉$), $H$, targ(), $H$, meter(), setwire(2), rstick($$), [\ ],
lstick($...$), [\ ],
lstick($|1〉$), $H$, targ()
)
}

63
DM3.typ Normal file
View File

@ -0,0 +1,63 @@
#set page(
paper: "a4",
header: align(center)[
QCS - DM3 - Augustin LUCAS
],
)
#import "@preview/showybox:2.0.1": showybox
#import "@preview/physica:0.9.3": bra, ket
#showybox(
frame: (
border-color: blue.darken(50%),
title-color: blue.lighten(60%),
body-color: blue.lighten(80%)
),
title-style: (
color: black,
weight: "regular",
align: center
),
shadow: (
offset: 3pt,
),
title: "Assignment",
([
+ Starting from state $ket(Phi)= 1/sqrt(2)(ket(00)+ket(11))$, is it true that for any basis ($ket(v_0)$, ket(v_1)), Alice and Bob will get the same outcome ?
+ Show that, for the state $1/sqrt(2)(ket(01)-ket(10))$, the outcome of Alice and Bob are opposite in any basis ($ket(v_0), ket(v_1)$)
]),
)
+ Let $ket(v_0),ket(v_1)$ be a basis. $ket(v_0)=mat(alpha; beta)$, $ket(v_1)=mat(gamma;delta)$
The probability of getting the state $ket(v_0v_1)$ is given by:
$|(bra(v_0) times.circle bra(v_1))ket(Phi)|^2
&=1/2|bra(v_0v_1)ket(00)+bra(v_0v_1)ket(11)|^2
&=1/2|alpha gamma + beta delta|^2$
Then, the probability of getting this state is non-null iff $alpha gamma + beta delta eq.not 0$
$(ket(v_0), ket(v_1))$ being a base, we have $bra(v_0)ket(v_1) = overline(alpha) gamma + overline(beta) delta = 0$
Any solution of the following system then shows the possibility of a different outcome:
$cases(
alpha gamma = -beta delta,
overline(alpha) gamma eq.not -overline(beta) delta
)$
$ket(v_0)=1/sqrt(2)mat(1;i)$, $ket(v_1)=1/sqrt(2)mat(1;-i)$ is a solution to this system.
Then, it is not true that Alice and Bob will get the same outcome in any basis.
+ Let $(ket(v_0), ket(v_1))$ be a basis. $ket(v_0)=mat(alpha; beta)$, $ket(v_1)=mat(gamma;delta)$.
Let $ket(Phi)=1/sqrt(2)(ket(01)-ket(10))$
Let's compute the probability of Alice and Bob getting the same outcome $ket(v_0)$ from state $ket(Phi)$.
$|bra(v_0v_0)ket(Phi)|^2 &= |alpha beta - beta alpha|^2 = 0$
And similarly, $|bra(v_1v_1)ket(Phi)|^2 &= |gamma delta - delta gamma|^2 = 0$
Then, the outcome of Alice and Bob's measurements are opposite in any basis.

2
Makefile Normal file
View File

@ -0,0 +1,2 @@
clean:
rm -f *.aux *.log *.pdf