Problem 1.
If
and we consider the state:
. Evaluate the correlation measure.
Solution. This is a fairly straightfoward calculation that can be done by hand. The correlation is 0.
xxxxxxxxxx
1
1
begin
2
using SymPy
3
end
x
1
begin
2
⋅(X,Y) = X * Y
3
⋅(X::Array{T,1},Y::Array{T,1}) where T<:SymPy.Sym = X[1] ⋅ Y[1]
4
halfsqrt = 1/sympy.sqrt(2)
5
end;
x
1
begin
2
ψ = halfsqrt ⋅ [1;
3
0;
4
0;
5
1];
6
ψ′ = ψ.adjoint()
7
end;
xxxxxxxxxx
1
10
1
begin
2
X = [0 0 0 1;
3
0 0 1 0;
4
0 1 0 0;
5
1 0 0 0]
6
Y = [1 0 0 0;
7
0 0 0 1;
8
0 0 1 0;
9
0 1 0 0]
10
end;
x
1
cor = (ψ′ ⋅ X ⋅ ψ) ⋅ (ψ′ ⋅ Y ⋅ ψ) .- (ψ′ ⋅ (X ⋅ Y) ⋅ ψ)' ;