dwavesystems / dwavesystems/docs

Add example of pre-computing an embedding

Open
#67 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
49
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Request from Cathy, "Hey tools support, novice user here(!) Each QPU has a largest clique that can be embedded in the working graph -- is that clique pre-computed and available to me through ocean? I would like to avoid using a bunch of trial-and-error calls to MinorMiner to find the embedding."

Add to somewhere like https://docs.ocean.dwavesys.com/en/latest/examples/topology_samplers.html#topology-samplers an example like:

from dwave.system import DWaveSampler, FixedEmbeddingComposite
from dwave.embedding.chimera import find_clique_embedding

qpu = DWaveSampler(solver=dict(qpu=True))

embedding = find_clique_embedding(K, 16, target_edges=qpu.edgelist)

sampler = FixedEmbeddingComposite(qpu, embedding)

sampleset = sampler.sample_ising(h, J)
print(sampleset)

CC @arcondello

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.