[Bug]: rustworkx
fails to handle non-contiguous node numbering
#215
Labels
bug
Something isn't working
rustworkx
fails to handle non-contiguous node numbering
#215
The following code raises
KeyError
inrxgraphviews.get_node_index
whenuse_rustworkx
isTrue
:The bug seems to be between
RXGraphState.neighbors
,RXGraphState.subgraphs
andRXGraphState.local_complement
: the indexes returned byneighbors
are in the rustworkx numbering, whereaslocal_complement
callssubgraphs
on these nodes, which expects them to be in the graphix numbering.A fix could be to add a
idx_to_num
mapping inrxgraphviews
and convert neighbors in the graphix numbering.Related issues: #206 (problem with
rxgraphviews
).The text was updated successfully, but these errors were encountered: