[BUG] Unsupported Controlled QASM operations
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 18/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
The error comes from map_qasm_ctrl_op_to_callable, where a TODO notes that controls should be decomposed when not built in. Start by reading that function to see how controlled gates with three or more controls are currently rejected, and check the maintainers' linked issues #32, #121 and #125 for the intended design. Done means the reproducer gate Z_on_two3 with ctrl@ on three qubits validates and produces the expected operations, but the maintainers have not settled on a decomposition approach, so confirm direction in the thread first.
索引モデルが issue の本文から書いたものです。
説明
Environment
- PyQASM version: 0.3.2
- Python version: 3.12.8
- Operating system: Windows
What happened?
This may be a feature request, but it looks like a partially stubbed implementation based on #32, #121, and #125.
When attempting to define and run a custom gate with multiple controls:
gate Z_on_two3 aa, ab, ac {
x ac;
ctrl(2) @ z aa, ab, ac;
x ac;
}
ctrl@ gate Z_on_two3 qb[0], qb[1], qb[2];
I encounter the following error:
ValidationError: Unsupported controlled QASM operation: z with 3 controls
Source
The error originates from map_qasm_ctrl_op_to_callable, which currently contains the following comment:
# TODO: decompose controls if not built in
Expected Behavior(?)
Support for decomposing multi-controlled operations (e.g., z with 3+ controls), or clarification on whether this is intentionally unsupported.
Suggestions (Optional)
IDK if this is a semantic decomposition or needs full function decomposition to base gate ie through Solavay Kiteav or Cartan. Id assume it can be left to a semantic decomp as openqasm parsing itself accepts gate modifiers directly. LMK future development intent in this category
- 主要言語
- 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 が 16 日前に担当しました。 オープン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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from git対応中かも @MohabMohie が今日担当しました。 オープンagentic
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 87/100
huggingface/smolagents#3045 ·
メンテナーはふだん 1 日以内に返信