What might be causing 'embedding_context' to not appear in the output of EmbeddingComposite?

Hi,  I have some code that samples using EmbeddingComposite:  

 # Q is a sparse matrix 
Q = {(0, 1): 1,
    (1, 2): 2,
   (0, 2): -1}
   # Create the Binary Quadratic Model (BQM) from the QUBO
   bqm = dimod.BinaryQuadraticModel.from_qubo(Q)
    sampler = DWaveSampler(<token>)
    # Wrap the sampler with EmbeddingComposite to handle the embedding process automatically
    composite_sampler = EmbeddingComposite(sampler)
   # Submit the problem and get the response
    response = composite_sampler.sample(bqm)   
    embedding_response = response.info['embedding_context'] ['embedding']

I would have expected this to work, since this is the command I've used for previous versions of all of the DWave packages.  However, it returns the following:  

KeyError: 'embedding_context'  

I'm using the following versions: 

print(dimod.__version__) 
print(dwave.system.__version__)
print(dwave.samplers.__version__)
0.12.17 
1.26.0 
1.3.0

Is there anything that might be causing 'embedding_context' to no longer appear as a field in `response.info`?  Thank you. 

0

Comments

2 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post