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)[source]¶ Bases:
qiskit.algorithms.optimizers.optimizer.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.
Note
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
).- Parameters
maxiter (
int
) – Maximum number of iterations.max_eval (
int
) – Maximum number of evaluations.disp (
bool
) – Set to True to display convergence messages.sampling_radius (
float
) – Sampling radius to determine gradient estimate.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
Return support level dictionary.
Construct gradient approximation from given sample.
We compute the gradient with the numeric differentiation in the parallel way, around the point x_center.
Run the line search optimization.
Perform optimization.
Print algorithm-specific options.
Sample
num_points
points aroundx
on then
-sphere of specified radius.Construct sample set of given size.
Set max evals grouped
Sets or updates values in the options dictionary.
Wrap the function to implicitly inject the args at the call of the function.
Attributes
-
bounds_support_level
¶ Returns bounds support level
-
gradient_support_level
¶ Returns gradient 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_gradient_ignored
¶ Returns is gradient ignored
-
is_gradient_required
¶ Returns is gradient required
-
is_gradient_supported
¶ Returns is gradient 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
¶ - Return type
Dict
[str
,Any
]