Skip to main content
IBM Quantum Platform
이 페이지는 Qiskit SDK의 이전 버전입니다. 최신 버전으로 이동

ApproximatingObjective

class qiskit.synthesis.unitary.aqc.ApproximatingObjective

GitHub

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

ndarray

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

SupportsFloat

이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.