Skip to content
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

Support for single sc_ops for faster specific method in ssesolve and smesolve #408

Merged
merged 5 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/qutip/QuantumToolbox.jl/tree/main)

- Support for single `AbstractQuantumObject` in `sc_ops` for faster specific method in `ssesolve` and `smesolve`. ([#408])

## [v0.27.0]
Release date: 2025-02-14

Expand Down Expand Up @@ -140,3 +142,4 @@ Release date: 2024-11-13
[#403]: https://github.com/qutip/QuantumToolbox.jl/issues/403
[#404]: https://github.com/qutip/QuantumToolbox.jl/issues/404
[#405]: https://github.com/qutip/QuantumToolbox.jl/issues/405
[#408]: https://github.com/qutip/QuantumToolbox.jl/issues/408
4 changes: 2 additions & 2 deletions src/QuantumToolbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import SciMLBase:
AbstractSciMLProblem,
AbstractODEIntegrator,
AbstractODESolution
import StochasticDiffEq: StochasticDiffEqAlgorithm, SRA1
import StochasticDiffEq: StochasticDiffEqAlgorithm, SRA2, SRIW1
import SciMLOperators:
SciMLOperators,
AbstractSciMLOperator,
Expand All @@ -56,7 +56,7 @@ import DiffEqBase: get_tstops
import DiffEqCallbacks: PeriodicCallback, PresetTimeCallback, TerminateSteadyState
import OrdinaryDiffEqCore: OrdinaryDiffEqAlgorithm
import OrdinaryDiffEqTsit5: Tsit5
import DiffEqNoiseProcess: RealWienerProcess!
import DiffEqNoiseProcess: RealWienerProcess!, RealWienerProcess

# other dependencies (in alphabetical order)
import ArrayInterface: allowed_getindex, allowed_setindex!
Expand Down
52 changes: 27 additions & 25 deletions src/time_evolution/smesolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ψ0::QuantumObject,
tlist::AbstractVector,
c_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -50,7 +50,7 @@
- `ψ0`: Initial state of the system ``|\psi(0)\rangle``. It can be either a [`Ket`](@ref) or a [`Operator`](@ref).
- `tlist`: List of times at which to save either the state or the expectation values of the system.
- `c_ops`: List of collapse operators ``\{\hat{C}_i\}_i``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector`, a `Tuple` or a [`AbstractQuantumObject`](@ref). It is recommended to use the last case when only one operator is provided.
- `e_ops`: List of operators for which to calculate expectation values. It can be either a `Vector` or a `Tuple`.
- `params`: `NullParameters` of parameters to pass to the solver.
- `rng`: Random number generator for reproducibility.
Expand All @@ -74,7 +74,7 @@
ψ0::QuantumObject{StateOpType},
tlist::AbstractVector,
c_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand All @@ -87,10 +87,12 @@

isnothing(sc_ops) &&
throw(ArgumentError("The list of stochastic collapse operators must be provided. Use mesolveProblem instead."))
sc_ops_list = _make_c_ops_list(sc_ops) # If it is an AbstractQuantumObject but we need to iterate
sc_ops_isa_Qobj = sc_ops isa AbstractQuantumObject # We can avoid using non-diagonal noise if sc_ops is just an AbstractQuantumObject

Check warning on line 91 in src/time_evolution/smesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/smesolve.jl#L90-L91

Added lines #L90 - L91 were not covered by tests

tlist = _check_tlist(tlist, _FType(ψ0))

L_evo = _mesolve_make_L_QobjEvo(H, c_ops) + _mesolve_make_L_QobjEvo(nothing, sc_ops)
L_evo = _mesolve_make_L_QobjEvo(H, c_ops) + _mesolve_make_L_QobjEvo(nothing, sc_ops_list)

Check warning on line 95 in src/time_evolution/smesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/smesolve.jl#L95

Added line #L95 was not covered by tests
check_dimensions(L_evo, ψ0)
dims = L_evo.dimensions

Expand All @@ -99,7 +101,7 @@

progr = ProgressBar(length(tlist), enable = getVal(progress_bar))

sc_ops_evo_data = Tuple(map(get_data ∘ QobjEvo, sc_ops))
sc_ops_evo_data = Tuple(map(get_data ∘ QobjEvo, sc_ops_list))

Check warning on line 104 in src/time_evolution/smesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/smesolve.jl#L104

Added line #L104 was not covered by tests

K = get_data(L_evo)

Expand All @@ -116,7 +118,7 @@
kwargs2 = _merge_saveat(tlist, e_ops, DEFAULT_SDE_SOLVER_OPTIONS; kwargs...)
kwargs3 = _generate_stochastic_kwargs(
e_ops,
sc_ops,
sc_ops_list,
makeVal(progress_bar),
tlist,
makeVal(store_measurement),
Expand All @@ -125,14 +127,8 @@
)

tspan = (tlist[1], tlist[end])
noise = RealWienerProcess!(
tlist[1],
zeros(length(sc_ops)),
zeros(length(sc_ops)),
save_everystep = getVal(store_measurement),
rng = rng,
)
noise_rate_prototype = similar(ρ0, length(ρ0), length(sc_ops))
noise = _make_noise(tspan[1], sc_ops, makeVal(store_measurement), rng)
noise_rate_prototype = sc_ops_isa_Qobj ? nothing : similar(ρ0, length(ρ0), length(sc_ops_list))

Check warning on line 131 in src/time_evolution/smesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/smesolve.jl#L130-L131

Added lines #L130 - L131 were not covered by tests
prob = SDEProblem{true}(
K,
D,
Expand All @@ -153,7 +149,7 @@
ψ0::QuantumObject,
tlist::AbstractVector,
c_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -192,7 +188,7 @@
- `ψ0`: Initial state of the system ``|\psi(0)\rangle``. It can be either a [`Ket`](@ref) or a [`Operator`](@ref).
- `tlist`: List of times at which to save either the state or the expectation values of the system.
- `c_ops`: List of collapse operators ``\{\hat{C}_i\}_i``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector`, a `Tuple` or a [`AbstractQuantumObject`](@ref). It is recommended to use the last case when only one operator is provided.
- `e_ops`: List of operators for which to calculate expectation values. It can be either a `Vector` or a `Tuple`.
- `params`: `NullParameters` of parameters to pass to the solver.
- `rng`: Random number generator for reproducibility.
Expand Down Expand Up @@ -220,7 +216,7 @@
ψ0::QuantumObject{StateOpType},
tlist::AbstractVector,
c_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand All @@ -239,7 +235,7 @@
ntraj,
tlist,
_stochastic_prob_func;
n_sc_ops = length(sc_ops),
sc_ops = sc_ops,
store_measurement = makeVal(store_measurement),
) : prob_func
_output_func =
Expand Down Expand Up @@ -276,8 +272,8 @@
ψ0::QuantumObject,
tlist::AbstractVector,
c_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
alg::StochasticDiffEqAlgorithm = SRA1(),
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
alg::Union{Nothing,StochasticDiffEqAlgorithm} = nothing,
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -316,8 +312,8 @@
- `ψ0`: Initial state of the system ``|\psi(0)\rangle``. It can be either a [`Ket`](@ref) or a [`Operator`](@ref).
- `tlist`: List of times at which to save either the state or the expectation values of the system.
- `c_ops`: List of collapse operators ``\{\hat{C}_i\}_i``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector` or a `Tuple`.
- `alg`: The algorithm to use for the stochastic differential equation. Default is `SRA1()`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector`, a `Tuple` or a [`AbstractQuantumObject`](@ref). It is recommended to use the last case when only one operator is provided.
- `alg`: The algorithm to use for the stochastic differential equation. Default is `SRIW1()` if `sc_ops` is an [`AbstractQuantumObject`](@ref) (diagonal noise), and `SRA2()` otherwise (non-diagonal noise).
- `e_ops`: List of operators for which to calculate expectation values. It can be either a `Vector` or a `Tuple`.
- `params`: `NullParameters` of parameters to pass to the solver.
- `rng`: Random number generator for reproducibility.
Expand Down Expand Up @@ -345,8 +341,8 @@
ψ0::QuantumObject{StateOpType},
tlist::AbstractVector,
c_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
alg::StochasticDiffEqAlgorithm = SRA1(),
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
alg::Union{Nothing,StochasticDiffEqAlgorithm} = nothing,
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -376,12 +372,18 @@
kwargs...,
)

sc_ops_isa_Qobj = sc_ops isa AbstractQuantumObject # We can avoid using non-diagonal noise if sc_ops is just an AbstractQuantumObject

Check warning on line 375 in src/time_evolution/smesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/smesolve.jl#L375

Added line #L375 was not covered by tests

if isnothing(alg)
alg = sc_ops_isa_Qobj ? SRIW1() : SRA2()

Check warning on line 378 in src/time_evolution/smesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/smesolve.jl#L377-L378

Added lines #L377 - L378 were not covered by tests
end

return smesolve(ensemble_prob, alg, ntraj, ensemblealg)
end

function smesolve(
ens_prob::TimeEvolutionProblem,
alg::StochasticDiffEqAlgorithm = SRA1(),
alg::StochasticDiffEqAlgorithm = SRA2(),
ntraj::Int = 500,
ensemblealg::EnsembleAlgorithm = EnsembleThreads(),
)
Expand Down
52 changes: 27 additions & 25 deletions src/time_evolution/ssesolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
H::Union{AbstractQuantumObject{OperatorQuantumObject},Tuple},
ψ0::QuantumObject{KetQuantumObject},
tlist::AbstractVector,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -52,7 +52,7 @@
- `H`: Hamiltonian of the system ``\hat{H}``. It can be either a [`QuantumObject`](@ref), a [`QuantumObjectEvolution`](@ref), or a `Tuple` of operator-function pairs.
- `ψ0`: Initial state of the system ``|\psi(0)\rangle``.
- `tlist`: List of times at which to save either the state or the expectation values of the system.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector`, a `Tuple` or a [`AbstractQuantumObject`](@ref). It is recommended to use the last case when only one operator is provided.
- `e_ops`: List of operators for which to calculate expectation values. It can be either a `Vector` or a `Tuple`.
- `params`: `NullParameters` of parameters to pass to the solver.
- `rng`: Random number generator for reproducibility.
Expand All @@ -75,7 +75,7 @@
H::Union{AbstractQuantumObject{OperatorQuantumObject},Tuple},
ψ0::QuantumObject{KetQuantumObject},
tlist::AbstractVector,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand All @@ -88,10 +88,12 @@

sc_ops isa Nothing &&
throw(ArgumentError("The list of stochastic collapse operators must be provided. Use sesolveProblem instead."))
sc_ops_list = _make_c_ops_list(sc_ops) # If it is an AbstractQuantumObject but we need to iterate
sc_ops_isa_Qobj = sc_ops isa AbstractQuantumObject # We can avoid using non-diagonal noise if sc_ops is just an AbstractQuantumObject

Check warning on line 92 in src/time_evolution/ssesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/ssesolve.jl#L91-L92

Added lines #L91 - L92 were not covered by tests

tlist = _check_tlist(tlist, _FType(ψ0))

H_eff_evo = _mcsolve_make_Heff_QobjEvo(H, sc_ops)
H_eff_evo = _mcsolve_make_Heff_QobjEvo(H, sc_ops_list)

Check warning on line 96 in src/time_evolution/ssesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/ssesolve.jl#L96

Added line #L96 was not covered by tests
isoper(H_eff_evo) || throw(ArgumentError("The Hamiltonian must be an Operator."))
check_dimensions(H_eff_evo, ψ0)
dims = H_eff_evo.dimensions
Expand All @@ -100,7 +102,7 @@

progr = ProgressBar(length(tlist), enable = getVal(progress_bar))

sc_ops_evo_data = Tuple(map(get_data ∘ QobjEvo, sc_ops))
sc_ops_evo_data = Tuple(map(get_data ∘ QobjEvo, sc_ops_list))

Check warning on line 105 in src/time_evolution/ssesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/ssesolve.jl#L105

Added line #L105 was not covered by tests

# Here the coefficients depend on the state, so this is a non-linear operator, which should be implemented with FunctionOperator instead. However, the nonlinearity is only on the coefficients, and it should be safe.
K_l = sum(
Expand All @@ -116,7 +118,7 @@
kwargs2 = _merge_saveat(tlist, e_ops, DEFAULT_SDE_SOLVER_OPTIONS; kwargs...)
kwargs3 = _generate_stochastic_kwargs(
e_ops,
sc_ops,
sc_ops_list,
makeVal(progress_bar),
tlist,
makeVal(store_measurement),
Expand All @@ -125,14 +127,8 @@
)

tspan = (tlist[1], tlist[end])
noise = RealWienerProcess!(
tlist[1],
zeros(length(sc_ops)),
zeros(length(sc_ops)),
save_everystep = getVal(store_measurement),
rng = rng,
)
noise_rate_prototype = similar(ψ0, length(ψ0), length(sc_ops))
noise = _make_noise(tspan[1], sc_ops, makeVal(store_measurement), rng)
noise_rate_prototype = sc_ops_isa_Qobj ? nothing : similar(ψ0, length(ψ0), length(sc_ops_list))

Check warning on line 131 in src/time_evolution/ssesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/ssesolve.jl#L130-L131

Added lines #L130 - L131 were not covered by tests
prob = SDEProblem{true}(
K,
D,
Expand All @@ -152,7 +148,7 @@
H::Union{AbstractQuantumObject{OperatorQuantumObject},Tuple},
ψ0::QuantumObject{KetQuantumObject},
tlist::AbstractVector,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -191,7 +187,7 @@
- `H`: Hamiltonian of the system ``\hat{H}``. It can be either a [`QuantumObject`](@ref), a [`QuantumObjectEvolution`](@ref), or a `Tuple` of operator-function pairs.
- `ψ0`: Initial state of the system ``|\psi(0)\rangle``.
- `tlist`: List of times at which to save either the state or the expectation values of the system.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector` or a `Tuple`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector`, a `Tuple` or a [`AbstractQuantumObject`](@ref). It is recommended to use the last case when only one operator is provided.
- `e_ops`: List of operators for which to calculate expectation values. It can be either a `Vector` or a `Tuple`.
- `params`: `NullParameters` of parameters to pass to the solver.
- `rng`: Random number generator for reproducibility.
Expand Down Expand Up @@ -219,7 +215,7 @@
H::Union{AbstractQuantumObject{OperatorQuantumObject},Tuple},
ψ0::QuantumObject{KetQuantumObject},
tlist::AbstractVector,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand All @@ -238,7 +234,7 @@
ntraj,
tlist,
_stochastic_prob_func;
n_sc_ops = length(sc_ops),
sc_ops = sc_ops,
store_measurement = makeVal(store_measurement),
) : prob_func
_output_func =
Expand Down Expand Up @@ -273,8 +269,8 @@
H::Union{AbstractQuantumObject{OperatorQuantumObject},Tuple},
ψ0::QuantumObject{KetQuantumObject},
tlist::AbstractVector,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
alg::StochasticDiffEqAlgorithm = SRA1(),
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
alg::Union{Nothing,StochasticDiffEqAlgorithm} = nothing,
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -316,8 +312,8 @@
- `H`: Hamiltonian of the system ``\hat{H}``. It can be either a [`QuantumObject`](@ref), a [`QuantumObjectEvolution`](@ref), or a `Tuple` of operator-function pairs.
- `ψ0`: Initial state of the system ``|\psi(0)\rangle``.
- `tlist`: List of times at which to save either the state or the expectation values of the system.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector` or a `Tuple`.
- `alg`: The algorithm to use for the stochastic differential equation. Default is `SRA1()`.
- `sc_ops`: List of stochastic collapse operators ``\{\hat{S}_n\}_n``. It can be either a `Vector`, a `Tuple` or a [`AbstractQuantumObject`](@ref). It is recommended to use the last case when only one operator is provided.
- `alg`: The algorithm to use for the stochastic differential equation. Default is `SRIW1()` if `sc_ops` is an [`AbstractQuantumObject`](@ref) (diagonal noise), and `SRA2()` otherwise (non-diagonal noise).
- `e_ops`: List of operators for which to calculate expectation values. It can be either a `Vector` or a `Tuple`.
- `params`: `NullParameters` of parameters to pass to the solver.
- `rng`: Random number generator for reproducibility.
Expand Down Expand Up @@ -345,8 +341,8 @@
H::Union{AbstractQuantumObject{OperatorQuantumObject},Tuple},
ψ0::QuantumObject{KetQuantumObject},
tlist::AbstractVector,
sc_ops::Union{Nothing,AbstractVector,Tuple} = nothing;
alg::StochasticDiffEqAlgorithm = SRA1(),
sc_ops::Union{Nothing,AbstractVector,Tuple,AbstractQuantumObject} = nothing;
alg::Union{Nothing,StochasticDiffEqAlgorithm} = nothing,
e_ops::Union{Nothing,AbstractVector,Tuple} = nothing,
params = NullParameters(),
rng::AbstractRNG = default_rng(),
Expand Down Expand Up @@ -375,12 +371,18 @@
kwargs...,
)

sc_ops_isa_Qobj = sc_ops isa AbstractQuantumObject # We can avoid using non-diagonal noise if sc_ops is just an AbstractQuantumObject

Check warning on line 374 in src/time_evolution/ssesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/ssesolve.jl#L374

Added line #L374 was not covered by tests

if isnothing(alg)
alg = sc_ops_isa_Qobj ? SRIW1() : SRA2()

Check warning on line 377 in src/time_evolution/ssesolve.jl

View check run for this annotation

Codecov / codecov/patch

src/time_evolution/ssesolve.jl#L376-L377

Added lines #L376 - L377 were not covered by tests
end

return ssesolve(ens_prob, alg, ntraj, ensemblealg)
end

function ssesolve(
ens_prob::TimeEvolutionProblem,
alg::StochasticDiffEqAlgorithm = SRA1(),
alg::StochasticDiffEqAlgorithm = SRA2(),
ntraj::Int = 500,
ensemblealg::EnsembleAlgorithm = EnsembleThreads(),
)
Expand Down
Loading