ApproximatingObjective#

class qiskit.transpiler.synthesis.aqc.ApproximatingObjective[ソース]#

ベースクラス: 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

abstract gradient(param_values)[ソース]#

Computes a gradient with respect to parameters given a vector of parameter values.

パラメータ:

param_values (ndarray) – a vector of parameter values for the optimization problem.

戻り値:

an array of gradient values.

戻り値の型:

ndarray

abstract objective(param_values)[ソース]#

Computes a value of the objective function given a vector of parameter values.

パラメータ:

param_values (ndarray) – a vector of parameter values for the optimization problem.

戻り値:

a float value of the objective function.

戻り値の型:

SupportsFloat