How-to Guides
Contents
Also see the following how-to guides from the QuantumPropagators documentation:
- How to implement a new propagation method
- How to specify the spectral range for a Chebychev propagation
- How to define a parameterized control
How to deal with long-running calculations
For any calculation that runs for more than a couple of minutes, use the QuantumControl.run_or_load
function. A particular case of a long-running calculation is a call to QuantumControl.optimize
for a system of non-trivial size. For optimizations in particular, there is QuantumControl.@optimize_or_load
that uses run_or_load
around optimize
, and stores the optimization result together with the (truncated) output from the optimization.
As an alternative to QuantumControl.run_or_load
, you might also consider the use of the DrWatson package, which provides DrWatson.produce_or_load
. It has a slightly more opinionated approach to saving and uses automatic file names based on parameters in a config
data structure. In contrast, QuantumControl.run_or_load
gives more control over the filename and does not force you to organize parameters in a config
.