Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

autoqasm/openqasm3 verbatim/pragma support

Abierto
#41 1 comentario 0 reacciones 0 asignados Ver en GitHub

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
18/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
python
Área
compilers

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
29
Forks
33
Merge medio
2 d 4 h
PR fusionados (30 d)
15

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de qBraid/pyqasm

Todos los issues de qBraid/pyqasm

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.