English
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.algorithms.optimizers.TNC.gradient_num_diff

static TNC.gradient_num_diff(x_center, f, epsilon, max_evals_grouped=None)

We compute the gradient with the numeric differentiation in the parallel way, around the point x_center.

Parameters
  • x_center (ndarray) – point around which we compute the gradient

  • f (func) – the function of which the gradient is to be computed.

  • epsilon (float) – the epsilon used in the numeric differentiation.

  • max_evals_grouped (int) – max evals grouped, defaults to 1 (i.e. no batching).

Returns

the gradient computed

Return type

grad