-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ForwardDiff fails on (schroedinger_dynamic with) TimeDependentOperator #376
Comments
Hi Amit! Right, so the problem is indeed the type of the Actually, I'm a bit puzzled in this case, as you are not taking a derivative wrt. time. Perhaps you could post the stack trace? |
Hi Ash! I hope you're doing well and having fun! QuantumOptics.jl/src/schroedinger.jl Lines 123 to 124 in e593ae1
This would also happed if I would be taking a derivative wrt. time. Stack trace;
|
If I initially build the
|
Thanks. Is it really necessary to promote the times in |
|
I've added this solution #378 Maybe another solution could be propagating the |
derivative on
TimeDependentSum
fails;schroedinger_dynamic
promotestspan
andstate
toDual
when needed, thenTimeDependentSum
is called with aDual
and fails.Possible to call
_promote_time_and_state
here;QuantumOptics.jl/src/schroedinger.jl
Lines 57 to 60 in e593ae1
and then promote
H
asTimeDependentSum(op.coefficients, op.static_op; init_time=zero(promote_type(eltype(tspan), typeof(current_time(op)))))
Or somehow pass this to
schroedinger_dynamic_function
?The text was updated successfully, but these errors were encountered: