About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
ApproximatingObjective
class qiskit.synthesis.unitary.aqc.ApproximatingObjective
Bases: ABC
A base class for an optimization problem definition. An implementing class must provide at least an implementation of the objective
method. In such case only gradient free optimizers can be used. Both method, objective
and gradient
, preferable to have in an implementation.
Attributes
num_thetas
Returns: the number of parameters in this optimization problem.
target_matrix
Returns: a matrix being approximated
Methods
gradient
abstract gradient(param_values)
Computes a gradient with respect to parameters given a vector of parameter values.
Parameters
param_values (ndarray) – a vector of parameter values for the optimization problem.
Returns
an array of gradient values.
Return type
objective
abstract objective(param_values)
Computes a value of the objective function given a vector of parameter values.
Parameters
param_values (ndarray) – a vector of parameter values for the optimization problem.
Returns
a float value of the objective function.
Return type
Was this page helpful?
Report a bug or request content on GitHub.