Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[BUG] Unsupported Controlled QASM operations

Đang mở
#252 2 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

@ryanhill1 đang làm issue này rồi.

Từ ngày 20/10/2026.

  • #459 của @ryanhill1 — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
18/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python

Hướng nghiên cứu

The error comes from map_qasm_ctrl_op_to_callable, where a TODO notes that controls should be decomposed when not built in. Start by reading that function to see how controlled gates with three or more controls are currently rejected, and check the maintainers' linked issues #32, #121 and #125 for the intended design. Done means the reproducer gate Z_on_two3 with ctrl@ on three qubits validates and produces the expected operations, but the maintainers have not settled on a decomposition approach, so confirm direction in the thread first.

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

Mô tả

bug
Environment
  • PyQASM version: 0.3.2
  • Python version: 3.12.8
  • Operating system: Windows
What happened?

This may be a feature request, but it looks like a partially stubbed implementation based on #32, #121, and #125.

When attempting to define and run a custom gate with multiple controls:

gate Z_on_two3 aa, ab, ac {
    x ac;
    ctrl(2) @ z aa, ab, ac;
    x ac;
}
ctrl@ gate Z_on_two3 qb[0], qb[1], qb[2];

I encounter the following error:

ValidationError: Unsupported controlled QASM operation: z with 3 controls
Source

The error originates from map_qasm_ctrl_op_to_callable, which currently contains the following comment:

# TODO: decompose controls if not built in

Expected Behavior(?)

Support for decomposing multi-controlled operations (e.g., z with 3+ controls), or clarification on whether this is intentionally unsupported.

Suggestions (Optional)

IDK if this is a semantic decomposition or needs full function decomposition to base gate ie through Solavay Kiteav or Cartan. Id assume it can be left to a semantic decomp as openqasm parsing itself accepts gate modifiers directly. LMK future development intent in this category

Ngôn ngữ chính
Python
Star
29
Fork
33
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
15

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 qBraid/pyqasm

Tất cả issue của qBraid/pyqasm

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.