qutip_qoc.pulse_optim module
This module is the entry point for the optimization of control pulses. It provides the function optimize_pulses which prepares and runs the GOAT, JOPT, GRAPE or CRAB optimization.
- qutip_qoc.pulse_optim.optimize_pulses(objectives, control_parameters, tlist, algorithm_kwargs=None, optimizer_kwargs=None, minimizer_kwargs=None, integrator_kwargs=None)[source]
Run GOAT, JOPT, GRAPE or CRAB optimization.
- Parameters:
- objectiveslist of
qutip_qoc.Objective List of objectives to be optimized. Each objective is weighted by its weight attribute.
- control_parametersdict
Dictionary of options for the control pulse optimization. The keys of this dict must be a unique string identifier for each control Hamiltonian / function. For the GOAT and JOPT algorithms, the dict may optionally also contain the key “__time__”. For each control function it must specify:
- control_iddict
- guess: ndarray, shape (n,)
Initial guess. Array of real elements of size (n,), where
nis the number of independent variables.
- boundssequence, optional
Sequence of
(min, max)pairs for each element in guess. None is used to specify no bound.
- __time__dict, optional
Only supported by GOAT and JOPT. If given the pulse duration is treated as optimization parameter. It must specify both:
- guess: ndarray, shape (n,)
Initial guess. Array of real elements of size (n,), where
nis the number of independent variables.
- boundssequence, optional
Sequence of
(min, max)pairs for each element in guess. None is used to specify no bound.
GRAPE and CRAB bounds are only one pair of
(min, max)limiting the amplitude of all tslots equally.- tlist: List.
Time over which system evolves.
- algorithm_kwargsdict, optional
Dictionary of options for the optimization algorithm.
- algstr
Algorithm to use for the optimization. Supported are: “GRAPE”, “CRAB”, “GOAT”, “JOPT”.
- fid_err_targfloat, optional
Fidelity error target for the optimization.
- max_iterint, optional
Maximum number of iterations to perform. Referes to local minimizer steps. Global steps default to 0 (no global optimization). Can be overridden by specifying in minimizer_kwargs.
Algorithm specific keywords for GRAPE,CRAB can be found in
qutip_qtrl.pulseoptim.optimize_pulse().- optimizer_kwargsdict, optional
Dictionary of options for the global optimizer. Only supported by GOAT and JOPT.
- methodstr, optional
Algorithm to use for the global optimization. Supported are: “basinhopping”, “dual_annealing”
- max_iterint, optional
Maximum number of iterations to perform. Default is 0 (no global optimization).
Full list of options can be found in
scipy.optimize.basinhopping()andscipy.optimize.dual_annealing().- minimizer_kwargsdict, optional
Dictionary of options for the local minimizer.
- methodstr, optional
Algorithm to use for the local optimization. Gradient driven methods are supported.
Full list of options and methods can be found in
scipy.optimize.minimize().- integrator_kwargsdict, optional
Dictionary of options for the integrator. Only supported by GOAT and JOPT. Options for the solver, see
MESolver.optionsand Integrator for a list of all options.
- objectiveslist of
- Returns:
- result
qutip_qoc.Result Optimization result.
- result