star_router#
- iqm.qaoa.transpiler.star.star.star_router(problem_bqm, qpu)[source]#
The function that implements the optimal swapping strategy on the star QPU.
Looks for the minimum vertex cover set on the problem graph and then swaps the nodes belonging to this cover into the center of the star (adding the interaction gates in between).
- Parameters:
problem_bqm (BinaryQuadraticModel) – The
BinaryQuadraticModel
description of the problem, necessary to create an instance ofRoutingStar
.qpu (StarQPU) – The QPU, necessary to create an instance of
RoutingStar
.
- Returns:
A
RoutingStar
object containing the optimal star swapping strategy.- Return type: