@@ -357,15 +357,16 @@ Helpers for handling output of ensemble problems.
357357This is very useful especially for dispatching which method to use to update the progress bar.
358358=#
359359
360+ # a dummy output function which does nothing
361+ _dummy_output_func (sol, i) = (sol, false )
362+
360363# Output function with progress bar update
361- _ensemble_output_func_progress (sol, i, progr, :: Nothing ) = next! (progr)
362364function _ensemble_output_func_progress (sol, i, progr, output_func)
363365 next! (progr)
364366 return output_func (sol, i)
365367end
366368
367369# Output function with distributed channel update for progress bar
368- _ensemble_output_func_distributed (sol, i, channel, :: Nothing ) = put! (channel, true )
369370function _ensemble_output_func_distributed (sol, i, channel, output_func)
370371 put! (channel, true )
371372 return output_func (sol, i)
@@ -375,7 +376,7 @@ function _ensemble_dispatch_output_func(
375376 :: ET ,
376377 progress_bar,
377378 ntraj,
378- output_func = nothing ,
379+ output_func,
379380) where {ET<: Union{EnsembleSerial,EnsembleThreads} }
380381 if getVal (progress_bar)
381382 progr = ProgressBar (ntraj, enable = getVal (progress_bar))
@@ -389,7 +390,7 @@ function _ensemble_dispatch_output_func(
389390 :: ET ,
390391 progress_bar,
391392 ntraj,
392- output_func = nothing ,
393+ output_func,
393394) where {ET<: Union{EnsembleSplitThreads,EnsembleDistributed} }
394395 if getVal (progress_bar)
395396 progr = ProgressBar (ntraj, enable = getVal (progress_bar))
@@ -454,9 +455,6 @@ function _stochastic_prob_func(prob, i, repeat, rng, seeds, tlist; kwargs...)
454455 return remake (prob. prob, noise = noise, seed = seed)
455456end
456457
457- # Standard output function
458- _stochastic_output_func (sol, i) = (sol, false )
459-
460458#=
461459 Define diagonal or non-diagonal noise depending on the type of `sc_ops`.
462460 If `sc_ops` is a `AbstractQuantumObject`, we avoid using the non-diagonal noise.
0 commit comments