solve

solve(
model: Model | Poly | Matrix | Constraint | ConstraintList,
client: amplify._AmplifyClient,
*,
dry_run: Literal[False] = False,
integer_encoding_method: Literal['Unary', 'Linear', 'Binary', 'Default'] | IntegerEncodingMethod = IntegerEncodingMethod.Default,
real_encoding_method: Literal['Random4', 'Random8', 'Random16', 'Random32'] | RealEncodingMethod = RealEncodingMethod.Random16,
quadratization_method: Literal['IshikawaKZFD', 'Substitute'] | QuadratizationMethod = QuadratizationMethod.IshikawaKZFD,
substitution_multiplier: float = 1.0,
embedding_method: Literal['Default', 'Minor', 'Clique', 'Parallel'] | EmbeddingMethod = EmbeddingMethod.Default,
embedding_timeout: float | timedelta = 10.0,
chain_strength: float = 1.0,
num_solves: int = 1,
filter_solution: bool = True,
sort_solution: bool = True,
) Result[amplify._AmplifyClient]
solve(
model: Model | Poly | Matrix | Constraint | ConstraintList,
client: AmplifyClient,
*,
dry_run: Literal[True],
integer_encoding_method: Literal['Unary', 'Linear', 'Binary', 'Default'] | IntegerEncodingMethod = IntegerEncodingMethod.Default,
real_encoding_method: Literal['Random4', 'Random8', 'Random16', 'Random32'] | RealEncodingMethod = RealEncodingMethod.Random16,
quadratization_method: Literal['IshikawaKZFD', 'Substitute'] | QuadratizationMethod = QuadratizationMethod.IshikawaKZFD,
substitution_multiplier: float = 1.0,
embedding_method: Literal['Default', 'Minor', 'Clique', 'Parallel'] | EmbeddingMethod = EmbeddingMethod.Default,
embedding_timeout: float | timedelta = 10.0,
chain_strength: float = 1.0,
num_solves: int = 1,
filter_solution: bool = True,
sort_solution: bool = True,
) Result

solve

Overload 1.

Args:
  • model (amplify.Model | amplify.Poly | amplify.Matrix | amplify.Constraint | amplify.ConstraintList)

  • client (amplify._AmplifyClient)

  • dry_run (typing.Literal[False]): Defaults to False.

  • integer_encoding_method (typing.Literal[‘Unary’, ‘Linear’, ‘Binary’, ‘Default’] | amplify.IntegerEncodingMethod): Defaults to IntegerEncodingMethod.Default.

  • real_encoding_method (typing.Literal[‘Random4’, ‘Random8’, ‘Random16’, ‘Random32’] | amplify.RealEncodingMethod): Defaults to RealEncodingMethod.Random16.

  • quadratization_method (typing.Literal[‘IshikawaKZFD’, ‘Substitute’] | amplify.QuadratizationMethod): Defaults to QuadratizationMethod.IshikawaKZFD.

  • substitution_multiplier (float): Defaults to 1.0.

  • embedding_method (typing.Literal[‘Default’, ‘Minor’, ‘Clique’, ‘Parallel’] | amplify.EmbeddingMethod): Defaults to EmbeddingMethod.Default.

  • embedding_timeout (float | datetime.timedelta): Defaults to 10.0.

  • chain_strength (float): Defaults to 1.0.

  • num_solves (int): Defaults to 1.

  • filter_solution (bool): Defaults to True.

  • sort_solution (bool): Defaults to True.

Returns:

amplify.Result[amplify._AmplifyClient]:

Overload 2.

Args:
  • model (amplify.Model | amplify.Poly | amplify.Matrix | amplify.Constraint | amplify.ConstraintList)

  • client (amplify.AmplifyClient)

  • dry_run (typing.Literal[True])

  • integer_encoding_method (typing.Literal[‘Unary’, ‘Linear’, ‘Binary’, ‘Default’] | amplify.IntegerEncodingMethod): Defaults to IntegerEncodingMethod.Default.

  • real_encoding_method (typing.Literal[‘Random4’, ‘Random8’, ‘Random16’, ‘Random32’] | amplify.RealEncodingMethod): Defaults to RealEncodingMethod.Random16.

  • quadratization_method (typing.Literal[‘IshikawaKZFD’, ‘Substitute’] | amplify.QuadratizationMethod): Defaults to QuadratizationMethod.IshikawaKZFD.

  • substitution_multiplier (float): Defaults to 1.0.

  • embedding_method (typing.Literal[‘Default’, ‘Minor’, ‘Clique’, ‘Parallel’] | amplify.EmbeddingMethod): Defaults to EmbeddingMethod.Default.

  • embedding_timeout (float | datetime.timedelta): Defaults to 10.0.

  • chain_strength (float): Defaults to 1.0.

  • num_solves (int): Defaults to 1.

  • filter_solution (bool): Defaults to True.

  • sort_solution (bool): Defaults to True.

Returns:

amplify.Result: