Portuguese
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

# GSLS¶

class GSLS(maxiter=10000, max_eval=10000, disp=False, sampling_radius=1e-06, sample_size_factor=1, initial_step_size=0.01, min_step_size=1e-10, step_size_multiplier=0.4, armijo_parameter=0.1, min_gradient_norm=1e-08, max_failed_rejection_sampling=50)[código fonte]

Bases: `Optimizer`

Gaussian-smoothed Line Search.

An implementation of the line search algorithm described in https://arxiv.org/pdf/1905.01332.pdf, using gradient approximation based on Gaussian-smoothed samples on a sphere.

Nota

This component has some function that is normally random. If you want to reproduce behavior then you should set the random number generator seed in the algorithm_globals (`qiskit.utils.algorithm_globals.random_seed = seed`).

Parâmetros
• maxiter (int) – Maximum number of iterations.

• max_eval (int) – Maximum number of evaluations.

• disp (bool) – Set to True to display convergence messages.

• sample_size_factor (int) – The size of the sample set at each iteration is this number multiplied by the dimension of the problem, rounded to the nearest integer.

• initial_step_size (float) – Initial step size for the descent algorithm.

• min_step_size (float) – Minimum step size for the descent algorithm.

• step_size_multiplier (float) – Step size reduction after unsuccessful steps, in the interval (0, 1).

• armijo_parameter (float) – Armijo parameter for sufficient decrease criterion, in the interval (0, 1).

• min_gradient_norm (float) – If the gradient norm is below this threshold, the algorithm stops.

• max_failed_rejection_sampling (int) – Maximum number of attempts to sample points within bounds.

Methods

 `get_support_level` Return support level dictionary. `gradient_approximation` Construct gradient approximation from given sample. `gradient_num_diff` We compute the gradient with the numeric differentiation in the parallel way, around the point x_center. `ls_optimize` Run the line search optimization. `minimize` Minimize the scalar function. `print_options` Print algorithm-specific options. `sample_points` Sample `num_points` points around `x` on the `n`-sphere of specified radius. `sample_set` Construct sample set of given size. `set_max_evals_grouped` Set max evals grouped `set_options` Sets or updates values in the options dictionary. `wrap_function` Wrap the function to implicitly inject the args at the call of the function.

Attributes

bounds_support_level

Returns bounds support level

initial_point_support_level

Returns initial point support level

is_bounds_ignored

Returns is bounds ignored

is_bounds_required

Returns is bounds required

is_bounds_supported

Returns is bounds supported

is_initial_point_ignored

Returns is initial point ignored

is_initial_point_required

Returns is initial point required

is_initial_point_supported

Returns is initial point supported

setting

Return setting

settings