qiskit.algorithms.optimizers.GSLS.gradient_approximation¶
- GSLS.gradient_approximation(n, x, x_value, directions, sample_set_x, sample_set_y)[소스]¶
Construct gradient approximation from given sample.
- 매개변수
n (
int
) – Dimension of the problem.x (
ndarray
) – Point around which the sample set was constructed.x_value (
float
) – Objective function value at x.directions (
ndarray
) – Directions of the sample points wrt the central point x, as a 2D array.sample_set_x (
ndarray
) – x-coordinates of the sample set, one point per row, as a 2D array.sample_set_y (
ndarray
) – Objective function values of the points in sample_set_x, as a 1D array.
- 반환 형식
ndarray
- 반환
Gradient approximation at x, as a 1D array.