atomiq.components.optimizers¶
Classes¶
An atomiq Component |
|
An Optimizer with restrictions on the values of the actor. |
|
An optimizer that uses bisection to achieve the optimization target on the monitor |
Module Contents¶
- class atomiq.components.optimizers.Optimizer(actor_component, actor_name, monitor_component, monitor_name, *args, **kwargs)[source]¶
Bases:
atomiq.components.primitives.ComponentAn atomiq Component
Every component in atomiq inherits from this class. It provides basic functionality for automatic and recursive building and initialization of components (prepare, build, prerun). It also takes care for joining kernel invariants along the inheritance tree.
Note
The arguments parent and identifier are automatically passed to the component object by the atomiq object builder.
- Parameters:
parent -- The parent context of the component. Usually this is the experiment that uses the component
identifier -- A unique name to identify the component.
debug_output -- Set whether the component should show debug output. Using this switch rather than the debug kernel logger can allow the compiler to not include the debug commands in the kernel code if the output is not needed.
actor_component (Parametrizable)
actor_name (artiq.language.types.TStr)
monitor_component (Measurable)
monitor_name (artiq.language.types.TStr)
- kernel_invariants¶
- actor¶
- monitor¶
- actor_name¶
- class atomiq.components.optimizers.BoundOptimizer(actor_min, actor_max, *args, **kwargs)[source]¶
Bases:
OptimizerAn Optimizer with restrictions on the values of the actor.
- Parameters:
actor_min (artiq.language.types.TFloat) -- The minumum value the actor is allowed to take during optimization
actor_max (artiq.language.types.TFloat) -- The maxiumum value the actor is allowed to take during optimization
- kernel_invariants¶
- actor_min¶
- actor_max¶
- class atomiq.components.optimizers.BisectionOptimizer(timestep=325 * us, epsilon=0.01, max_steps=20, switch_actor=False, *args, **kwargs)[source]¶
Bases:
BoundOptimizerAn 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 (artiq.language.types.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¶
- timestep¶
- epsilon = 0.01¶
- max_steps = 20¶
- switch_actor = False¶