neurop.base.BaseProblem

class neurop.base.BaseProblem(initializer)

Bases: object

Base class to define an optimization problem that can be solved via QUBO. This class acts as an interface, and its methods should be implemented by derived classes.

For derived classes, implement the following methods:

__init__(initializer) None

Methods

__init__(initializer)

evaluate_constraints(params)

Evaluates the constraints of the problem for a given set of (binary) parameter values.

evaluate_objective(params)

Evaluates the objective function of the problem for a given set of (binary) parameter values.

evaluate_constraints(params: ndarray) Iterable[bool]

Evaluates the constraints of the problem for a given set of (binary) parameter values.

evaluate_objective(params: ndarray) float

Evaluates the objective function of the problem for a given set of (binary) parameter values.