diff --git a/Project.toml b/Project.toml index e39f362d..b5b6272e 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "QuantumOptics" uuid = "6e0679c1-51ea-5a7c-ac74-d61b76210b0c" -version = "v0.8.6" +version = "v0.8.7" [deps] Arpack = "7d9fca2a-8960-54d3-9f78-7d1dccf2cb97" diff --git a/src/master.jl b/src/master.jl index 6cbedb39..332ebbaf 100644 --- a/src/master.jl +++ b/src/master.jl @@ -87,15 +87,15 @@ function master(tspan, rho0::T, H::AbstractOperator{B,B}, J::Vector; Hnh = copy(H) if isa(rates, Matrix) for i=1:length(J), j=1:length(J) - Hnh -= complex(eltype(H))(0.5im*rates[i,j])*Jdagger[i]*J[j] + Hnh -= complex(float(eltype(H)))(0.5im*rates[i,j])*Jdagger[i]*J[j] end elseif isa(rates, Vector) for i=1:length(J) - Hnh -= complex(eltype(H))(0.5im*rates[i])*Jdagger[i]*J[i] + Hnh -= complex(float(eltype(H)))(0.5im*rates[i])*Jdagger[i]*J[i] end else for i=1:length(J) - Hnh -= complex(eltype(H))(0.5im)*Jdagger[i]*J[i] + Hnh -= complex(float(eltype(H)))(0.5im)*Jdagger[i]*J[i] end end Hnhdagger = dagger(Hnh) diff --git a/src/mcwf.jl b/src/mcwf.jl index 71996bd5..0de7ed2d 100644 --- a/src/mcwf.jl +++ b/src/mcwf.jl @@ -106,11 +106,11 @@ function mcwf(tspan, psi0::T, H::AbstractOperator{B,B}, J::Vector; Hnh = copy(H) if isa(rates, Nothing) for i=1:length(J) - Hnh -= complex(eltype(H))(0.5im)*Jdagger[i]*J[i] + Hnh -= complex(float(eltype(H)))(0.5im)*Jdagger[i]*J[i] end else for i=1:length(J) - Hnh -= complex(eltype(H))(0.5im*rates[i])*Jdagger[i]*J[i] + Hnh -= complex(float(eltype(H)))(0.5im*rates[i])*Jdagger[i]*J[i] end end dmcwf_nh_(t, psi::T, dpsi::T) = dmcwf_nh(psi, Hnh, dpsi) diff --git a/src/stochastic_master.jl b/src/stochastic_master.jl index f5e481ea..3b96d372 100644 --- a/src/stochastic_master.jl +++ b/src/stochastic_master.jl @@ -54,15 +54,15 @@ function master(tspan, rho0::T, H::AbstractOperator{B,B}, Hnh = copy(H) if isa(rates, Matrix) for i=1:length(J), j=1:length(J) - Hnh -= complex(eltype(H))(0.5im*rates[i,j])*Jdagger[i]*J[j] + Hnh -= complex(float(eltype(H)))(0.5im*rates[i,j])*Jdagger[i]*J[j] end elseif isa(rates, Vector) for i=1:length(J) - Hnh -= complex(eltype(H))(0.5im*rates[i])*Jdagger[i]*J[i] + Hnh -= complex(float(eltype(H)))(0.5im*rates[i])*Jdagger[i]*J[i] end else for i=1:length(J) - Hnh -= complex(eltype(H))(0.5im)*Jdagger[i]*J[i] + Hnh -= complex(float(eltype(H)))(0.5im)*Jdagger[i]*J[i] end end Hnhdagger = dagger(Hnh)