embed

embed(
poly: Poly,
client_graph: Graph,
embedding_method: Literal['Default', 'Minor', 'Clique', 'Parallel'] | EmbeddingMethod = EmbeddingMethod.Default,
embedding_timeout: timedelta = datetime.timedelta(seconds=10),
chain_strength: float = 1.0,
) tuple[amplify.Poly, list[numpy.ndarray[dtype=uint32]], list[tuple[int, int]]]

Perform graph embedding and return embedding information.

Take a Poly and a Graph, and return a tuple containing the embedded polynomial, the embedding mapping, and the graph converted from the input polynomial.

パラメータ:
  • poly (Poly) -- Polynomial to embed.

  • client_graph (Graph) -- Physical graph of the target client.

  • embedding_method (Literal['Default', 'Minor', 'Clique', 'Parallel'] | amplify.EmbeddingMethod) -- Graph embedding algorithm. Defaults to EmbeddingMethod.Default.

  • embedding_timeout (timedelta) -- Timeout for graph embedding search. Defaults to datetime.timedelta(seconds=10).

  • chain_strength (float) -- Weight of the chain penalty added to the objective function. Defaults to 1.0.

戻り値:

Embedded polynomial, embedding chains, and graph representation of the input polynomial.

戻り値の型:

tuple[Poly, list[ndarray[dtype=uint32]], list[tuple[int, int]]]