[FEATURE] Add support for `pragma`
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start with the Qasm3Module class in src/pyqasm/modules/qasm3.py, where the parsed program state would hold the new read-only pragma mapping, and read the OpenQASM directives page linked in the issue to confirm the pragma syntax. The open decisions are the identifier schema (__device_name__, __device_native_gates__, and so on) and whether unknown pragmas are ignored or stored, so the maintainers need to settle these before code is written. Done means pragma key/value pairs are parsed into a MappingProxyType on the module and can be read back, with tests for known and unknown keys.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Feature Description
- Add support for
pragmain openqasm - Motivation: Adding
pragmacompiler directives enables more granular optimization for specific programs. Eg. we can embed the device information in the openqasm program itself enabling target specific transformations / optimizations for an openqasm compiler.
Implementation (Optional)
- Since the structure of
#pragmaannotations are left for the compiler to handle, we can use key value pairs such as -
pragma __device_name__ : "simulator_1"
pragma __device_native_gates__ : { "h", "cx", "s", "t" }
-
We can have a list of predefined
pragmaidentifiers such as__device_name__,__native_gate_set__,__device_qubits__, and so on, with a specified value schema. Following is a good place to start -__device_name__: string__device_num_qubits__: string__device_native_gates__: set of string__device_architecture__: string
-
Any other pragma values are ignored OR optionally stored as key value pairs without parsing the value further
-
These values can be stored using the
MappingProxyType( as an immutable dict ), inside theQasm3Moduleobjects and retrieved as required.
- Lenguaje dominante
- Python
- Estrellas
- 29
- Forks
- 33
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de qBraid/pyqasm
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
enhancement error-handling program-validation
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.pyPosiblemente ocupada @danielgaskins la tomó hace 7 días. Abiertoenhancement qasm2
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
qBraid/pyqasm#447 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASMPosiblemente ocupada @Jah-yee la tomó hace 15 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
qBraid/pyqasm#438 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lostPosiblemente ocupada @tonycoder-hub la tomó hace 9 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 22/100
qBraid/pyqasm#436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de qBraid/pyqasm
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
anchore/grype-db#1149 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: `hermes plugins update` clones an entire monorepo twice - `subdir` is resolved but dropped at both catalog-update call sitesPosiblemente ocupada @HootRock la tomó hoy. Abiertocomp/cli P2 type/perf
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NousResearch/hermes-agent#142417 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
SMC SPEC
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
tenstorrent/tt-oca-harness#3287 ·
Los mantenedores suelen responder en 1 día
-
bug enhancement python
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#392 ·
Los mantenedores suelen responder en 1 día
-
Critical advisories on mainAbiertosecurity
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fabriziosalmi/wildbox#801 ·
Los mantenedores suelen responder en 1 día