greedy_router#
- iqm.qaoa.transpiler.sparse.greedy_router.greedy_router(problem_bqm, qpu)[source]#
The function which takes a problem BQM
problem_bqm
and a QPUqpu
and returns a routing.This serves as a ‘wrapper’ for the entire greedy routing algorithm. For details of the algorithm, see [6].
- Parameters:
problem_bqm (BinaryQuadraticModel) – The
BinaryQuadraticModel
of the problem we’re trying to solve.qpu (QPU) – The
QPU
that we’re going to solve the problem on.
- Returns:
A routing object containing all the swap and interaction layers needed to execute one QAOA layer.
- Return type: