You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
- Improve efficiency of `bloch_redfield_tensor` by avoiding unnecessary conversions. ([#509])
11
11
- Support `SciMLOperators v1.4+`. ([#470])
12
12
- Fix compatibility with `Makie v0.24+`. ([#513])
13
+
- Add `keep_runs_results` option for multi-trajectory solvers to align with `QuTiP`. ([#512])
14
+
- Breaking changes for multi-trajectory solutions:
15
+
- the original fields `expect` and `states` now store the results depend on keyword argument `keep_runs_results` (decide whether to store all trajectories results or not).
This part is still under construction, please read the docstrings for the following functions first:
100
+
The solutions are different for solvers which compute multiple trajectories, such as the [`TimeEvolutionMCSol`](@ref) (Monte Carlo) or the [`TimeEvolutionStochasticSol`](@ref) (stochastic methods). The storage of expectation values and states depends on the keyword argument `keep_runs_results`, which determines whether the results of all trajectories are stored in the solution.
101
101
102
-
-[`TimeEvolutionMCSol`](@ref)
103
-
-[`TimeEvolutionStochasticSol`](@ref)
102
+
When the keyword argument `keep_runs_results` is passed as `Val(false)` to a multi-trajectory solver, the `states` and `expect` fields store only the average results (averaged over all trajectories). The results can be accessed by the following index-order:
If the keyword argument `keep_runs_results = Val(true)`, the results for each trajectory and each time are stored, and the index-order of the elements in fields `states` and `expect` are:
@@ -332,6 +333,7 @@ If the environmental measurements register a quantum jump, the wave function und
332
333
- `progress_bar`: Whether to show the progress bar. Using non-`Val` types might lead to type instabilities.
333
334
- `prob_func`: Function to use for generating the ODEProblem.
334
335
- `output_func`: a `Tuple` containing the `Function` to use for generating the output of a single trajectory, the (optional) `ProgressBar` object, and the (optional) `RemoteChannel` object.
336
+
- `keep_runs_results`: Whether to save the results of each trajectory. Default to `Val(false)`.
335
337
- `normalize_states`: Whether to normalize the states. Default to `Val(true)`.
336
338
- `kwargs`: The keyword arguments for the ODEProblem.
Copy file name to clipboardExpand all lines: src/time_evolution/smesolve.jl
+13-11Lines changed: 13 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -293,6 +293,7 @@ end
293
293
prob_func::Union{Function, Nothing} = nothing,
294
294
output_func::Union{Tuple,Nothing} = nothing,
295
295
progress_bar::Union{Val,Bool} = Val(true),
296
+
keep_runs_results::Union{Val,Bool} = Val(false),
296
297
store_measurement::Union{Val,Bool} = Val(false),
297
298
kwargs...,
298
299
)
@@ -333,6 +334,7 @@ Above, ``\hat{C}_i`` represent the collapse operators related to pure dissipatio
333
334
- `prob_func`: Function to use for generating the SDEProblem.
334
335
- `output_func`: a `Tuple` containing the `Function` to use for generating the output of a single trajectory, the (optional) `ProgressBar` object, and the (optional) `RemoteChannel` object.
335
336
- `progress_bar`: Whether to show the progress bar. Using non-`Val` types might lead to type instabilities.
337
+
- `keep_runs_results`: Whether to save the results of each trajectory. Default to `Val(false)`.
336
338
- `store_measurement`: Whether to store the measurement expectation values. Default is `Val(false)`.
337
339
- `kwargs`: The keyword arguments for the ODEProblem.
338
340
@@ -365,6 +367,7 @@ function smesolve(
365
367
prob_func::Union{Function,Nothing}=nothing,
366
368
output_func::Union{Tuple,Nothing}=nothing,
367
369
progress_bar::Union{Val,Bool}=Val(true),
370
+
keep_runs_results::Union{Val,Bool}=Val(false),
368
371
store_measurement::Union{Val,Bool}=Val(false),
369
372
kwargs...,
370
373
) where {StateOpType<:Union{Ket,Operator,OperatorKet}}
Copy file name to clipboardExpand all lines: src/time_evolution/ssesolve.jl
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -285,6 +285,7 @@ end
285
285
prob_func::Union{Function, Nothing} = nothing,
286
286
output_func::Union{Tuple,Nothing} = nothing,
287
287
progress_bar::Union{Val,Bool} = Val(true),
288
+
keep_runs_results::Union{Val,Bool} = Val(false),
288
289
store_measurement::Union{Val,Bool} = Val(false),
289
290
kwargs...,
290
291
)
@@ -328,6 +329,7 @@ Above, ``\hat{S}_n`` are the stochastic collapse operators and ``dW_n(t)`` is th
328
329
- `prob_func`: Function to use for generating the SDEProblem.
329
330
- `output_func`: a `Tuple` containing the `Function` to use for generating the output of a single trajectory, the (optional) `ProgressBar` object, and the (optional) `RemoteChannel` object.
330
331
- `progress_bar`: Whether to show the progress bar. Using non-`Val` types might lead to type instabilities.
332
+
- `keep_runs_results`: Whether to save the results of each trajectory. Default to `Val(false)`.
331
333
- `store_measurement`: Whether to store the measurement results. Default is `Val(false)`.
332
334
- `kwargs`: The keyword arguments for the ODEProblem.
0 commit comments