tequila.optimizers.optimizer_phoenics.minimize

tequila.optimizers.optimizer_phoenics.minimize(objective: tequila.objective.objective.Objective, maxiter: int = None, samples: int = None, variables: List = None, initial_values: Dict = None, backend: str = None, noise=None, device: str = None, previous: Union[str, list] = None, phoenics_config: Union[str, Dict] = None, file_name: str = None, silent: bool = False, *args, **kwargs)tequila.optimizers.optimizer_phoenics.PhoenicsResults[source]

Perform optimization with phoenics.

Parameters
  • objective (Objective) – The tequila objective to optimize

  • initial_values (typing.Dict[typing.Hashable, numbers.Real], optional) – Initial values as dictionary of Hashable types (variable keys) and floating point numbers. If given None they will be randomized.

  • variables (typing.List[typing.Hashable], optional) – List of Variables to optimize

  • samples (int, optional) – Samples/shots to take in every run of the quantum circuits (None activates full wavefunction simulation)

  • maxiter (int) – How many iterations of phoenics to run. Note that this is NOT identical to the number of times the circuit will run.

  • backend (str, optional) – Simulator backend, will be automatically chosen if set to None

  • noise (NoiseModel, optional) – A noise model to apply to the circuits of Objective.

  • device (optional) – The device from which to (potentially, simulatedly) sample all quantum circuits employed in optimization.

  • previous (optional) – Previous phoenics observations. If string, the name of a file from which to load them. Else, a list.

  • phoenics_config (optional) – A pre-made phoenics configuration. if str, the name of a file from which to load it; Else, a dictionary. Individual keywords of the ‘general’ sections can also be passed down as kwargs

  • file_name (str, optional) – Where to save output to, if save_to_file is True.

  • kwargs (dict) – Send down more keywords for single replacements in the phoenics config ‘general’ section, like e.g. batches=5, boosted=True etc

Returns

The result of an optimization by phoenics.

Return type

PhoenicsResults