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

autoqasm/openqasm3 verbatim/pragma support

Đang mở
#41 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ó
5/5
Thời gian dự kiến
Hơn một tuần
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
Lĩnh vực
compilers

Hướng nghiên cứu

Start from the reproducer in the issue: the bell_state example using aq.verbatim() and to_ir(), which currently drops the pragma braket verbatim block during OpenQASM 3 to QIR translation. The payload does not name the source files, so locate the translation code by searching for the verbatim or pragma handling. Done means either the pragma survives translation with a test covering it, or a documented finding on why QIR cannot carry it.

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

Mô tả

duplicate enhancement
Feature Description

In autoqasm, you use the aq.verbatim() context to instruct the compiler to avoid modifying anything inside the block. For example:

@aq.main
def bell_state():
    with aq.verbatim():
        ins.h("$0")
        ins.cnot("$0", "$1")
    return ins.measure(["$0", "$1"])

print(bell_state.build().to_ir())

This program now targets physical qubits, and the gates will not be modified by the compiler. And the ir looks like this:

OPENQASM 3.0;
output bit[2] return_value;
pragma braket verbatim
box {
    h $0;
    cnot $0, $1;
}
bit[2] __bit_0__ = "00";
__bit_0__[0] = measure $0;
__bit_0__[1] = measure $1;
return_value = __bit_0__;

To support aq.verbatim(), we need support for openqasm3 pragma, which we are unsure if QIR supports or not. Either find a way to support pragma in the openqasm3 to qir translation or determine that is not possible.

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.