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 24, 2023
1 parent 587d598 commit 0ae999f
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 = schroedinger_dynamic_function( 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=zero(promote_type(eltype(promoted_tspan), typeof(current_time(H)))))
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 0ae999f

Please sign in to comment.