QAOA MaxIndependentSet problem implementation#

Problem description#

Given a Graph \(G = (V,E)\) maximize the size of a clique, i.e. a subset \(V' \subset V\) in which all pairs of vertices are mutually non-adjacent.

Cost operator#

maxIndepSetCostOp(G)[source]#
Based on PennyLane unconstrained mixer implementation, initial state in (|0>+|1>)^(otimes n)
For explanation see the Pennylane implementation
Parameters
Gnx.Graph

Graph of the problem instance

Returns
QuantumCircuit: qrisp.QuantumCircuit

the Operator applied to the circuit-QuantumVariable

Classical cost function#

maxIndepSetclCostfct(G)[source]#
Parameters
Gnx.Graph

Graph of the problem instance

Returns
Costfunctionfunction

the classical function for the problem instance, which takes a dictionary of measurement results as input