Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

autoqasm/openqasm3 verbatim/pragma support

オープン
#41 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
18/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
compilers

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
29
フォーク
33
平均マージ
2日 4時間
マージ済み PR(30日)
15

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

qBraid/pyqasm のほかの issue

qBraid/pyqasm の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。