Entanglement, CNOT and Teleportation

Some Functions  and Definitions:

(* general pure state in polar coordinates *)
State[θ_,ϕ_]:={Cos[θ/2],Sin[θ/2]Exp[I ϕ]}
(*normalized state with real first argument *)
StateNorm[x_List]:=Module[{arg1=Arg[x[[1]]],arg2=Arg[x[[2]]],normx=x/Norm[x],θ,ϕ},
θ=2Chop@ArcCos[normx[[1]]Exp[-I arg1]];
ϕ=Mod[arg2-arg1,2π];
{Cos[θ/2],Sin[θ/2]Exp[I ϕ]}]
(* outputs the polar coordinate from a state vector *)
blochcoord[state_]:=Module[{arg1=Arg[state[[1]]],arg2=Arg[state[[2]]],normx=state/Norm[state],θ,ϕ},
θ=Abs[2Chop@ArcCos[normx[[1]]Exp[-I arg1]]];
ϕ=Abs@Mod[arg2-arg1,2π];
{θ,ϕ}]

(* define a bloch sphere graph *)
With[{r=1},xy=ParametricPlot3D[{r Cos[θ],r Sin[θ],0},{θ,0,2 π},PlotStyle->Dashed,Boxed->False,Axes->False];
yz=ParametricPlot3D[{0,r Cos[θ],r Sin[θ]},{θ,0,2 π},PlotStyle->Dashed,Boxed->False,Axes->False];
xz=ParametricPlot3D[{r Cos[θ],0,r Sin[θ]},{θ,0,2 π},PlotStyle->Dashed,Boxed->False,Axes->False];
bloch=Show[Graphics3D[{Green,Opacity[.25],Sphere[{0,0,0},r],Opacity[1],Black,Thick,Line[{{0,r,0},{0,-r,0}}],Line[{{0,0,r},{0,0,-r}}],Line[{{r,0,0},{-r,0,0}}],Text[Style["z+",FontSize->16,FontWeight->Bold,FontColor->GrayLevel[.3]],{0,0,1.3 r}],Text[Style["z-",FontSize->16,FontWeight->Bold,FontColor->GrayLevel[.3]],{0,0,-1.3 r}],Text[Style["x+",FontSize->16,FontWeight->Bold,FontColor->GrayLevel[.3]],{1.3 r,0,0}],Text[Style["x-",FontSize->16,FontWeight->Bold,FontColor->GrayLevel[.3]],{-1.3 r,0,0}],Text[Style["y+",FontSize->16,FontWeight->Bold,FontColor->GrayLevel[.3]],{0,1.3 r,0}],Text[Style["y-",FontSize->16,FontWeight->Bold,FontColor->GrayLevel[.3]],{0,-1.3 r,0}]}],xy,xz,yz,Boxed->False]];
(* generate vector for bloch sphere representation *)
Options[blochvec]={color->Blue};
blochvec[{θ_,ϕ_},OptionsPattern[]]:=Graphics3D[{OptionValue[color],Thickness[0.02],Line[{{0,0,0},{Sin[θ]Cos[ϕ],Sin[θ]Sin[ϕ],Cos[θ]}}]}]

(* draw vector for bloch sphere taking an arbitrary pure input state *)
blochvecstate[state_]:=blochvec@blochcoord[state]
(*bloch vector for mixed states *)
blochvecmsphere[r_,θ_,ϕ_]:=Graphics3D[{Blue,Thickness[0.02],Line[{{0,0,0},r{Sin[θ]Cos[ϕ],Sin[θ]Sin[ϕ],Cos[θ]}}]}]
blochvecmsphere[{r_,θ_,ϕ_}]:=blochvec[r,θ,ϕ]
(* cartesian coordinates *)
blochvecmcart[x_,y_,z_]:=Graphics3D[{Blue,Thickness[0.02],Line[{{0,0,0},{x,y,z}}]}]
blochvecmcart[{x_,y_,z_}]:=blochvecmcart[x,y,z]
(* show vector with sphere *)
vectoronsphere[vec_]:=Show[bloch,vec,SphericalRegion->True]
(* Bloch-sphere coordinates from arbitrary state *)
MatrixToBloch[x_]:={Tr[σx.x],Tr[σy.x],Tr[σz.x]}

id=(({{1, 0}, {0, 1}}));σx=(({{0, 1}, {1, 0}}));σy=(({{0, -I}, {I, 0}}));σz=(({{1, 0}, {0, -1}}));
tps[x_]:=Outer[Times,Conjugate[x],x]
tps[x_,y_]:=Outer[Times,Conjugate[x],y]
(* groundstate *) 
gs={1,0};
(* excited state *)
es={0,1};
(* superpositions state *)
xps={1,1}/(Sqrt[2]);
xms={1,-1}/(Sqrt[2]);
yps={1,I}/(Sqrt[2]);
yms={1,-I}/(Sqrt[2]);

Questions 2

Show that the order of unitary rotation matters, i.e. that R1.R2| ψ⟩ ≠R2.R1 | ψ⟩! For which R1, R2 does the order not matter? Can you think of examples for both situations?

Urot[α_,t_,θ_,ϕ_]:=(({{Cos[α t/2] - I Cos[θ]Sin[α t /2], -I Exp[-I ϕ] Sin[θ] Sin[α t/2]}, {(-I Exp[I ϕ]) Sin[θ] Sin[α t/2], Cos[α t/2] + I Cos[θ]Sin[α t /2]}}))

RX[α_]:=Urot[α,1,π/2,0]
RY[α_]:=Urot[α,1,π/2,π/2]
RZ[α_]:=Urot[α,1,0,0]

In general the order of operations matter :

(Subscript[RY, π/2])(Subscript[RX, π/2])(({{1}, {0}})):

GraphicsRow[{vectoronsphere@blochvecstate[{1,0}],vectoronsphere@blochvecstate[RX[π/2].{1,0}],vectoronsphere@blochvecstate[RY[π/2].RX[π/2].{1,0}]},ImageSize->800,AspectRatio->1/2,Spacings->-100]

(Subscript[RX, π/2])(Subscript[RY, π/2])(({{1}, {0}})):

GraphicsRow[{vectoronsphere@blochvecstate[{1,0}],vectoronsphere@blochvecstate[RY[π/2].{1,0}],vectoronsphere@blochvecstate[RX[π/2].RY[π/2].{1,0}]},ImageSize->800,AspectRatio->1/2,Spacings->-100]

If the rotation axis is same for both rotations the order does not matter.

Urot[α,1,θ1,ϕ1].Urot[α,1,θ2,ϕ2]==Urot[α,1,θ2,ϕ2].Urot[α,1,θ1,ϕ1]/.{θ1->θ2,ϕ1->ϕ2}//FullSimplify[#,Assumptions->{α∈Reals}]&

(Subscript[RX, π/5])(Subscript[RX, 2π/5])(({{1}, {0}}))=(Subscript[RX, 2π/5])(Subscript[RX, π/5])(({{1}, {0}}))

GraphicsRow[{vectoronsphere@blochvecstate[{1,0}],vectoronsphere@blochvecstate[RX[π/5].{1,0}],vectoronsphere@blochvecstate[RX[2π/5].RX[π/5].{1,0}]},ImageSize->800,AspectRatio->1/2,Spacings->-100]
GraphicsRow[{vectoronsphere@blochvecstate[{1,0}],vectoronsphere@blochvecstate[RX[2π/5].{1,0}],vectoronsphere@blochvecstate[RX[π/5].RX[2π/5].{1,0}]},ImageSize->800,AspectRatio->1/2,Spacings->-100]

Also, if one rotation is proportional to the identity the order does not matter.

JustPhase=(({{Exp[I π/5], 0}, {0, Exp[I π/5]}}));

Urot[α,1,θ1,ϕ1].JustPhase==JustPhase.Urot[α,1,θ1,ϕ1]

(Subscript[RX, π/5])(Subscript[RX, 2π/5])(({{1}, {0}}))=(Subscript[RX, 2π/5])(Subscript[RX, π/5])(({{1}, {0}}))

GraphicsRow[{vectoronsphere@blochvecstate[{1,0}],vectoronsphere@blochvecstate[RX[π/5].{1,0}],vectoronsphere@blochvecstate[JustPhase.RX[π/5].{1,0}]},ImageSize->800,AspectRatio->1/2,Spacings->-100]
GraphicsRow[{vectoronsphere@blochvecstate[{1,0}],vectoronsphere@blochvecstate[RX[π/5].{1,0}],vectoronsphere@blochvecstate[RX[π/5].JustPhase.{1,0}]},ImageSize->800,AspectRatio->1/2,Spacings->-100]

How many measurements are needed get full information about a mixed qubit state? Can you think of a set of proper measurements?

(Entangled) Multi-Qubit states

Define a Tensor Product

TensorProduct[a_,b_]:=Table[(*a,b are nxn and mxm-martices*)a[[Ceiling[s/Length[b]],Ceiling[t/Length[b]]]]*b[[s-Floor[(s-1)/Length[b]]*Length[b],t-Floor[(t-1)/Length[b]]*Length[b]]],{s,1,Length[a]*Length[b]},{t,1,Length[a]*Length[b]}]

Basis vectors :

(({{1}, {0}, {0}, {0}}))=|00>,(({{0}, {1}, {0}, {0}}))=|01>,(({{0}, {0}, {1}, {0}}))=|10>,(({{0}, {0}, {0}, {1}}))=|11>

gg={1,0,0,0};ge={0,1,0,0};eg={0,0,1,0};ee={0,0,0,1};

CNOT-Gate Realization

CNOT=(({{1, 0, 0, 0}, {0, 1, 0, 0}, {0, 0, 0, 1}, {0, 0, 1, 0}}));

ZZ=TensorProduct[σz,σz];
RX1[α_]:=TensorProduct[Urot[α,1,π/2,0],(({{1, 0}, {0, 1}}))]
RY1[α_]:=TensorProduct[Urot[α,1,π/2,π/2],(({{1, 0}, {0, 1}}))]
RZ1[α_]:=TensorProduct[Urot[α,1,0,0],(({{1, 0}, {0, 1}}))]
RX2[α_]:=TensorProduct[(({{1, 0}, {0, 1}})),Urot[α,1,π/2,0]]
RY2[α_]:=TensorProduct[(({{1, 0}, {0, 1}})),Urot[α,1,π/2,π/2]]
RZ2[α_]:=TensorProduct[(({{1, 0}, {0, 1}})),Urot[α,1,0,0]]

UZZ[α_]=MatrixExp[-I α ZZ];
UZZ[α]//MatrixForm

for t = π/(4 J) we obtain a phase shift gate

UZZ[π/4]//MatrixForm

when we additionally apply Z - rotations on the single qubits

RZ2[ϕ2].RZ1[ϕ1]//TrigToExp

RZ2[-π/2].RZ1[-π/2].UZZ[π/4]//MatrixForm

to finally obtain the phase gate

PG=-I (E^(I π/4))RZ2[-π/2].RZ1[-π/2].UZZ[π/4];
PG//MatrixForm

Its action on the states is given by

MatrixForm/@{PG.gg,PG.ge,PG.eg,PG.ee}

From this we can construct a CNOT gate: PG is equivalent to the CNOT gate up to a basis change of the target qubit and a phase shift on the control qubit

RY2[-π/2].PG.RY2[π/2]//MatrixForm

A phase shift is missing :

MatrixForm/@(RY2[-π/2].PG.RY2[π/2].#&/@{gg,ge,eg,ee})

I RZ1[π].RY2[-π/2].PG.RY2[π/2]//MatrixForm

Another version (from the lecture) :

RX2[3π/2].
UZZ[J,3π/(4J)].
RZ2[π/2].RX2[π/2].RZ2[π/2].RZ1[π/2].UZZ[J,3π/(4J)]/(1-I)(Sqrt[2])//TrigToExp

Beamsplitter

In operator notation of the path eigenstates :

BS=1/(Sqrt[2])(({{I, 1}, {1, I}}))

BS.(({{0}, {1}}))

BS.(({{1}, {0}}))
BS.(({{0}, {1}}))

For 2 particles :

Beamsplitter matrix

BS2=TensorProduct[BS,BS]

BS2.BS2\[ConjugateTranspose]//MatrixForm

Different input states :

Both photons incident from the left

BS2.gg

yields equal probabilities in the output ports

{((Abs[gg.BS2.gg])^2),((Abs[eg.BS2.gg])^2),((Abs[eg.BS2.gg])^2),((Abs[ee.BS2.gg])^2)}

One photon from the left and one from the right

symstate=(1/(Sqrt[2]))(eg+ge)
antisymstate=(1/(Sqrt[2]))(eg-ge)

yields either both photons in the upper or both in the right output port if in the symmetric state

{((Abs[gg.BS2.symstate])^2),((Abs[eg.BS2.symstate])^2),((Abs[eg.BS2.symstate])^2),((Abs[ee.BS2.symstate])^2)}

or either one in the upper and one in the right output port if initially in  the anti-symmetric state (fermions)

{((Abs[gg.BS2.antisymstate])^2),((Abs[eg.BS2.antisymstate])^2),((Abs[eg.BS2.antisymstate])^2),((Abs[ee.BS2.antisymstate])^2)}

Measurement operator for measuring (anti-)coincidences:

anticoinc=tps[{1,0,0,0}]+tps[{0,0,0,1}]
coinc=tps[{0,1,0,0}]+tps[{0,0,1,0}]

gg - input state

((Norm[coinc.BS2.gg])^2)

symmetric input state shows bunching, i.e. no coincidence counts

((Norm[coinc.BS2.symstate])^2)
((Norm[anticoinc.BS2.symstate])^2)

antisymmetric - input state shows anti-bunching, i.e. only coincidence counts

((Norm[coinc.BS2.antisymstate])^2)
((Norm[anticoinc.BS2.antisymstate])^2)

Teleportation

Antisymmetric Bell state |((Subscript[Ψ, 23])^(⟩-)) and state  |(Subscript[Ψ, 1])⟩  to be teleported :

Psi23m=(1/(Sqrt[2]))(eg-ge)
Psi1=a gs+b es

Tensor Product state |(SuperMinus[(Subscript[Ψ, 123])])⟩:

Psi123m=Flatten@Outer[Times,Psi1,(1/(Sqrt[2]))(eg-ge)]

Basis vectors :

(({{1}, {0}, {0}, {0}, {0}, {0}, {0}, {0}}))=|000>,(({{0}, {1}, {0}, {0}, {0}, {0}, {0}, {0}}))=|001>,(({{0}, {0}, {1}, {0}, {0}, {0}, {0}, {0}}))=|010>,(({{0}, {0}, {0}, {1}, {0}, {0}, {0}, {0}}))=|011>,(({{0}, {0}, {0}, {0}, {1}, {0}, {0}, {0}}))=|100>,(({{0}, {0}, {0}, {0}, {0}, {1}, {0}, {0}}))=|101>,(({{0}, {0}, {0}, {0}, {0}, {0}, {1}, {0}}))=|110>,(({{0}, {0}, {0}, {0}, {0}, {0}, {0}, {1}}))=|111>

basisstring={"ggg","gge","geg","gee","egg","ege","eeg","eee"}
basis=Table[RotateRight[{1,0,0,0,0,0,0,0},j],{j,0,7}]

MatrixForm/@basis

Projector onto |(SuperMinus[(Subscript[Ψ, 12])])⟩

tps[(1/(Sqrt[2]))(ge-eg)]

Include also Hilbert space of particle 3 :

Ppsi12m=TensorProduct[tps[(1/(Sqrt[2]))(ge-eg)],(({{1, 0}, {0, 1}}))]

Make a Bell-measurement of  |(SuperMinus[(Subscript[Ψ, 12])])⟩⟨ (SuperMinus[(Subscript[Ψ, 12])])| on the state|(SuperMinus[(Subscript[Ψ, 123])])⟩ :

psiproj=FullSimplify[((Ppsi12m.Psi123m)/(Sqrt[Psi123m\[Conjugate].Ppsi12m.Psi123m])),Assumptions->{a∈Reals,b∈Reals}]/.(b^2)->(1-(a^2))
basisstring

psiproj.basisstring//Simplify

Decomposing the state  again into a tensorproduct is a bit intuitive :

(psiproj.#)&/@basis[[{2,4,6,8}]]
(psiproj.#)&/@basis[[{1,3,5,7}]]

i.e. the state can be written as (SuperMinus[(Subscript[Ψ, 12])])⊗(a |g⟩+b|e⟩)

Questions 3

Construct another CNOT gate with the target qubit now being qubit 1 and the qubit 2 serving as the control qubit. Write down the matrix form of the gate and then reconstruct it from single qubit gates and the ZZ-interaction gate used above. Using these two CNOT gates ((Subscript[CNOT, 12]) and (Subscript[CNOT, 21])) can you find a gate which transfers the information from qubit 1 to qubit 2 (SWAP gate)?

What happens to the state of the qubit 1? Is there still some information about the initial state after the teleportation?

© Stefan Filipp, 11/2008