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

✨ Full Support of Classically-Controlled Operations is Missing

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
devtools

調査の方向性

まず DDSimDebug.cpp と CodePreprocessor.cpp を読み、OpenQASM の IfElse 操作がどのように解析され、ステップ実行されるかを追跡します。記載されている比較条件、古典レジスタのサブセットまたはビット、複数命令の本体への対応を実装し、その後、提供されている OpenQASM の例がデバッガー経由で動作することを確認します。

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

説明

c++ enhancement help wanted
Problem Statement

IfElse Operations in OpenQASM can be based on more than just equality conditions.
The underlying MQT Core framework already supports all of the different types of IFElse Operations, such as different comparison conditions and checks that only use subsets of classical registers or single classical bits.

Furthermore, we currently only allow IfElse Operations that contain only a single instruction in the "then" block. This makes tracking the current operation easier, but obviously does not match the full OpenQASM standard. We should therefore implement support for multi-instruction bodies accordingly.

The following are some code examples that should work in standard OpenQASM but are not allowed/parsed correctly by the debugger:


qreg q[3];
creg c[3];

...

if (c == 0) {
  x q[0];
}

This only works without the if body:

if (c == 0) x q[0];

qreg q[3];
creg c[3];

...

if (c == 0) {
  x q[0];
}

This is not supported by the Debugger's parser at all.


if (c > 0) x q[0];

The debugger only supports equality conditions for if blocks, but the simulation backend supports other conditions, too, so this should be a straightforward enhancement.


Proposed Solution

In the DDSimDebug.cpp backend and the CodePreprocessor.cpp, support for the corresponding operation types should be added when stepping through the code.

主要言語
C++
スター
21
フォーク
8
平均マージ
5時間 17分
マージ済み PR(30日)
21

環境構築

はじめの一歩

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

munich-quantum-toolkit/debugger のほかの issue

munich-quantum-toolkit/debugger の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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