`OPENQASM 3.1;` is rejected as an unsupported version
I maintainer di solito rispondono entro 1 giorno
@HeaTTap ci sta già lavorando.
Dal 21/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 29
- Fork
- 33
- Merge medio
- 2g 4h
- PR unite (30g)
- 15
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di qBraid/pyqasm
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement error-handling program-validation
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.pyForse già presa @danielgaskins l’ha presa 7 giorni fa. Apertaenhancement qasm2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
qBraid/pyqasm#447 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASMForse già presa @Jah-yee l’ha presa 15 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 25/100
qBraid/pyqasm#438 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lostForse già presa @tonycoder-hub l’ha presa 9 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 22/100
qBraid/pyqasm#436 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di qBraid/pyqasm
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
521xueweihan/HelloGitHub#4063 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
Vanilla-OS/apx-gui#112 ·
-
Devstral and Voxtral: section 5 fails in us-east-1 with 400 "Model does not support audio modality"Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
aws-samples/sample-per-model-bedrock#409 ·
I maintainer di solito rispondono entro 1 giorno
-
DuckDB 2.0 breaks to_pyarrow_batchesForse già presa @DG47 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
ibis-project/ibis#12196 ·
I maintainer di solito rispondono entro 1 giorno