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

Đang mở Phù hợp với người mới
#756 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@hat-im đang làm issue này rồi.

Từ ngày 19/11/2026.

  • #757 của @hat-im — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu tại ffsim/qiskit/lucj_pass_manager.py, ở _make_backend_cmap_pygraph, và kiểm tra vòng lặp loại bỏ cạnh lỗi quanh dòng 255. Dùng ví dụ được cung cấp, trong đó một cạnh vượt ngưỡng cho cả cz và rzz, để tái hiện ngoại lệ. Công việc hoàn tất khi hàm trả về một trình quản lý pass sau khi loại bỏ cạnh một lần và các bài kiểm thử liên quan đều đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
116
Fork
50
Merge trung bình
2 giờ 1 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Qiskit/ffsim

Tất cả issue của Qiskit/ffsim

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.