`OPENQASM 3.1;` is rejected as an unsupported version
Maintainer thường phản hồi trong vòng 1 ngày
@HeaTTap đang làm issue này rồi.
Từ ngày 21/8/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Limitation
The current OpenQASM specification is version 3.1, and the
version string section defines the
OPENQASM M.m; header where the minor version is optional.
pyqasm hard-codes the accepted set to {"2", "2.0", "3", "3.0"}, so any program declaring
itself as 3.1 is refused before analysis begins.
Example QASM failure
OPENQASM 3.1;
include "stdgates.inc";
qubit[1] q;
h q[0];
ValidationError: Unsupported OpenQASM version: 3.1.
Supported versions are: {'2', '2.0', '3', '3.0'}
The identical program with OPENQASM 3.0; validates and unrolls without issue, so nothing
beyond the header check is involved.
Change Requested
- Accept
3.1alongside3and3.0. - Prefer a comparison over an enumerated set: accept any
3.xand reject4.xand above with
a message that names the highest supported major version. That way the next minor release
does not require another patch. - Preserve the declared version through
dumps()— a program that comes in as 3.1 must go out
as 3.1, since the existing "preserve QASM version" behaviour (#36) is relied on downstream. - Update the README and docs, which currently state OpenQASM 3.0 support.
Implementation Details
- The check is in
src/pyqasm/entrypoint.py:158, against theSUPPORTED_QASM_VERSIONS
constant. - The module classes in
src/pyqasm/modules/(qasm2.py,qasm3.py) dispatch on the parsed
version; confirm that a3.1header routes toQasm3Moduleand that the version string is
stored verbatim for serialisation rather than normalised to3.0. - Worth stating explicitly in the issue resolution: accepting the 3.1 header does not by itself
mean full 3.1 semantic coverage. This change removes a blanket rejection so that 3.1-tagged
programs can be analysed; the remaining coverage gaps are tracked in the companion issues
filed alongside this one. - Tests:
tests/test_entrypoint.py—OPENQASM 3.1;loads, unrolls, and round-trips with the
version preserved;OPENQASM 4.0;still raises aValidationError.
- 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
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của qBraid/pyqasm
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement error-handling program-validation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.pyCó thể đã có người làm @danielgaskins đã nhận 17 ngày trước. Đang mởenhancement qasm2
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
qBraid/pyqasm#447 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASMCó thể đã có người làm @Jah-yee đã nhận 25 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 25/100
qBraid/pyqasm#438 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lostCó thể đã có người làm @tonycoder-hub đã nhận 19 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 22/100
qBraid/pyqasm#436 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của qBraid/pyqasm
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Claiming namespace `thejakia1`Đang mởnamespace operations
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
EclipseFdn/open-vsx.org#15057 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki HomeCó thể đã có người làm @ChiefGyk3D đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Perf] Default --vllm-watermark 0.05 for rollouts (hybrid models re-preempt under KV pressure)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
vllm-project/vime#508 ·
Maintainer thường phản hồi trong vòng 4 ngày