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.
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