Skip to content

Commit d65ea9b

Browse files
committed
fix typos
1 parent e5f04cf commit d65ea9b

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/time_evolution/callback_helpers/callback_helpers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This file contains helper functions for callbacks. The affect! function are defi
66

77
abstract type AbstractSaveFunc end
88

9-
function _merge_tstops(kwargs, prob_is_constant::Bool, tlist)
10-
if prob_is_constant
9+
function _merge_tstops(kwargs, prob_is_const::Bool, tlist)
10+
if prob_is_const
1111
return kwargs
1212
else
1313
tstops = haskey(kwargs, :tstops) ? unique!(sort!(vcat(tlist, kwargs.tstops))) : tlist
@@ -35,7 +35,7 @@ function _generate_stochastic_kwargs(
3535

3636
# Ensure that the noise is stored in tlist. # TODO: Fix this directly in DiffEqNoiseProcess.jl
3737
# See https://github.com/SciML/DiffEqNoiseProcess.jl/issues/214 for example
38-
kwargs2 = _merge_tstops(kwargs, true, tlist) # true to force add 'tstops = tlist'
38+
kwargs2 = _merge_tstops(kwargs, false, tlist) # set 'prob_is_const = false' to force add 'tstops = tlist'
3939

4040
if SF === SaveFuncSSESolve
4141
cb_normalize = _ssesolve_generate_normalize_cb()

src/time_evolution/sesolve.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function sesolve(
140140
H::Union{AbstractQuantumObject{Operator},Tuple},
141141
ψ0::QuantumObject{Ket},
142142
tlist::AbstractVector;
143-
alg::AbstractODEAlgorithm = Vern7(lazy=false),
143+
alg::AbstractODEAlgorithm = Vern7(lazy = false),
144144
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
145145
params = NullParameters(),
146146
progress_bar::Union{Val,Bool} = Val(true),
@@ -172,7 +172,7 @@ function sesolve(
172172
end
173173
end
174174

175-
function sesolve(prob::TimeEvolutionProblem, alg::AbstractODEAlgorithm = Vern7(lazy=false); kwargs...)
175+
function sesolve(prob::TimeEvolutionProblem, alg::AbstractODEAlgorithm = Vern7(lazy = false); kwargs...)
176176
sol = solve(prob.prob, alg; kwargs...)
177177

178178
return _gen_sesolve_solution(sol, prob.times, prob.dimensions)
@@ -227,7 +227,7 @@ function sesolve_map(
227227
H::Union{AbstractQuantumObject{Operator},Tuple},
228228
ψ0::AbstractVector{<:QuantumObject{Ket}},
229229
tlist::AbstractVector;
230-
alg::AbstractODEAlgorithm = Vern7(lazy=false),
230+
alg::AbstractODEAlgorithm = Vern7(lazy = false),
231231
ensemblealg::EnsembleAlgorithm = EnsembleThreads(),
232232
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
233233
params::Union{NullParameters,Tuple} = NullParameters(),
@@ -267,7 +267,7 @@ sesolve_map(H::Union{AbstractQuantumObject{Operator},Tuple}, ψ0::QuantumObject{
267267
function sesolve_map(
268268
prob::TimeEvolutionProblem{<:ODEProblem},
269269
iter::AbstractArray,
270-
alg::AbstractODEAlgorithm = Vern7(lazy=false),
270+
alg::AbstractODEAlgorithm = Vern7(lazy = false),
271271
ensemblealg::EnsembleAlgorithm = EnsembleThreads();
272272
prob_func::Union{Function,Nothing} = nothing,
273273
output_func::Union{Tuple,Nothing} = nothing,

test/core-test/time_evolution.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ end
134134

135135
allocs_tot = @allocations sesolve(H, ψ0, tlist, saveat = [tlist[end]], progress_bar = Val(false)) # Warm-up
136136
allocs_tot = @allocations sesolve(H, ψ0, tlist, saveat = [tlist[end]], progress_bar = Val(false))
137-
@test allocs_tot < 90
137+
@test allocs_tot < 95
138138
end
139139

140140
@testset "Type Inference sesolve" begin

0 commit comments

Comments
 (0)