MissingChainError
I'm tryin to use tilling composite for a problem with a size of 36 variables, but I get the following error:
h,j=Opt(H,Y)
c6 = chimera_graph(9)
embedding_c6 = find_clique_embedding(36, c6)
qpu = DWaveSampler( solver={'topology__type': 'chimera'})
sampler = FixedEmbeddingComposite(TilingComposite(qpu, 9, 9), embedding=embedding_c6)
sampleset = sampler.sample_ising(h,j, num_reads=1000)
MissingChainError: chain for 0 is empty or not contained in this embedding
Comments
Hi maw,
Based on the error message, it seems like the variable label in the returned embedding are different from the variable label in your input(h & j). But it is difficult to be sure without looking at the problem.
Would you mind sharing the input values(h & j)?
Getting more information about the problem might help me understand the issue better.
Hi Tavi,
Thanks for your response!
Here are the input values:
Hi maw,
Thank you for sharing the input.
It is indeed the case that the variable labels in the returned embedding(0,1,..) are different than the variable labels in the input('0','1',..). This is because the code above is generating the embedding for a graph with 36 nodes which by default get labels(0,1,..).
To resolve the above error, you need to generate the embedding for variables in your input instead.
Here is a code snippet on how you can do that:
I hope this helps!
Please sign in to leave a comment.