qat.generators.GraphPartitioningGenerator
- class qat.generators.GraphPartitioningGenerator(job_type='qaoa')
Specialization of the CombinatorialOptimizerGenerator class for generator that solves the Graph Partitioning problem
- Parameters
job_type (str) – The job type of the batches to be generated. Can be either “qaoa”, “aqo” or “sqa”
- generate(specs, graph, A, B=1, **kwargs)
Generate a batch that solves the Graph Partitioning problem on a particular graph. The batch can then be sent to a computational stack of plugins and QPU to be executed. The result will be parsed into
GraphPartitioningResult
that contains interpretable information- Parameters
specs (
HardwareSpecs
) – will be used to run the jobgraph (networkx.Graph) – a networkx graph to run the Graph Partitioning algorithm on
A (double) – a positive constant by which the terms inside \(H_A\) from \(H = H_A + H_B\) are multiplied. This equation comes from the Hamiltonian representation of the problem.
B (double, optional) – similar to \(A\), \(B\) is a positive factor for the \(H_B\) terms, default is 1
- Returns
A parsed result of combinatorial optimization problem
- Return type