Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.algorithms.optimizers.SPSA.optimize

SPSA.optimize(num_vars, objective_function, gradient_function=None, variable_bounds=None, initial_point=None)[source]

Perform optimization.

0.21.0 ভার্সন থেকে ডেপ্রিকেটেড: The method qiskit.algorithms.optimizers.spsa.SPSA.optimize() is deprecated as of qiskit-terra 0.21.0. It will be removed no earlier than 3 months after the release date. Instead, use SPSA.minimize as a replacement, which supports the same arguments but follows the interface of scipy.optimize and returns a complete result object containing additional information.

প্যারামিটার
  • num_vars (int) -- Number of parameters to be optimized.

  • objective_function (callable) -- A function that computes the objective function.

  • gradient_function (callable) -- Not supported for SPSA.

  • variable_bounds (list[(float, float)]) -- Not supported for SPSA.

  • initial_point (numpy.ndarray[float]) -- Initial point.

রিটার্নস

point, value, nfev

point: is a 1D numpy.ndarray[float] containing the solution value: is a float with the objective function value nfev: number of objective function calls made if available or None

রিটার্ন টাইপ

tuple