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
Helper functions for the smesolve callbacks. Almost equal to the mesolve case, but with an additional possibility to store the measurement operators expectation values.
Copy file name to clipboardExpand all lines: src/time_evolution/callback_helpers/ssesolve_callback_helpers.jl
+1-8Lines changed: 1 addition & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
#=
2
-
Helper functions for the ssesolve callbacks. Equal to the sesolve case, but with an additional normalization before saving the expectation values.
2
+
Helper functions for the ssesolve callbacks. Almost equal to the sesolve case, but with an additional possibility to store the measurement operators expectation values. Also, this callback is not the first one, but the second one, due to the presence of the normalization callback.
@@ -184,6 +201,7 @@ Above, ``\hat{C}_i`` represent the collapse operators related to pure dissipatio
184
201
- `prob_func`: Function to use for generating the SDEProblem.
185
202
- `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.
186
203
- `progress_bar`: Whether to show the progress bar. Using non-`Val` types might lead to type instabilities.
204
+
- `store_measurement`: Whether to store the measurement expectation values. Default is `Val(false)`.
187
205
- `kwargs`: The keyword arguments for the ODEProblem.
188
206
189
207
# Notes
@@ -211,11 +229,19 @@ function smesolveEnsembleProblem(
211
229
prob_func::Union{Function,Nothing}=nothing,
212
230
output_func::Union{Tuple,Nothing}=nothing,
213
231
progress_bar::Union{Val,Bool}=Val(true),
232
+
store_measurement::Union{Val,Bool}=Val(false),
214
233
kwargs...,
215
234
) where {StateOpType<:Union{KetQuantumObject,OperatorQuantumObject}}
@@ -230,6 +256,7 @@ function smesolveEnsembleProblem(
230
256
params = params,
231
257
rng = rng,
232
258
progress_bar =Val(false),
259
+
store_measurement =makeVal(store_measurement),
233
260
kwargs...,
234
261
)
235
262
@@ -259,6 +286,7 @@ end
259
286
prob_func::Union{Function, Nothing} = nothing,
260
287
output_func::Union{Tuple,Nothing} = nothing,
261
288
progress_bar::Union{Val,Bool} = Val(true),
289
+
store_measurement::Union{Val,Bool} = Val(false),
262
290
kwargs...,
263
291
)
264
292
@@ -298,6 +326,7 @@ Above, ``\hat{C}_i`` represent the collapse operators related to pure dissipatio
298
326
- `prob_func`: Function to use for generating the SDEProblem.
299
327
- `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.
300
328
- `progress_bar`: Whether to show the progress bar. Using non-`Val` types might lead to type instabilities.
329
+
- `store_measurement`: Whether to store the measurement expectation values. Default is `Val(false)`.
301
330
- `kwargs`: The keyword arguments for the ODEProblem.
302
331
303
332
# Notes
@@ -326,6 +355,7 @@ function smesolve(
326
355
prob_func::Union{Function,Nothing}=nothing,
327
356
output_func::Union{Tuple,Nothing}=nothing,
328
357
progress_bar::Union{Val,Bool}=Val(true),
358
+
store_measurement::Union{Val,Bool}=Val(false),
329
359
kwargs...,
330
360
) where {StateOpType<:Union{KetQuantumObject,OperatorQuantumObject}}
0 commit comments