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
Thanks for pointing that out. Seems like we simply missed that. I will add the function asap. In the meantime you can just add the following function which I quickly drafted to make things work:
using QuantumOptics
import Base.*function*(a::SuperOperator, b::SparseOperator)
QuantumOptics.superoperators.check_multiplicable(a, b)
data = a.data*reshape(b.data, length(b.data))
SparseOperator(a.basis_l[1], a.basis_l[2], reshape(data, length(a.basis_l[1]), length(a.basis_l[2])))
end
A =GenericBasis(2)
so =spre(identityoperator(A))
ρ =basisstate(A,1) |> dm |> sparse
so * ρ
As a remark: please be aware that sparse-sparse multiplication in Julia is currently not that efficient. So if you are planning to use this product of a superoperator and an operator in a time-critical function it might be better to leave ρ dense.
I implemented the function as shown above. You can pull the latest master branch to use it (type Pkg.checkout("QuantumOptics") until a new release is drafted.
It seems like multiplication of sparse superoperators on sparse operators is not defined. For example,
results in
This seems strange!
Edit:
bases.multiplicable(so,ρ)
returnstrue
in this example as well.The text was updated successfully, but these errors were encountered: