paraqeet.optimizers.bayesian_optimizer.BayesianOptimizer#

class paraqeet.optimizers.bayesian_optimizer.BayesianOptimizer(measure, optimization_map, initial_samples=10, iterations=100)[source]#

Bases: Optimizer

Minimizes the outcome of a measuremnt using Bayesian optimization.

This is useful if the evaluation of the measurement is costly. This class is mostly a wrapper around the implementing package.

See also

https

//bayesian-optimization.github.io/BayesianOptimization/index.html

Parameters:
  • measure (Measurement) – The measure to be optimized.

  • optimization_map (OptimizationMap) – All optimizable parameters via the optimization map.

  • initial_samples (int=10) – Number of iterations before the explorations starts the exploration for the maximum.

  • iterations (int =100) – Number of iterations where the method attempts to find the maximum value.

__init__(measure, optimization_map, initial_samples=10, iterations=100)[source]#
Parameters:

Methods

__init__(measure, optimization_map[, ...])

optimize(times)

Optimize the system via the Bayesian optimizer.

Attributes

initial_samples

Get the initial samples fed to the system.

iterations

Get the iterations of the system.

logger

Returns the current logger that is being used by this optimizer, or None if no logger was set yet.

optimization_map

Return the optimization map that this optimizer uses.

property initial_samples: int#

Get the initial samples fed to the system.

property iterations: int#

Get the iterations of the system.

property logger: Logger | None#

Returns the current logger that is being used by this optimizer, or None if no logger was set yet.

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 Bayesian optimizer.

Performs the actual optimization.

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:

Result of optimization via the OptimizationResult object. (status, value, iterations and the raw result)

Return type:

OptimizationResult

Parameters:

times (Array | float)