IterationResult¶

class IterationResult¶

Bases: NamedTuple

A class to represent the result of an iteration.

annealing_best_solution¶

The best solution found by the annealing process.

Type:

Solution

annealing_new_solution¶

The new (unique) solution found by the annealing process.

Type:

Solution | None

fallback_solution¶

The fallback solution if the annealing process did not find a new (unique) solution.

Type:

Solution | None

timing¶

The timing information for the iteration.

Type:

Timing | None

surrogate_model_info¶

Information about the surrogate model, such as correlation coefficients.

Type:

SurrogateModelInfo | None

amplify_result¶

The raw result from the Amplify SDK.

Type:

amplify.Result | None

Methods

__init__

count

Return number of occurrences of value.

index

Return first index of value.

Attributes

amplify_result

Alias for field number 5

annealing_best_solution

Alias for field number 0

annealing_new_solution

Alias for field number 1

fallback_solution

Alias for field number 2

surrogate_model_info

Alias for field number 4

timing

Alias for field number 3

class SurrogateModelInfo¶

Bases: NamedTuple

Information about the surrogate model.

corrcoef¶

Lower percentile correlation coefficients for the surrogate model.

Type:

dict[int, float]

__add__(value, /)¶

Return self+value.

__class_getitem__()¶

See PEP 585

__contains__(key, /)¶

Return key in self.

__eq__(value, /)¶

Return self==value.

__ge__(value, /)¶

Return self>=value.

__getattribute__(name, /)¶

Return getattr(self, name).

__getitem__(key, /)¶

Return self[key].

__getnewargs__()¶

Return self as a plain tuple. Used by copy and pickle.

__gt__(value, /)¶

Return self>value.

__hash__()¶

Return hash(self).

__iter__()¶

Implement iter(self).

__le__(value, /)¶

Return self<=value.

__len__()¶

Return len(self).

__lt__(value, /)¶

Return self<value.

__mul__(value, /)¶

Return self*value.

__ne__(value, /)¶

Return self!=value.

__repr__()¶

Return a nicely formatted representation string

__rmul__(value, /)¶

Return value*self.

count(value, /)¶

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)¶

Return first index of value.

Raises ValueError if the value is not present.

__match_args__ = ('corrcoef',)¶
__orig_bases__ = (<function NamedTuple>,)¶
__slots__ = ()¶
corrcoef: dict[int, float]¶

Alias for field number 0

class Timing¶

Bases: NamedTuple

A class to represent the timing information for an iteration.

training¶

Time taken for training the surrogate model.

Type:

float

minimization¶

Time taken for minimizing the surrogate model (annealing).

Type:

float

find_unique_solution¶

Time taken to find a unique solution.

Type:

float

fallback¶

Time taken for fallback solution generation.

Type:

float

update_dataset¶

Time taken to update the training dataset.

Type:

float

update_history¶

Time taken to update the optimization history.

Type:

float

__add__(value, /)¶

Return self+value.

__class_getitem__()¶

See PEP 585

__contains__(key, /)¶

Return key in self.

__eq__(value, /)¶

Return self==value.

__ge__(value, /)¶

Return self>=value.

__getattribute__(name, /)¶

Return getattr(self, name).

__getitem__(key, /)¶

Return self[key].

__getnewargs__()¶

Return self as a plain tuple. Used by copy and pickle.

__gt__(value, /)¶

Return self>value.

__hash__()¶

Return hash(self).

__iter__()¶

Implement iter(self).

__le__(value, /)¶

Return self<=value.

__len__()¶

Return len(self).

__lt__(value, /)¶

Return self<value.

__mul__(value, /)¶

Return self*value.

__ne__(value, /)¶

Return self!=value.

__repr__()¶

Return a nicely formatted representation string

__rmul__(value, /)¶

Return value*self.

count(value, /)¶

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)¶

Return first index of value.

Raises ValueError if the value is not present.

__match_args__ = ('minimization', 'training', 'find_unique_solution', 'fallback', 'update_dataset', 'update_history')¶
__orig_bases__ = (<function NamedTuple>,)¶
__slots__ = ()¶
fallback: float¶

Alias for field number 3

find_unique_solution: float¶

Alias for field number 2

minimization: float¶

Alias for field number 0

training: float¶

Alias for field number 1

update_dataset: float¶

Alias for field number 4

update_history: float¶

Alias for field number 5

__add__(value, /)¶

Return self+value.

__class_getitem__()¶

See PEP 585

__contains__(key, /)¶

Return key in self.

__eq__(value, /)¶

Return self==value.

__ge__(value, /)¶

Return self>=value.

__getattribute__(name, /)¶

Return getattr(self, name).

__getitem__(key, /)¶

Return self[key].

__getnewargs__()¶

Return self as a plain tuple. Used by copy and pickle.

__gt__(value, /)¶

Return self>value.

__hash__()¶

Return hash(self).

__iter__()¶

Implement iter(self).

__le__(value, /)¶

Return self<=value.

__len__()¶

Return len(self).

__lt__(value, /)¶

Return self<value.

__mul__(value, /)¶

Return self*value.

__ne__(value, /)¶

Return self!=value.

__repr__()¶

Return a nicely formatted representation string

__rmul__(value, /)¶

Return value*self.

count(value, /)¶

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)¶

Return first index of value.

Raises ValueError if the value is not present.

__match_args__ = ('annealing_best_solution', 'annealing_new_solution', 'fallback_solution', 'timing', 'surrogate_model_info', 'amplify_result')¶
__orig_bases__ = (<function NamedTuple>,)¶
__slots__ = ()¶
amplify_result: amplify.Result | None¶

Alias for field number 5

annealing_best_solution: Solution¶

Alias for field number 0

annealing_new_solution: Solution | None¶

Alias for field number 1

fallback_solution: Solution | None¶

Alias for field number 2

surrogate_model_info: SurrogateModelInfo | None¶

Alias for field number 4

timing: Timing | None¶

Alias for field number 3