|
41 | 41 |
|
42 | 42 | ## intrinsic liouvillian |
43 | 43 | _liouvillian(H::MT, Id::AbstractMatrix) where {MT<:Union{AbstractMatrix,AbstractSciMLOperator}} = |
44 | | - -1im * _spre(H, Id) + 1im * _spost(H', Id) # without extracting the prefactor -1im seems to be better for AbstractSciMLOperator |
| 44 | + -1im * (_spre(H, Id) - _spost(H', Id)) |
45 | 45 | _liouvillian(H::MatrixOperator, Id::AbstractMatrix) = MatrixOperator(_liouvillian(H.A, Id)) |
46 | 46 | _liouvillian(H::AddedOperator, Id::AbstractMatrix) = AddedOperator(map(op -> _liouvillian(op, Id), H.ops)) |
47 | 47 |
|
@@ -178,19 +178,4 @@ liouvillian(H::AbstractQuantumObject{Operator}, Id_cache::Diagonal = I(prod(H.di |
178 | 178 |
|
179 | 179 | liouvillian(H::AbstractQuantumObject{SuperOperator}, Id_cache::Diagonal) = H |
180 | 180 |
|
181 | | -function _sum_lindblad_dissipators(c_ops, Id_cache::Diagonal) |
182 | | - D = 0 |
183 | | - # sum all the (time-independent) c_ops first |
184 | | - c_ops_ti = filter(op -> isa(op, QuantumObject), c_ops) |
185 | | - if !isempty(c_ops_ti) |
186 | | - D += mapreduce(op -> lindblad_dissipator(op, Id_cache), +, c_ops_ti) |
187 | | - end |
188 | | - |
189 | | - # sum rest of the QobjEvo together |
190 | | - c_ops_td = filter(op -> isa(op, QuantumObjectEvolution), c_ops) |
191 | | - if !isempty(c_ops_td) |
192 | | - D += mapreduce(op -> lindblad_dissipator(op, Id_cache), +, c_ops_td) |
193 | | - end |
194 | | - |
195 | | - return D |
196 | | -end |
| 181 | +_sum_lindblad_dissipators(c_ops, Id_cache::Diagonal) = sum(op -> lindblad_dissipator(op, Id_cache), c_ops) |
0 commit comments