get_hardware_adjacency method
Hi,
Can anyone tell me where get_hardware_adjacency() method is defined.
My code looks like this ...
-------------------------------------------------------------------------
from dwave_sapi2.util import get_hardware_adjacency
from dwave_sapi2.embedding import find_embedding
A = get_hardware_adjacency(solver_c16)
embeddings = find_embedding(S, A, verbose=1)
-------------------------------------------------------------------------
As dwave_sapi2 is not available I was looking around and I could find find_embedding in minorminer
so I can write
------------------------------------------------------
from minorminer import find_embedding
-------------------------------------------------------
But I am unable to find the module/package in python for get_hardware_adjacency
Any idea where it is? Is there an alternative way to get the adjacency?
Regards,
Manoj
Comments
Try something like this:
See this page for more info:
https://docs.ocean.dwavesys.com/en/stable/docs_system/reference/generated/dwave.system.samplers.DWaveSampler.structure.html
Let me know if this helps.
Thank you, Thomas!
Manoj, see also .edgelist in DWaveSampler:
https://docs.ocean.dwavesys.com/projects/system/en/stable/reference/generated/dwave.system.samplers.DWaveSampler.edgelist.html
This will return a list of active couplers.
Fiona
Thanks Thomas, Fiona,
My new code looks like this now
--------------------------------------------------------------------------
from dwave.system.samplers import DWaveSampler
from minorminer import find_embedding
sampler = DWaveSampler()
A = sampler.structure.edgelist
embeddings = find_embedding(S, A, verbose=1)
--------------------------------------------------------------------------
Manoj
Please sign in to leave a comment.