Japanese
言語
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.algorithms.optimizers.SPSA.calibrate

static SPSA.calibrate(loss, initial_point, c=0.2, stability_constant=0, target_magnitude=None, alpha=0.602, gamma=0.101, modelspace=False, max_evals_grouped=1)[ソース]

Calibrate SPSA parameters with a powerseries as learning rate and perturbation coeffs.

The powerseries are:

\[a_k = \frac{a}{(A + k + 1)^\alpha}, c_k = \frac{c}{(k + 1)^\gamma}\]
パラメータ
  • loss (Callable[[np.ndarray], float]) – The loss function.

  • initial_point (np.ndarray) – The initial guess of the iteration.

  • c (float) – The initial perturbation magnitude.

  • stability_constant (float) – The value of A.

  • target_magnitude (float | None) – The target magnitude for the first update step, defaults to \(2\pi / 10\).

  • alpha (float) – The exponent of the learning rate powerseries.

  • gamma (float) – The exponent of the perturbation powerseries.

  • modelspace (bool) – Whether the target magnitude is the difference of parameter values or function values (= model space).

  • max_evals_grouped (int) – The number of grouped evaluations supported by the loss function. Defaults to 1, i.e. no grouping.

戻り値

A tuple of powerseries generators, the first one for the

learning rate and the second one for the perturbation.

戻り値の型

tuple(generator, generator)