atomiq.components.optimizers module¶
- class atomiq.components.optimizers.Optimizer(actor_component, actor_name, monitor_component, monitor_name, *args, **kwargs)[source]¶
Bases:
Component
- Parameters:
actor_component (Parametrizable)
actor_name (TStr)
monitor_component (Measurable)
monitor_name (TStr)
- kernel_invariants = {'actor', 'actor_name', 'monitor'}¶
- class atomiq.components.optimizers.BoundOptimizer(actor_min, actor_max, *args, **kwargs)[source]¶
Bases:
Optimizer
An Optimizer with restrictions on the values of the actor.
- Parameters:
actor_min (TFloat) -- The minumum value the actor is allowed to take during optimization
actor_max (TFloat) -- The maxiumum value the actor is allowed to take during optimization
- kernel_invariants = {'actor_max', 'actor_min'}¶
- optimize()¶
- class atomiq.components.optimizers.BisectionOptimizer(timestep=0.000325, epsilon=0.01, max_steps=20, switch_actor=False, *args, **kwargs)[source]¶
Bases:
BoundOptimizer
An optimizer that uses bisection to achieve the optimization target on the monitor
- Parameters:
timestep -- The time the individual steps in the algorithm take
epsilon -- Acceptable relative difference from the target value (default 0.01, i.e. 1% of the target value)
switch_actor (TBool) -- If True, the actor (needs to be Switchable) is switched on before the measurement of the monitor and switched off after (default False)
- kernel_invariants = {'epsilon', 'max_steps', 'switch_actor', 'timestep'}¶