Problems¶
QAOA and related solvers accept a QAOAProblem
instance that encapsulates the optimization objective, mixer, initial state,
and solution decoding. Divi provides concrete classes for common graph and
binary optimization problems.
divi.qprog.problems Package¶
Functions¶
|
Compute the binary encoding layout. |
|
Validate that adjacency matrix M is a valid matching in graph A. |
|
Generate a QUBO for TSP with a fixed start city. |
|
Return the block structure for CVRP CE-QAOA. |
|
Visualize a graph with solution nodes highlighted. |
|
Draw a graph with nodes colored by partition. |
|
Check that no node appears in more than one selected edge. |
|
Check if a bitstring represents a valid TSP tour. |
|
Parse a TSPLIB/CVRPLIB format .vrp or .tsp file. |
|
Parse a CVRPLIB solution file. |
|
Compute the total travel cost of a tour. |
Classes¶
|
Configuration for binary-encoded CE-QAOA blocks. |
|
Generic QUBO or HUBO problem for QAOA. |
|
Capacitated Vehicle Routing Problem for QAOA. |
|
Configuration for graph partitioning algorithms. |
|
Max clique problem on a graph. |
|
MaxCut problem on a graph. |
|
Max independent set problem on a graph. |
|
Max weight cycle problem on a directed graph. |
|
Maximum-weight matching problem for QAOA. |
|
Min vertex cover problem on a graph. |
Base class for all QAOA-compatible problems. |
|
|
Parsed VRP/TSP instance data. |
|
Traveling Salesman Problem for QAOA. |