Problem in finding embedding in Chimera
Hi everyone!
I was trying to find a 6 node clique using
find_clique_embedding
but the suggested qubits are not coupled.This is the code:
>>> from dwave.embedding.chimera import find_clique_embedding
>>> embedding = find_clique_embedding(6, 2, 2)
>>> embedding
{0: [4, 0, 16], 1: [5, 1, 17], 2: [6, 2, 18], 3: [7, 3, 19], 4: [20, 28, 24], 5: [21, 29, 25]}
and this is the error after using these qubits:
ValueError: {0, 16, 4} is not a connected chain
and these qubits are not really connected due to the image of chimera graph.
Another problem that I had was that when I tried to find a 6 node clique myself by looking at the chimera graph image,
I could find these qubits:
1:[0] , 2:[4,1,12], 3:[5,2,13], 4:[6,3,14], 5:[7,15], 6:[8,32,36,28,24]
but again I got the error that no edge is attributed between 1 and 6 which was really surprising for me!
thanks for your help in advance
Comments
Hello,
I am assuming you are just passing the clique embedding into the QPU directly.
This example is basically treating the 2 unit cell by 2 unit cell clique embedding as though it is all of the qubits in the whole graph.
This means that the numbering will be off in relation to the QPU, since the second row of tiles on the current QPU would start with 128, instead of 16, which is what is trying to happen with the supposed connection between 0 and/or 4 and 16.
To remedy this, you can either find a clique using the size of the QPU, embedding the clique only once:
Or alternatively, you can tile this clique embedding across the QPU using the TileEmbedding, and embed multiple instances, like this:
Here is a link to the documentation on the TilingComposite:
https://docs.ocean.dwavesys.com/projects/system/en/latest/reference/composites.html#tilingcomposite
I hope that was helpful!
Please let us know if you have any more questions or need some clarification.
There are a few layers to this problem, so it takes a bit of brain abstraction and lateral movement to see what is going on here.
Please sign in to leave a comment.