Problem 3. Consider a set of vectors
Then
forms an orthonormal basis in . Then it follows that .
If we take
a Find the
given the with orthonormal basis and density matrix:
Do the same but consider Hilbert space
with orthonormal basis and density matrix:
Solution 3.
xxxxxxxxxx
begin
using SymPy
using Plots
pyplot()
end;
x
begin
𝑖,𝑒,π,ϕ = sympy.I, sympy.E, sympy.pi,sympy.symbols("ϕ",real=true)
halfsqrt = 1/sympy.sqrt(2)
𝚝𝚛(X) = sympy.trace(X)
dagger(X) = sympy.adjoint(X)
⋅(a::T,X) where T<:Number = a*X
⋅(X,Y) = sympy.MatMul(X,Y,evaluate=true)
end;
x
begin
𝐮₁ = halfsqrt ⋅ [1;
0;
1]
𝐮₂ = halfsqrt ⋅ [0;
1;
0]
𝐮₃ = halfsqrt ⋅ [1;
0;
-1]
ρ = 1/3⋅ ones(Sym,3,3)
end;
xxxxxxxxxx
"""
evaluate generalized probability measure. Gleason 1957
"""
function f(ρ::Array{Sym},𝐮ᵢ::Array{Sym})
ρᵢ = 𝐮ᵢ ⋅ dagger(𝐮ᵢ);
return 𝚝𝚛(ρ⋅ρᵢ)
end;
Evaluating the function
Now calculating the same for a Hilbert space of
x
begin
𝐯₁ = halfsqrt ⋅ [𝑒^(𝑖⋅ϕ);
0;
0;
𝑒^(𝑖⋅ϕ)]
𝐯₂ = halfsqrt ⋅ [𝑒^(𝑖⋅ϕ);
0;
0;
𝑒^(-𝑖⋅ϕ)];
𝐯₃ = halfsqrt ⋅ [0;
𝑒^(𝑖⋅ϕ);
𝑒^(𝑖⋅ϕ);
0];
𝐯₄ = halfsqrt ⋅ [0;
𝑒^(𝑖⋅ϕ);
𝑒^(-𝑖⋅ϕ);
0];
𝐩 = 1/4⋅ ones(Sym,4,4)
end;
Evaluating the function
Interestingly we see that in this orthonormal basis set there is a dependence on
x
ϕ⃗ = range(0,stop=pi,length=100);
x
begin
g = f(𝐩,𝐯₂).simplify();
plot(ϕ′->ϕ′,ϕ′->g(ϕ=>ϕ′),ϕ⃗,
xlabel="ϕ",ylabel="v₂(ϕ)",
size=(300,200),legend=false,
annotate=(pi/2,0.4,text("f(ρ,v₂)→v₂(ϕ)",10)),
xticks=([pi*i/4 for i=0:4],[π*i/4 for i=0:4]))
end