LUCJ pass manager raises NoEdgeBetweenNodes when an edge is bad for two two-qubit gates
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start in ffsim/qiskit/lucj_pass_manager.py at _make_backend_cmap_pygraph and inspect the bad-edge removal loop around line 255. Use the provided example, where an edge is over the threshold for both cz and rzz, to reproduce the exception. Done means the function returns a pass manager after dropping the edge once, with relevant tests passing.
Written by the indexing model from the issue text.
Description
When a backend has more than one two-qubit gate and an edge's error is not below two_qubit_error_threshold for more than one of them, generate_lucj_pass_manager is supposed to drop that edge from the coupling graph and return a pass manager, but it raises rustworkx.NoEdgeBetweenNodes: No edge found between nodes.
This happens on ibm_fez, whose target has cz and rzz; coupler (32, 33) reports error 1.0 for both.
Minimal complete verifiable example:
from qiskit.providers.fake_provider import GenericBackendV2
from qiskit.transpiler import CouplingMap, InstructionProperties
from ffsim.qiskit import generate_lucj_pass_manager
norb = 36
coupling_map = CouplingMap.from_heavy_hex(distance=9, bidirectional=True)
backend = GenericBackendV2(
num_qubits=coupling_map.size(),
coupling_map=coupling_map,
basis_gates=["cz", "rzz", "id", "rz", "sx", "x"],
noise_info=True,
seed=0,
)
for gate in ["cz", "rzz"]:
for qargs in [(0, 121), (121, 0)]:
backend.target.update_instruction_properties(
gate, qargs, InstructionProperties(error=1.0)
)
generate_lucj_pass_manager(
backend=backend,
norb=norb,
connectivity="heavy-hex",
interaction_pairs=([(p, p + 1) for p in range(norb - 1)], None),
optimization_level=1,
)
File ".../ffsim/qiskit/lucj_pass_manager.py", line 255, in _make_backend_cmap_pygraph
backend_coupling_graph.remove_edge(edge[0], edge[1])
rustworkx.NoEdgeBetweenNodes: No edge found between nodes
Cause: the "remove bad edges" loop in _make_backend_cmap_pygraph takes edge_list once, then for each two-qubit gate removes every listed edge over the threshold, so an edge bad for both gates is removed twice and the second remove_edge raises.
- Dominant language
- Python
- Stars
- 116
- Forks
- 50
- Avg merge
- 2h 1m
- Merged PRs (30d)
- 8
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Qiskit/ffsim
-
Support Python 3.15Openneeds upstream change
Difficulty 3/5 1-2 days Newbie friendliness 20/100
Maintainers usually reply within 1 day
-
Add guide for computing RDMsMay be free again A pull request for this issue was closed without being merged. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Qiskit/ffsim#672 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
mozilla-ai/cq#601 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
intcomma returns exponential notation for large floatsPossibly taken @Omarinho12345 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
python-humanize/humanize#521 ·
Maintainers usually reply within 1 day
-
opensubtitlescom: provider rejects pt-PT even though its own converter maps itPossibly taken @paulo-0308 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Diaoul/subliminal#1405 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100