quantum_launcher.problems.problem_initialization.graph_coloring#
This module contains the Graph Coloring class.
Summary#
Classes:
Class for Graph Coloring Problem which is a combinatorial problem involving assigning labels to vertices of the graph such that no two adjacent vertices share the same label. |
Reference#
- class quantum_launcher.problems.problem_initialization.graph_coloring.GraphColoring(instance: Graph, num_colors: int, instance_name: str = 'unnamed')[source]#
Bases:
Problem
Class for Graph Coloring Problem which is a combinatorial problem involving assigning labels to vertices of the graph such that no two adjacent vertices share the same label.
- instance#
The graph for which the coloring problem is to be solved.
- Type:
nx.Graph
- property setup: dict#
- static from_preset(instance_name: str) GraphColoring [source]#
- static from_file(path: str) GraphColoring [source]#
- static generate_graph_coloring_instance(num_vertices: int, edge_probability: int, num_colors: int) GraphColoring [source]#
- static randomly_choose_a_graph(num_colors: int) GraphColoring [source]#