Skip to content

Latest commit

 

History

History
21 lines (8 loc) · 947 Bytes

File metadata and controls

21 lines (8 loc) · 947 Bytes

Graph-Coloring-Using-Quantum-Computing

Solving the general planar graph colouring problem using Grover's Algorithm. The backtracking algorithm takes O(k^n) for k colours and n vertices while Grover's reduces this complexity to O(sqrt(k^n)) providing a quadratic speedup.

Given 4 nodes to be coloured using 4 colours, we represent each colour using 2 binary bits and build the quantum circuit to apply the Grover search algorithm for proper colouring.

image

We visualize the results in the histogram and look for the most likely outcomes which will give us the proper colouring of the graph:

download (7)

Finally, we convert the binary strings to the corresponding coloring. image