qat.generators.KCliqueGenerator
- class qat.generators.KCliqueGenerator(job_type='qaoa')
Specialization of the CombinatorialOptimizerGenerator class for generator that solves the KClique problem
- Parameters
job_type (str) – The job type of the batches to be generated. Can be either “qaoa”, “aqo” or “sqa”
- generate(specs, graph, K, A, B=1, **kwargs)
Generate a batch that solves the KClique 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
KCliqueResult
that contains interpretable information- Parameters
specs (
HardwareSpecs
) – will be used to run the jobgraph (networkx.Graph) – a networkx graph to run the KClique algorithm on
K (int) – the size of the clique
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