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
Currently the only time-dependent operator type present in the library is TimeDependentSum, which is actually a lazy sum with time-dependent coefficients. While certainly useful, it might be a bit hard and unintuitive to use in code. My proposal is the following:
Write a macro that will create time-dependent operators in a convenient manner like A = @timedependent t -> (B * t + C * (1 - t)) ⊗ D(t - 2). It does approximately the following:
All +, *, ⊗ top-level calls are turned into lazy operators.
dense, sparse e. g. calls are left untouched
All other calls are checked for time-dependent operators like D(t - 2). If the call is a time-dependent operator, we create a CompositeTimeDependentOperator with t -> t - 2 as a time parameter. If it is an ordinary function, we treat it as a number (because in context of this macro we expect an operator or a number, nothing else)
Also maybe this architecture should support parameters other than time (e. g. magnetic field?).
Hope you find this idea useful.
The text was updated successfully, but these errors were encountered:
This is an interesting idea! I think it could be compatible with a SciMLOperators approach to time-dependent operators. Seems like a layer on top of all that? By the way, even as things are, it should be possible to make lazy sums and products of time-dependent operators and have them behave properly. They won't be AbstractTimeDependentOperators themselves, but they should respond to set_time! properly and work when used in schroedinger_dynamic and co.
You can't currently have LazyTensors of time-dependent stuff, however.
Currently the only time-dependent operator type present in the library is TimeDependentSum, which is actually a lazy sum with time-dependent coefficients. While certainly useful, it might be a bit hard and unintuitive to use in code. My proposal is the following:
A = @timedependent t -> (B * t + C * (1 - t)) ⊗ D(t - 2)
. It does approximately the following:+
,*
,⊗
top-level calls are turned into lazy operators.dense
,sparse
e. g. calls are left untouchedD(t - 2)
. If the call is a time-dependent operator, we create aCompositeTimeDependentOperator
witht -> t - 2
as a time parameter. If it is an ordinary function, we treat it as a number (because in context of this macro we expect an operator or a number, nothing else)Also maybe this architecture should support parameters other than time (e. g. magnetic field?).
Hope you find this idea useful.
The text was updated successfully, but these errors were encountered: