@@ -147,19 +147,19 @@ function _periodicsave_func(integrator)
147147 return u_modified! (integrator, false )
148148end
149149
150- _save_control_lr_mesolve (u, t, integrator) = t in integrator. p. t_l
150+ _save_control_lr_mesolve (u, t, integrator) = t in integrator. p. times
151151
152152function _save_affect_lr_mesolve! (integrator)
153153 ip = integrator. p
154154 N, M = ip. N, ip. M
155- idx = select (integrator. t, ip. t_l )
155+ idx = select (integrator. t, ip. times )
156156
157157 @views z = reshape (integrator. u[1 : N* M], N, M)
158158 @views B = reshape (integrator. u[N* M+ 1 : end ], M, M)
159159 _calculate_expectation! (ip, z, B, idx)
160160
161161 if integrator. p. opt. progress
162- print (" \r Progress: $(round (Int, 100 * idx/ length (ip. t_l ))) %" )
162+ print (" \r Progress: $(round (Int, 100 * idx/ length (ip. times ))) %" )
163163 flush (stdout )
164164 end
165165 return u_modified! (integrator, false )
365365#= ======================================================#
366366
367367@doc raw """
368- lr_mesolveProblem(H, z, B, t_l , c_ops; e_ops=(), f_ops=(), opt=LRMesolveOptions(), kwargs...) where T
368+ lr_mesolveProblem(H, z, B, tlist , c_ops; e_ops=(), f_ops=(), opt=LRMesolveOptions(), kwargs...) where T
369369 Formulates the ODEproblem for the low-rank time evolution of the system. The function is called by lr_mesolve.
370370
371371 Parameters
376376 The initial z matrix.
377377 B : AbstractMatrix{T}
378378 The initial B matrix.
379- t_l : AbstractVector{T}
379+ tlist : AbstractVector{T}
380380 The time steps at which the expectation values and function values are calculated.
381381 c_ops : AbstractVector{QuantumObject}
382382 The jump operators of the system.
@@ -393,7 +393,7 @@ function lr_mesolveProblem(
393393 H:: QuantumObject{<:AbstractArray{T1},OperatorQuantumObject} ,
394394 z:: AbstractArray{T2,2} ,
395395 B:: AbstractArray{T2,2} ,
396- t_l :: AbstractVector ,
396+ tlist :: AbstractVector ,
397397 c_ops:: AbstractVector = [];
398398 e_ops:: Tuple = (),
399399 f_ops:: Tuple = (),
@@ -407,6 +407,8 @@ function lr_mesolveProblem(
407407 c_ops = get_data .(c_ops)
408408 e_ops = get_data .(e_ops)
409409
410+ t_l = convert (Vector{_FType (H)}, tlist)
411+
410412 # Initialization of Arrays
411413 expvals = Array {ComplexF64} (undef, length (e_ops), length (t_l))
412414 funvals = Array {ComplexF64} (undef, length (f_ops), length (t_l))
@@ -421,7 +423,7 @@ function lr_mesolveProblem(
421423 e_ops = e_ops,
422424 f_ops = f_ops,
423425 opt = opt,
424- t_l = t_l,
426+ times = t_l,
425427 expvals = expvals,
426428 funvals = funvals,
427429 Ml = Ml,
@@ -489,14 +491,14 @@ function lr_mesolve(
489491 H:: QuantumObject{<:AbstractArray{T1},OperatorQuantumObject} ,
490492 z:: AbstractArray{T2,2} ,
491493 B:: AbstractArray{T2,2} ,
492- t_l :: AbstractVector ,
494+ tlist :: AbstractVector ,
493495 c_ops:: AbstractVector = [];
494496 e_ops:: Tuple = (),
495497 f_ops:: Tuple = (),
496498 opt:: LRMesolveOptions{AlgType} = LRMesolveOptions (),
497499 kwargs... ,
498500) where {T1,T2,AlgType<: OrdinaryDiffEqAlgorithm }
499- prob = lr_mesolveProblem (H, z, B, t_l , c_ops; e_ops = e_ops, f_ops = f_ops, opt = opt, kwargs... )
501+ prob = lr_mesolveProblem (H, z, B, tlist , c_ops; e_ops = e_ops, f_ops = f_ops, opt = opt, kwargs... )
500502 return lr_mesolve (prob; kwargs... )
501503end
502504
@@ -520,7 +522,7 @@ get_B(u::AbstractArray{T}, N::Integer, M::Integer) where {T} = reshape(view(u, (
520522 Additional keyword arguments for the ODEProblem.
521523"""
522524function lr_mesolve (prob:: ODEProblem ; kwargs... )
523- sol = solve (prob, prob. p. opt. alg, tstops = prob. p. t_l )
525+ sol = solve (prob, prob. p. opt. alg, tstops = prob. p. times )
524526 prob. p. opt. progress && print (" \n " )
525527
526528 N = prob. p. N
@@ -535,5 +537,5 @@ function lr_mesolve(prob::ODEProblem; kwargs...)
535537 zt = get_z (sol. u, N, Ml)
536538 end
537539
538- return LRTimeEvolutionSol (sol. t , zt, Bt, prob. p. expvals, prob. p. funvals, prob. p. Ml)
540+ return LRTimeEvolutionSol (sol. prob . p . times , zt, Bt, prob. p. expvals, prob. p. funvals, prob. p. Ml)
539541end
0 commit comments