QuantumOptics.jl
QuantumOptics.jl copied to clipboard
Cache input to master derivative functions
In several of the master functions, e.g., dmaster_h!
, a cached copy of drho
is required as input:
dmaster_h!(drho, H, J, Jdagger, rates, rho, drho_cache)
Presumably, this is to improve performance of solvers such as timeevolution.master
. However, this feels excessive if we don't want to use the corresponding solver, and instead create an ODE problem directly with our density operators and dmaster_h!
. For example, it would be great if we could define an in-place method without the cache input, say
f!(drho, rho, p, t) = timeevolution.dmaster_h!(drho, H, J, Jdagger, rates, rho)
prob = ODEProblem(f!, rho0, (t0, t1))
This is a natural interface that I'm aiming for with all of the recent broadcasting work (#404, https://github.com/qojulia/QuantumOpticsBase.jl/pull/172). Do the QO maintainers have any comments or oppositions to defining such a method in QO.jl?