class SimulatedAnnealingInitializer(*, bounds, temperatures, temperature_cost, seed=None, rng_seed=None)

Configuration for the simulated annealing based optimizer. The optimizer performs a temperature based random walk within the per-parameter bounds provided. The new test points are sampled from a distribution whose variance is given by the current temperatures. Higher temperatures translate to high levels of exploration, which can be useful for non-convex optimization. The temperature_cost parameter can be set independently of the temperatures, and controls the overall greediness of each update. A high temperature_cost allows the optimizer to accept updates which do not immediately improve the cost. Both temperatures and the temperature_cost automatically decay between iterations. Note that you must pass a non-empty list of results in the input to the initial step when using this optimizer. For more information on this method see simulated annealing on Wikipedia.

  • bounds (List[qctrl.dynamic.types.closed_loop_optimization_step.BoxConstraint]) – The per-parameter bounds on the test points. These bounds must be in the same order as parameters in CostFunctionResult. The bounds are defined by imposing a box constraint on each individual parameter. By default these constraints are non-periodic, that is, for each parameter \(x_j\), the optimizer is only allowed to search the next test point subject to the constraint such that \(x^{\rm lower}_j \leq x_j \leq x^{\rm upper}_j\). If you choose these constraints to be periodic, points sampled outside the bounds are wrapped back into the bounds by considering the box contraints to infinitely tile the parameter space.

  • temperatures (List[float]) – The initial per-parameter annealing temperatures \(T_0\) used to generate new test points. The per-parameter adjustments from the current test point are sampled from Cauchy distributions with scales given by temperatures. The temperatures are currently implemented to decay such that each temperature at the \(k\)-th step is set according to \(T_k = \frac{T_0}{1 + k}\).

  • temperature_cost (float) – The parameter for controlling the optimizer’s greediness. A high cost temperature allows the optimizer to explore test points which may not immediately improve the cost. A higher level of exploration can be helpful for more difficult optimization problems. The temperature_cost is set to decay according to the same schedule as temperatures.

  • seed (int, optional) – Seed for the random number generator. If set, must be non-negative. Use this option to generate deterministic results from the optimizer.

  • rng_seed (int, optional) – This parameter will be removed, please use seed instead.