Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix #215: Handle non-contiguous numbering in `rustworkx` backend This commit resolves a bug, as tested in the new test case `test_pauli_non_contiguous`, which previously passed with the `networkx` backend but failed with the `rustworkx` backend. The method `BaseGraphState.neighbors` now returns an iteration over (Graphix) node indices, rather than `rustworkx` vertex indices. These indices are then passed to `BaseGraphState.subgraph` in `BaseGraphState.local_complement`. `BaseGraphState.subgraph` expects node indices, as it converts them back to `rustworkx` vertex indices. --------- Co-authored-by: S.S. <[email protected]>
- Loading branch information