dwave.system.coupling_groups.coupling_groups#
- coupling_groups(hardware_graph)[source]#
Generate groups of couplers for which a limit on total coupling applies for each group.
- Parameters:
hardware_graph (
networkx.Graph
) – The hardware graph of a QPU. Note that only Zephyr graphs have coupling groups.- Yields:
Lists of tuples, where each list is a group of couplers in
hardware_graph
.
Examples
This example prints the first coupling group of an Advantage2 QPU.
>>> from dwave.system.coupling_groups import coupling_groups >>> from dwave.system import DWaveSampler ... >>> qpu = DWaveSampler(solver=dict(topology__type='zephyr')) >>> couplings = coupling_groups(qpu.to_networkx_graph()) >>> print(next(couplings)) [(1, 0), (12, 0), (2496, 0), (2520, 0), (2544, 0), (2568, 0)]