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,
Perform graph embedding and return embedding information.
Take a
Polyand aGraph, and return a tuple containing the embedded polynomial, the embedding mapping, and the graph converted from the input polynomial.- Parameters:
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.
- Returns:
Embedded polynomial, embedding chains, and graph representation of the input polynomial.
- Return type:
tuple[Poly, list[ndarray[dtype=uint32]], list[tuple[int, int]]]