You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying some simple rabi oscillation with sum basis and found different behavior for schroedinger() and master().
If I understand what I am doing, the following script shows two identical plots (as printed value is true), but it does not.
using QuantumOptics
using Plots
spins = [1//2, 1//2]
bases = [SpinBasis(spin) for spin in spins]
rho0 =directsum(
diagonaloperator(SpinBasis(spins[1]), ComplexF64[1.0, 0.0]),
diagonaloperator(SpinBasis(spins[2]), ComplexF64[0.0, 0.0]),
)
psi0 =directsum(
Ket(SpinBasis(spins[1]), ComplexF64[1.0, 0.0]),
Ket(SpinBasis(spins[2])),
)
println(psi0⊗dagger(psi0) == rho0)
H = (spinup(bases[1]) ⊕Ket(bases[2])) ⊗dagger(Ket(bases[1]) ⊕spindown(bases[2]))
H =2π*(H + H')/2
tspan =range(0.0, 3.0, step=1e-2)
t_master, rho_master = timeevolution.master(tspan, rho0, H, [])
t_sch, rho_sch = timeevolution.schroedinger(tspan, rho0, H)
fig1 =plot()
fig2 =plot()
id_ops = [one(bases[ii]) for ii ineachindex(spins)]
for indx ineachindex(spins)
id_vec =zeros(length(spins))
id_vec[1] =1
id_vec =circshift(id_vec, indx -1)
plot!(fig1, tspan, real.(expect(directsum([id_vec[ii] * id_ops[ii] for ii ineachindex(spins)]...), rho_master)), label="Tr(ρ$indx) master",)
plot!(fig2, tspan, real.(expect(directsum([id_vec[ii] * id_ops[ii] for ii ineachindex(spins)]...), rho_sch)), label="Tr(ρ$indx) schroedinger",)
endplot!(fig1, tspan, real.(expect(directsum([id_ops[ii] for ii ineachindex(spins)]...), rho_master)), label="Tr(ρ) master",)
plot!(fig2, tspan, real.(expect(directsum([id_ops[ii] for ii ineachindex(spins)]...), rho_sch)), label="Tr(ρ) schroedinger",)
fig =plot(fig1, fig2, layout=(2, 1))
display(fig)
The text was updated successfully, but these errors were encountered:
When you supply a density matrix to schroedinger you are computing the action of the propagator exp(-itH) * rho, whereas master performs exp(-itH) * rho * exp(itH).
You should see the same results if you apply schroedinger to psi0 to get pure state outputs.
When you supply a density matrix to schroedinger you are computing the action of the propagator exp(-itH) * rho, whereas master performs exp(-itH) * rho * exp(itH).
You should see the same results if you apply schroedinger to psi0 to get pure state outputs.
Thank you. I guess it is not a sum basis thing then.
If I am interested in a coherent evolution of a mixed state , I should use master without the jump operators.
I was trying some simple rabi oscillation with sum basis and found different behavior for
schroedinger()
andmaster()
.If I understand what I am doing, the following script shows two identical plots (as printed value is
true
), but it does not.The text was updated successfully, but these errors were encountered: