ResultΒΆ

class ResultΒΆ

Container of optimization solutions and conversion/runtime metadata.

Methods

__init__

sort

Sort solutions by feasibility and objective value.

Attributes

best

Best solution in the result set.

client_result

Solver/client result.

embedding

Graph embedding information.

execution_time

The time the solver used to solve the problem.

filter_solution

Whether to filter out infeasible solutions.

intermediate

Model conversion information.

num_solves

Number of solve executions aggregated.

response_time

The time between sending the request and receiving the response from the solver.

solutions

View of all solutions.

split

Split view for each independent solve.

total_time

Total time including conversion and solve.

class GraphConversionΒΆ

Graph embedding conversion details used during solving.

class ChainBreakFractionsΒΆ

List-like view of chain break fractions.

class IteratorΒΆ
__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__next__(self) floatΒΆ
Return type:

float

__bool__(self) boolΒΆ
Return type:

bool

__getitem__(self, key: int) floatΒΆ
Parameters:

key (int)

Return type:

float

__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__len__(self) intΒΆ
Return type:

int

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property chain_break_fractionsΒΆ

Chain break fraction for each solve.

Return type:

ChainBreakFractions

property chainsΒΆ

Embedding chains for each logical variable.

Return type:

list[ndarray[dtype=uint32, writable=False]]

property dst_graphΒΆ

Destination (physical) graph used for embedding.

Return type:

Graph

property num_variablesΒΆ

Number of physical variables used after embedding.

Return type:

int

property polyΒΆ

Embedded polynomial.

Return type:

Poly

property src_graphΒΆ

Source (input polynomial) graph for embedding.

Return type:

list[tuple[int, int]]

property values_listΒΆ

Physical variable assignments for each solve.

Return type:

ValuesList

class ModelConversionΒΆ

Model conversion details used during solving.

class IntermediateMappingΒΆ

Mapping between original and intermediate variables during model conversion.

class ItemsViewΒΆ

View of key-value pairs in IntermediateMapping.

__bool__(self) boolΒΆ
Return type:

bool

__init__(*args, **kwargs)ΒΆ
__iter__(self) ItemsViewΒΆ
Return type:

ItemsView

__len__(self) intΒΆ
Return type:

int

__next__(self) tuple[Poly, Poly]ΒΆ
Return type:

tuple[Poly, Poly]

class KeysViewΒΆ

View of keys in IntermediateMapping.

__bool__(self) boolΒΆ
Return type:

bool

__contains__(self, arg: Poly, /) boolΒΆ
__contains__(self, arg: object, /) bool

__contains__

Overload 1.

Args:
  • arg (amplify.Poly)

Returns:

bool:

Overload 2.

Args:
  • arg (object)

Returns:

bool:

__init__(*args, **kwargs)ΒΆ
__iter__(self) KeysViewΒΆ
Return type:

KeysView

__len__(self) intΒΆ
Return type:

int

__next__(self) PolyΒΆ
Return type:

Poly

class ValuesViewΒΆ

View of values in IntermediateMapping.

__bool__(self) boolΒΆ
Return type:

bool

__init__(*args, **kwargs)ΒΆ
__iter__(self) ValuesViewΒΆ
Return type:

ValuesView

__len__(self) intΒΆ
Return type:

int

__next__(self) PolyΒΆ
Return type:

Poly

__bool__(self) boolΒΆ
Return type:

bool

__contains__(self, arg: Poly, /) boolΒΆ
__contains__(self, arg: object, /) bool

__contains__

Overload 1.

Args:
  • arg (amplify.Poly)

Returns:

bool:

Overload 2.

Args:
  • arg (object)

Returns:

bool:

__getitem__(self, arg: Poly, /) PolyΒΆ
Parameters:

arg (Poly)

Return type:

Poly

__init__(*args, **kwargs)ΒΆ
__iter__(self) KeysViewΒΆ
Return type:

KeysView

__len__(self) intΒΆ
Return type:

int

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

items(self) ItemsViewΒΆ
Return type:

ItemsView

keys(self) KeysViewΒΆ
Return type:

KeysView

values(self) ValuesViewΒΆ
Return type:

ValuesView

__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property mappingΒΆ

Mapping from input variables to intermediate expressions.

Return type:

IntermediateMapping

property modelΒΆ

Intermediate model.

Return type:

Model

property num_variablesΒΆ

Number of variables in the intermediate model.

Return type:

int

property values_listΒΆ

Intermediate variable assignments for each solve.

Return type:

ValuesList

class SolutionΒΆ

Single solution entry in Result.

__init__(*args, **kwargs)ΒΆ
__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

property feasibleΒΆ

Whether all constraints are satisfied.

Return type:

bool

property objectiveΒΆ

Objective function value.

Return type:

float

property timeΒΆ

Time at which the solver found this solution.

Return type:

timedelta

property valuesΒΆ

Variable assignments of the solution.

Return type:

Values

class SolutionListΒΆ

List-like view of solutions.

class IteratorΒΆ
__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__next__(self) SolutionΒΆ
Return type:

Solution

__bool__(self) boolΒΆ
Return type:

bool

__getitem__(self, key: int) SolutionΒΆ
Parameters:

key (int)

Return type:

Solution

__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__len__(self) intΒΆ
Return type:

int

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

class SplitViewΒΆ

List-of-list-like view of solutions that splits solutions by independent solves.

__bool__(self) boolΒΆ
Return type:

bool

__getitem__(self, key: int) ResultΒΆ
Parameters:

key (int)

Return type:

Result

__init__(*args, **kwargs)ΒΆ
__iter__(self) SplitViewΒΆ
Return type:

SplitView

__len__(self) intΒΆ
Return type:

int

__next__(self) ResultΒΆ
Return type:

Result

class ValuesListΒΆ

List-like view of value mappings for solutions.

class IteratorΒΆ
__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__next__(self) ValuesΒΆ
Return type:

Values

__bool__(self) boolΒΆ
Return type:

bool

__getitem__(self, key: int) ValuesΒΆ
Parameters:

key (int)

Return type:

Values

__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__len__(self) intΒΆ
Return type:

int

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

__class_getitem__()ΒΆ
__getitem__(self, key: int) SolutionΒΆ
Parameters:

key (int)

Return type:

Solution

__init__(*args, **kwargs)ΒΆ
__iter__(self) IteratorΒΆ
Return type:

Iterator

__len__(self) intΒΆ
Return type:

int

__repr__(self) strΒΆ
Return type:

str

__str__(self) strΒΆ
Return type:

str

sort(self) NoneΒΆ

Sort solutions by feasibility and objective value.

__nb_signature__ = 'class Result[_BaseClient]'ΒΆ
property bestΒΆ

Best solution in the result set.

Return type:

Solution

property client_resultΒΆ

Solver/client result.

Return type:

Result | Result | SampleSet | SampleSet | SampleSet | Result | Result | Result | Result | amplify.DASClient.Result | Result | object | None

property embeddingΒΆ

Graph embedding information.

Return type:

GraphConversion | None

property execution_timeΒΆ

The time the solver used to solve the problem.

Return type:

timedelta

property filter_solutionΒΆ

Whether to filter out infeasible solutions.

Return type:

bool

property intermediateΒΆ

Model conversion information.

Return type:

ModelConversion

property num_solvesΒΆ

Number of solve executions aggregated.

Return type:

int

property response_timeΒΆ

The time between sending the request and receiving the response from the solver.

Return type:

timedelta

property solutionsΒΆ

View of all solutions.

Return type:

SolutionList

property splitΒΆ

Split view for each independent solve.

Return type:

SplitView

property total_timeΒΆ

Total time including conversion and solve.

Return type:

timedelta