tequila.optimizers.optimizer_phoenics.OptimizerPhoenics.initialize_variables¶
-
OptimizerPhoenics.
initialize_variables
(objective, initial_values, variables)¶ Convenience function to format the variables of some objective recieved in calls to optimizers.
Convenience: format variables of an objective and segregrate actives from passives.
- Parameters
objective (Objective:) – the objective being optimized.
initial_values (dict or string:) – initial values for the variables of objective, as a dictionary. if string: can be zero or random if callable: custom function that initializes when keys are passed if None: random initialization between 0 and 2pi (not recommended)
variables (list:) – the variables being optimized over.
- Returns
active_angles, a dict of those variables being optimized. passive_angles, a dict of those variables NOT being optimized. variables: formatted list of the variables being optimized.
- Return type
tuple