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

sampler_test.cpp build failed with "qrmi.h: No such file or directory" error

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
cpp
領域
build-system

調査の方向性

samples/sampler_test.cpp から始め、そこに含まれているサービスヘッダーを service/qiskit_runtime_service.hpp および service/qiskit_runtime_service_qrmi.hpp と比較します。qiskit と qiskit-ibm-runtime-c について README のビルド手順に従い、その後 samples を再ビルドします。sampler_test.cpp が qrmi.h が見つからないエラーなしでビルドできれば完了です。

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

説明

bug
Environment
  • Qiskit C++ Version: Git clone from the latest main branch (2026/03/09)

  • Qiskit Version: Git clone from the latest main branch (2026/03/09)

  • C++ Compiler: gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-11)

  • Operating system: Rocky 9 Linux (x86_64)

  • Underlying API client: qiskit-ibm-runtime-c

What is happening?

Building sampler_test.cpp failed with "qrmi.h: No such file or directory".

[root@login build]# cmake -DQISKIT_ROOT=/shared/sandbox/qiskit-cpp/qiskit -DQISKIT_IBM_RUNTIME_C_ROOT=/shared/sandbox/qiskit-cpp/qiskit-ibm-runtime-c ..
-- The CXX compiler identification is GNU 11.5.0
-- The C compiler identification is GNU 11.5.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1282 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  CMakeLists.txt:21 (FetchContent_Declare)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Using the multi-header code from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/build/_deps/json-src/include/
   Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
   Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
   Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
   Qiskit Root = /shared/sandbox/qiskit-cpp/qiskit
-- Configuring done (1.3s)
-- Generating done (0.0s)
-- Build files have been written to: /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/build
((pyenv) ) [root@login build]# make
[ 12%] Building CXX object CMakeFiles/circuit_test.dir/circuit_test.cpp.o
[ 25%] Linking CXX executable circuit_test
[ 25%] Built target circuit_test
[ 37%] Building CXX object CMakeFiles/observable_test.dir/observable_test.cpp.o
[ 50%] Linking CXX executable observable_test
[ 50%] Built target observable_test
[ 62%] Building CXX object CMakeFiles/sampler_test.dir/sampler_test.cpp.o
In file included from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/../src/providers/qrmi_backend.hpp:22,
                 from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/../src/service/qiskit_runtime_service_qrmi.hpp:25,
                 from /shared/sandbox/qiskit-cpp/qiskit-cpp/samples/sampler_test.cpp:25:
/shared/sandbox/qiskit-cpp/qiskit-cpp/samples/../src/providers/qrmi_job.hpp:27:10: fatal error: qrmi.h: No such file or directory
   27 | #include "qrmi.h"
      |          ^~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/sampler_test.dir/build.make:76: CMakeFiles/sampler_test.dir/sampler_test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:158: CMakeFiles/sampler_test.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
How can we reproduce the issue?

Follow the README

  • Clone qiskit repo and "make c"
  • Clone qiskit-ibm-runtime-c and build
  • Clone qiskit-cpp repo and build sample
What should happen?

Samples should be built with qiskit-ibm-runtime-c.

Any suggestions?

I think sampler_test.cpp should have

#include "service/qiskit_runtime_service.hpp"

instead of

#include "service/qiskit_runtime_service_qrmi.hpp"

No response

主要言語
C++
スター
41
フォーク
26
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

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

Qiskit/qiskit-cpp のほかの issue

Qiskit/qiskit-cpp の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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