dwavesystems / dwavesystems/minorminer
Allow finding imbalanced chain embedding.
- Dominant language
- Python
- Stars
- 54
- Forks
- 48
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 1
Description
**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:
``` python
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`**
``` python
_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()}}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.