[FEATURE] Add support for `pragma`
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 29
- フォーク
- 33
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
qBraid/pyqasm のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信
-
enhancement error-handling program-validation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.py対応中かも @danielgaskins が 7 日前に担当しました。 オープンenhancement qasm2
難易度 4/5 3〜5日 初心者へのやさしさ 22/100
qBraid/pyqasm#447 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASM対応中かも @Jah-yee が 15 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
qBraid/pyqasm#438 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lost対応中かも @tonycoder-hub が 9 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 22/100
qBraid/pyqasm#436 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
anchore/grype-db#1149 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Bug]: `hermes plugins update` clones an entire monorepo twice - `subdir` is resolved but dropped at both catalog-update call sites対応中かも @HootRock が今日担当しました。 オープンcomp/cli P2 type/perf
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NousResearch/hermes-agent#142417 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
SMC SPEC
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
tenstorrent/tt-oca-harness#3287 ·
メンテナーはふだん 1 日以内に返信
-
bug enhancement python
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#392 ·
メンテナーはふだん 1 日以内に返信
-
security
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
fabriziosalmi/wildbox#801 ·
メンテナーはふだん 1 日以内に返信