qojulia / QuantumOptics.jl

Library for the numerical simulation of closed as well as open quantum systems.
http://qojulia.org
Other
533 stars 104 forks source link

products for LazySum #334

Closed amilsted closed 1 week ago

amilsted commented 2 years ago

Is there a reason not to have LazySum operators support products, e.g.

x * (a + b + c) = (xa + xb + xc)

?

This way operators defined as LazySum(LazyTensor(my_operator)) would remain lazy under most operations.

One would also need to allow LazyTensor(operator_on_a_non_composite_basis) for this to work nicely.