Embedding#
Provides functions that map binary quadratic models (BQM) and samples between a source graph and a target graph.
Embedding#
For an introduction to minor-embedding, see the Minor Embedding section.
Find Generic Embeddings#
minorminer is a heuristic tool for minor embedding: given a minor and target graph, it tries to find a mapping that embeds the minor into the target.
|
Heuristically attempt to find a minor-embedding of source graph S into a target graph T. |
Find QPU Embeddings#
Minor-embedding in target graphs with Chimera, Pegasus, and Zephyr topology.
|
Find an embedding for a clique in a Chimera graph. |
|
Find an embedding for a biclique in a Chimera graph. |
|
Find an embedding for a grid in a Chimera graph. |
|
Find an embedding for a clique in a Pegasus graph. |
|
Find an embedding for a biclique in a Pegasus graph. |
|
Find an embedding for a clique in a Zephyr graph. |
|
Find an embedding for a biclique in a Zephyr graph. |
Embed Problems#
|
Embed a binary quadratic model onto a target graph. |
|
Embed an Ising problem onto a target graph. |
|
Embed a QUBO onto a target graph. |
Analyze Embeddings#
|
Diagnose a minor embedding. |
|
A simple (bool) diagnostic for minor embeddings. |
|
A simple (exception-raising) diagnostic for minor embeddings. |
Chain Strength#
Utility functions for calculating chain strength.
|
Set chain strength to compensate for chain-breaking torque. |
|
Set chain strength that is scaled to the problem's bias range. |
Helper Functions#
|
Convert an adjacency object to an edge iterator. |
|
Determine the quadratic biases that induce the given chain. |
|
Represent a binary quadratic model as a Chimera graph. |
|
Convert an iterator of edges to an adjacency dict. |
EmbeddedStructure Class#
|
Embedding structure for a target graph and minor embedding. |
For all properties and methods, see the
EmbeddedStructure class.
Iterate over edges contained in the chain for variable |
|
Return the chain strength selected for embedding. |
|
|
Embed a binary quadratic model onto a target graph. |
|
Iterate over edges between the chains for variables |
Maximum chain length in the embedding. |
Unembedding#
|
Unembed a sample set. |
Diagnose Chains#
|
Find the broken chains for the given samples. |
|
Determine the frequency of chain breaks in the given samples. |
Handle Broken Chains#
Unembedding samples with broken chains.
|
Discard broken chains. |
|
Unembed samples using the most common value for broken chains. |
|
Unembed samples by minimizing local energy for broken chains. |
|
Unembed samples using weighed random choice for broken chains. |
Helper Functions#
|
Derive the source adjacency from an embedding and target adjacency. |
Exceptions#
Base class for all embedding exceptions. |
|
|
Raised if a node in the source graph has no associated chain. |
|
Raised if two source nodes have an overlapping chain. |
|
Raised if a chain is not connected in the target graph. |
|
Raised if a chain contains a node not in the target graph. |
|
Raised when two source nodes sharing an edge to not have a corresponding edge between their chains. |