dwavesystems / minorminer

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.
https://docs.ocean.dwavesys.com/en/stable/docs_minorminer/source/sdk_index.html
Apache License 2.0
48 stars 40 forks source link

mine_clique_embeddings arguments appear to be ignored #222

Closed jackraymond closed 1 year ago

jackraymond commented 2 years ago

Description The behaviour of mine_clique_embeddings seems to be independent of the argument mask_bound, whereas we would expect the routine to become slower, and produce a higher quality cache (on average) when using large values.

To Reproduce qpu = DWaveSampler() G = qpu.to_networkx_graph()

BCquick = mine_clique_embeddings(G, mask_bound=1, heuristic_bound=0, num_seeds = 1) BCslow = mine_clique_embeddings(G, mask_bound=2**8, heuristic_bound=0, num_seeds = 1) In this second, case we anticipate a much slower search (learding order linear in mask_bound), but instead it is independent of this argument.

Workaround (suggested by @boothby)

minorminer.busclique.busgraph_cache.clear_all_caches() BCslow = mine_clique_embeddings(G, mask_bound=2**8, heuristic_bound=0, num_seeds = 1)

Expected behavior Runtime scales with mask_bound, quality of cache increases on average

Environment:

Additional context Add any other context about the problem here.