Skip to content

Remove each bad edge once in _make_backend_cmap_pygraph - #757

Open
Abdur Rahman Hatim (hat-im) wants to merge 1 commit into
Qiskit:mainfrom
hat-im:remove-each-bad-edge-once
Open

Abdur Rahman Hatim (hat-im) wants to merge 1 commit into
Qiskit:mainfrom
hat-im:remove-each-bad-edge-once

Conversation

@hat-im

Copy link
Copy Markdown

Fixes #756

On ibm_fez, which has both cz and rzz, coupler (32, 33) is over the error threshold for both gates, so the old loop removed it twice, causing generate_lucj_pass_manager to crash with NoEdgeBetweenNodes. _make_backend_cmap_pygraph now removes a bad edge only once. For each edge it checks the gates in turn and removes the edge at the first one over the threshold.

The new test, test_edge_bad_for_every_two_qubit_gate, gives one edge of a heavy-hex GenericBackendV2 an error of 1.0 for both cz and rzz. It fails before this change and passes after; the rest of tests/python/qiskit passes too.

@hat-im
Abdur Rahman Hatim (hat-im) marked this pull request as ready for review November 19, 2026 10:19

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LUCJ pass manager raises NoEdgeBetweenNodes when an edge is bad for two two-qubit gates

1 participant