Chapter 8 - Density Matrix
from numpy import sqrt
from qutip import *H = Qobj([[1],[0]])
V = Qobj([[0],[1]])Example 8.A.1:¶
psi = 1/sqrt(2)*tensor(H,H) + 1/sqrt(2)*tensor(V,V)
psiLoading...
rho_ent = psi*psi.dag()(rho_ent*rho_ent).tr()0.9999999999999996rho_mix = 0.5*tensor(H,H)*tensor(H,H).dag() + 0.5*tensor(V,V)*tensor(V,V).dag()(rho_mix*rho_mix).tr()0.5Example 8.A.2¶
Remember the 45 states:
P45 = Qobj([[1/sqrt(2)],[1/sqrt(2)]])
M45 = Qobj([[1/sqrt(2)],[-1/sqrt(2)]])Create the projection operator for
Proj_4545 = tensor(P45,P45)*tensor(P45,P45).dag()(Proj_4545*rho_mix).tr()(0.2499999999999999+0j)Create projection operator for
Proj_45i = tensor(qeye(2),P45)*tensor(qeye(2),P45).dag()(Proj_45i*rho_mix).tr()(0.4999999999999999+0j)0.25/0.50.5Extend the example for the pure (superposition) state¶
(Proj_4545*rho_ent).tr() / (Proj_45i*rho_ent).tr()(0.9999999999999998+0j)The photons are entanlged and therefore show perfect correlation even in the +45 measurements.