dimod.traversal.bfs_variables

bfs_variables(bqm, source)[source]

Yields variables in breadth-first search order.

Parameters:
  • bqm (dimod.BinaryQuadraticModel) – A binary quadratic model.
  • source (variable) – A variable in the binary quadratic model (BQM).
Yields:

variable – variables in the BQM, yielded in breadth-first search order starting at source.