# Use an embedded complete graph as the starting graph for minorminer embedding

In my problem, there are 41 logical qubits and they do not form a complete graph. However, assuming that they form a complete graph, I used find_clique_embedding:

embedding = find_clique_embedding(k=41,m=16,target_edges=DW_target_edgelist)

Now since my actual graph is not complete, I want to supply the embedding above for minorminer.find_embedding as the starting graph so that the max chain length can be reduced further. How can I do that? I checked the documentation:

I think I somehow have to make the embedding as

initial_chains

but I am still not sure is this right and what is the specific format for initial_chains.

## Comments

David J(Report)Hello,

You can run the above described example like this:

Here are the results I got:

Output:

As you can see, some of the chains are indeed shorter.

That said, I don't believe this stops the graph from using other nodes not included in the initial clique, though it does come close.

Also note that you will need to choose a clique embedding that is the right size, in this case 7, to account for all of the nodes in the graph, in this case nodes 0 to 6 (there are 7 of them).

This is one way of finding an embedding, but it seems like you might be better off just using the minorminer.find_embedding function.

You would just run it like:

This would not allow you to define the starting graph nodes though, so the first method gives you a little more control over that.

It is also probably not possible to reduce chain lengths of a clique embedding without some shifting, as the middle link of a chain might be the "extra" qubit.

Since this qubit then just acts as a means of the outer qubits to be coherent with one another, the best way would be to get rid of it, but then you would need to connect the outer qubits to each other, which would require some shifting.

Understandably, this is a lot of information and I am making some assumptions, so I will stop here for now.

Please let us know if you need any further clarification or guidance.

Hoa T(Report)Thank you for your detailed explanation. I do not quite understand the shifting you mentioned but I will think more about that.

David J(Report)The shifting I mentioned is just referring to how some chains have completely different qubit numbers in them after the find_embedding call compared to the clique_embedding.

Some have none of the same qubits, while some have all of the same qubits.

Taking excerpts from the above embedding

Compared to:

I hope this makes sense.

Please sign in to leave a comment.