Skip to content

Commit

Permalink
Update schroedinger.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitRotem authored Dec 28, 2023
1 parent 0ae999f commit 52e0dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schroedinger.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function schroedinger_dynamic(tspan, psi0::T, H::AbstractTimeDependentOperator;
kwargs...) where {B,Bp,T<:Union{AbstractOperator{B,Bp},StateVector{B}}}
promoted_tspan, psi0 = _promote_time_and_state(psi0, H, tspan)
if promoted_tspan !== tspan # promote H
promoted_H = TimeDependentSum(H.coefficients, H.static_op.operators; init_time=zero(promote_type(eltype(promoted_tspan), typeof(current_time(H)))))
promoted_H = TimeDependentSum(H.coefficients, H.static_op.operators; init_time=first(promoted_tspan))
return schroedinger_dynamic(promoted_tspan, psi0, schroedinger_dynamic_function(promoted_H); kwargs...)
else
return schroedinger_dynamic(promoted_tspan, psi0, schroedinger_dynamic_function(H); kwargs...)
Expand Down

0 comments on commit 52e0dc7

Please sign in to comment.