Model¶

class Model¶

Methods

__init__

__init__

copy

copy

get_variables

get_variables

to_intermediate_model

to_intermediate_model

to_unconstrained_poly

to_unconstrained_poly

Attributes

constraints

constraints property

objective

objective property

variables

alias of ~amplify.Model.get_variables

__add__(self, arg: Poly | Constraint | ConstraintList, /) Model¶

__add__

パラメータ:

arg (Poly | Constraint | ConstraintList) --

戻り値の型:

Model

__eq__(self, arg: Model, /) bool¶

__eq__

パラメータ:

arg (Model) --

戻り値の型:

bool

__iadd__(self, arg: Poly | Constraint | ConstraintList, /) Model¶

__iadd__

パラメータ:

arg (Poly | Constraint | ConstraintList) --

戻り値の型:

Model

__init__(self) None¶
__init__(self, objective: Poly | Matrix) None
__init__(self, constraint: Constraint | ConstraintList) None
__init__(self, objective: Poly | Matrix, constraint: Constraint | ConstraintList) None

__init__

Overloading:

2. __init__(self, objective: Union[amplify.Poly, amplify.Matrix]) -> None

Args:
  • objective (amplify.Poly | amplify.Matrix):

3. __init__(self, constraint: Union[amplify.Constraint, amplify.ConstraintList]) -> None

Args:
  • constraint (amplify.Constraint | amplify.ConstraintList):

4. __init__(self, objective: Union[amplify.Poly, amplify.Matrix], constraint: Union[amplify.Constraint, amplify.ConstraintList]) -> None

Args:
  • objective (amplify.Poly | amplify.Matrix):

  • constraint (amplify.Constraint | amplify.ConstraintList):

__isub__(self, arg: Poly, /) Model¶

__isub__

パラメータ:

arg (Poly) --

戻り値の型:

Model

__ne__(self, arg: Model, /) bool¶

__ne__

パラメータ:

arg (Model) --

戻り値の型:

bool

__radd__(self, arg: Poly | Constraint | ConstraintList, /) Model¶

__radd__

パラメータ:

arg (Poly | Constraint | ConstraintList) --

戻り値の型:

Model

__repr__(self) str¶

__repr__

戻り値の型:

str

__str__(self) str¶

__str__

戻り値の型:

str

__sub__(self, arg: Poly, /) Model¶

__sub__

パラメータ:

arg (Poly) --

戻り値の型:

Model

copy(self) Model¶

copy

戻り値の型:

Model

get_variables(self, with_penalty: bool = False) list[Variable]¶

get_variables

パラメータ:

with_penalty (bool) -- Defaults to False.

戻り値の型:

list[Variable]

to_intermediate_model(
self,
acceptable_degrees: AcceptableDegrees,
integer_encoding_method: str | IntegerEncodingMethod = Default,
quadratization_method: str | QuadratizationMethod = IshikawaKZFD,
substitution_multiplier: float = 1.0,
) tuple[Model, IntermediateMapping]¶

to_intermediate_model

パラメータ:
戻り値の型:

tuple[Model, IntermediateMapping]

to_unconstrained_poly(self) Poly¶

to_unconstrained_poly

戻り値の型:

Poly

property constraints¶

constraints property

戻り値の型:

ConstraintList

property objective¶

objective property

戻り値の型:

Poly | Matrix

property variables¶

alias of ~amplify.Model.get_variables

戻り値の型:

list[Variable]