docs icon indicating copy to clipboard operation
docs copied to clipboard

Add example of pre-computing an embedding

Open JoelPasvolsky opened this issue 5 years ago • 0 comments

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

JoelPasvolsky avatar Sep 04 '19 20:09 JoelPasvolsky