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

[BUG] Unsupported Controlled QASM operations

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

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

@ryanhill1 がすでに取り組んでいます。

2026年10月20日 から。

  • #459 @ryanhill1 による — オープン

評価

難易度
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 の本文から書いたものです。

説明

bug
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

環境構築

はじめの一歩

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

qBraid/pyqasm のほかの issue

qBraid/pyqasm の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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