2
$\begingroup$

While trying to understand the graph coloring problem with VQE using the QUBO Formulation mentioned section "5.2 Graph Coloring". Mentioned article prepared the QUBO directly in to matrix form as shown below. But would like to achieve through the python code.

QUBO Matrix

My query: What shall be the initial matrix we need to consider? ex: all zero or all one's

I am assuming shall look like linear_term * x + xT * qudratic_term * x. if there is better approach please do share.

I am able to get solution with the hard coded matrix as mentioned in the paper using VQE. But i want to try with the python code for the matrix part.

And graph part as shown below

G = nx.Graph()
G.add_nodes_from([1, 2, 3, 4, 5])
G.add_edges_from([(1, 2), (1, 5), (2, 3), (2, 4), (2, 5), (3, 4), (4, 5)])
nx.draw(G, with_labels=True)

Please share the hints or reference for further explore.

Thank you

$\endgroup$
3
  • 1
    $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Dec 16, 2021 at 13:25
  • $\begingroup$ not able to delete the post due to a non registered user. So deleted the content.. Thanks for replying $\endgroup$
    – Ket
    Dec 16, 2021 at 16:52
  • 1
    $\begingroup$ @Ket why do you want to delete the post? $\endgroup$ Dec 16, 2021 at 18:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.