Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow finding imbalanced chain embedding. #185

Open
joseppinilla opened this issue Aug 30, 2021 · 0 comments
Open

Allow finding imbalanced chain embedding. #185

joseppinilla opened this issue Aug 30, 2021 · 0 comments

Comments

@joseppinilla
Copy link
Contributor

Feature Request
The biclique embedding method in busgraph_cache doesn't provide an option for chain_imbalance=(None or int) like the one found in the polynomialembedder for tightestNativeBiClique and largestNativeBiClique. The new feature would allow:

P = 6
M,N = 4,32
G = dnx.pegasus_graph(P)
cache = minorminer.busclique.busgraph_cache(G)
embedding = cache.find_biclique_embedding(M,N,chain_imbalance=None)

The alternative right now means that the cache functionality and faster implementation in busgraph is only limited to balanced chains. And this is how it would look for Pegasus.

Using polynomialembedder

_embedder, _converter = helper(P, G)
helper = minorminer.utils.pegasus._pegasus_fragment_helper
_left,_right = _embedder.tightestNativeBiClique(M,N,chain_imbalance=None)
left,right = _converter(range(M),_left),_converter(range(N),_right)
embedding = {**left,**{k+M:v for k,v in right.items()}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant