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] Bug in Measurement parsing

Đang mở
#15 1 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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
65/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
compilers

Hướng nghiên cứu

Search the package for the message 'Register sizes of' to find the measurement check in the semantic analyzer. Reproduce with the snippet in the issue (measure q[0] into a single bit) and confirm the check compares the whole register q against b instead of the indexed qubit. Done when that program passes semantic analysis and a regression test covers it.

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

Mô tả

bug good first issue
Environment
  • pyqasm version: 0.0.1
  • Python version: 3.12.7
  • Operating system: macOS Sonoma 14.4
What happened?

Semantic analysis should pass for the following -

bit b;
qubit[2] q;        
h q;
b = measure q[0]; 

but fails with the error -

pyqasm.exceptions.ValidationError: Register sizes of q and b do not match for measurement operation
Suggestions (Optional)

No response

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

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.