dwave_networkx.zephyr_sublattice_mappings#
- zephyr_sublattice_mappings(source, target, offset_list=None)[source]#
Yields mappings from a Chimera or Zephyr graph into a Zephyr graph.
A sublattice mapping is a function from nodes of
a
zephyr_graph(m_s, t)
to nodes of azephyr_graph(m_t, t)
wherem_s <= m_t
,a
chimera_graph(m_s, n_s, t)
to nodes of azephyr_graph(m_t, t)
wherem_s <= 2*m_t
andn_s <= 2*m_t
, ora
chimera_graph(m_s, n_s, 2*t)
to nodes of azephyr_graph(m_t, t)
wherem_s <= m_t
andn_s <= m_t
, or
This is used to identify subgraphs of the target Zephyr graphs which are isomorphic to the source graph. However, if the target graph is not of perfect yield, these functions do not generally produce isomorphisms (for example, if a node is missing in the target graph, it may still appear in the image of the source graph).
Note that the tile parameter of Chimera graphs must be either the same or double that of the target Zephyr graphs; if both graphs are Zephyr graphs, the tile parameters must be the same. The mappings produced preserve the linear ordering of tile indices; see the
_zephyr_zephyr_sublattice_mapping
,_double_chimera_zephyr_sublattice_mapping
, and_single_chimera_zephyr_sublattice_mapping
internal functions for more details.Academic note: the full group of isomorphisms of a Chimera graph includes mappings which permute tile indices on a per-row and per-column basis, in addition to reflections and rotations of the grid of unit tiles where rotations by 90 and 270 degrees induce a change in orientation. The isomorphisms of Zephyr graphs permit permutations of major tile indices on a per-row and per-column basis, in addition to reflections of the grid which induce inversion of orthogonal minor offsets, and rotations which induce inversions of minor offsets and/or orientation. The full set of sublattice mappings would take those isomorphisms into account; we do not undertake that complexity here.
- Parameters:
source (NetworkX Graph) – The Chimera or Zephyr graph that nodes are input from.
target (NetworkX Graph) – The Zephyr graph that nodes are output to.
offset_list (iterable (tuple), optional (default None)) – An iterable of offsets. This can be used to reconstruct a set of mappings, as the offset used to generate a single mapping is stored in the
offset
attribute of that mapping.
- Yields:
mapping (function) – A function from nodes of the source graph, to nodes of the target graph. The offset used to generate this mapping is stored in
mapping.offset
– these can be collected and passed intooffset_list
in a later session.