You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The draw_chimera function takes a NetworkX graph as input. The docstring says "Should be a Chimera graph or a subgraph of a Chimera graph" which can mean either that its edges must be a Chimera lattice subset or that the NetworkX graph must be generated by chimera_graph, it's unclear which is the intention.
Assuming the former, if the NX graph is missing somechimera_index attributes, the function returns the obscure NetworkXError: Found infinite path length because the graph is not connected error because draw_chimera tries to calculate the graph's diameter in
Description
The
draw_chimera
function takes a NetworkX graph as input. The docstring says "Should be a Chimera graph or a subgraph of a Chimera graph" which can mean either that its edges must be a Chimera lattice subset or that the NetworkX graph must be generated bychimera_graph
, it's unclear which is the intention.Assuming the former, if the NX graph is missing some
chimera_index
attributes, the function returns the obscureNetworkXError: Found infinite path length because the graph is not connected
error becausedraw_chimera
tries to calculate the graph's diameter indwave-networkx/dwave_networkx/generators/chimera.py
Line 272 in a4a1eb6
To Reproduce
If I either add the
chimera_index
to nodes in the two-tile NX graph or stick to the nodes of a single tile (due todwave-networkx/dwave_networkx/generators/chimera.py
Line 288 in a4a1eb6
Expected behavior
draw_chimera
should accept any NX graph that is a subgraph of a Chimera latticechimera_index
or add them without an error for more than two unit cellschimera_graph
Environment:
The text was updated successfully, but these errors were encountered: