qilisdk.optimizers.optimizer
Classes
Helper class that provides a standard way to create an ABC using |
Module Contents
- class Optimizer[font]
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- abstractmethod optimize(cost_function: Callable[[list[float]], float], init_parameters: list[float], bounds: list[tuple[float, float]], store_intermediate_results: bool = False) qilisdk.optimizers.optimizer_result.OptimizerResult[font]
optimize the cost function and return the optimal parameters.
- Paràmetres:
cost_function (
Callable[[list[float]],float]) – a function that takes in a list of parameters and returns the cost.init_parameters (
list[float]) – the list of initial parameters. Note: the length of this list determines the number of parameters the optimizer will consider.bounds (
list[float,float]) – a list of the variable value bounds.
- Retorna:
the optimal set of parameters that minimize the cost function.
- Tipus de retorn:
list[float]