File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,14 @@ function steadystate(
9595 (H. dims != ψ0. dims) && throw (DimensionMismatch (" The two quantum objects are not of the same Hilbert dimension." ))
9696
9797 N = prod (H. dims)
98- u0 = mat2vec (ket2dm (ψ0). data)
98+ u0 = _convert_u0 (mat2vec (ket2dm (ψ0). data))
99+
100+ Ftype = real (eltype (u0))
101+ Tspan = (convert (Ftype, 0 ), convert (Ftype, tspan))
102+
99103 L = MatrixOperator (liouvillian (H, c_ops). data)
100104
101- prob = ODEProblem {true} (L, u0, ( 0.0 , tspan) )
105+ prob = ODEProblem {true} (L, u0, Tspan )
102106 sol = solve (
103107 prob,
104108 solver. alg;
@@ -109,7 +113,6 @@ function steadystate(
109113 )
110114
111115 ρss = reshape (sol. u[end ], N, N)
112- ρss = (ρss + ρss' ) / 2 # Hermitianize
113116 return QuantumObject (ρss, Operator, H. dims)
114117end
115118
You can’t perform that action at this time.
0 commit comments