paraqeet.optimizers.scipy_optimizer.ScipyOptimizer#
- class paraqeet.optimizers.scipy_optimizer.ScipyOptimizer(measure, optimization_map)[source]#
Bases:
OptimizerMinimize the outcome of a measuremnt with the scipy optimization package.
- Parameters:
measure (Measurement) – Implementation of the Measurement class that measures the observable to be maximised.
optimization_map (OptimizationMap) – An optimization map containing all parameters that can be optimized.
- __init__(measure, optimization_map)[source]#
- Parameters:
measure (NormalizableMeasurement)
optimization_map (OptimizationMap)
- Return type:
None
Methods
__init__(measure, optimization_map)optimize(times)Optimize the system via the Scipy optimizer.
set_options(opts)Set the options for the system.
update_option(key, val)Updates one option for the system.
Attributes
Returns the callback function.
Returns the current logger that is being used by this optimizer, or None if no logger was set yet.
Returns the currently selected optimization method.
Return the optimization map that this optimizer uses.
- property callback: Callable | None#
Returns the callback function.
- property logger: Logger | None#
Returns the current logger that is being used by this optimizer, or None if no logger was set yet.
- property method: str#
Returns the currently selected optimization method.
- property optimization_map: OptimizationMap#
Return the optimization map that this optimizer uses.
Parameters that can be optimized need to be added to this map.
- Returns:
Returns the optimization map that this optimizer uses.
- Return type:
paraqeet.optimization_map
- optimize(times)[source]#
Optimize the system via the Scipy optimizer.
Performs the actual optimization.
Since the search parameters are dimensionless and bound by [-1, 1], we set the bounds of the scipy minimize module to -1, and 1 explicitly in each search dimension.
Note - If input `times` is a float, then the start time of propagation is implicitly assumed to be zero. For an array of times, the first time point is the start time.
- Returns:
The result of the optimization.
- Return type:
- Parameters:
times (Array | float)