Avoid statevector copy in `qsim.simulate(qc, initial_state=sv)`
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 34/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 領域
- api, performance
調査の方向性
The copy happens in init_state() in pybind_interface/pybind_main.cpp, near the line the issue links (around line 695-701), when simulate is given an initial_state. Read how that state is passed into the simulator and whether the simulator can reference the caller's buffer without taking ownership. Done means the initial state is no longer copied on this path, and the existing Python tests for initial_state still pass. The thread has been unanswered for about three years, so confirm the approach with maintainers first.
索引モデルが issue の本文から書いたものです。
説明
I have a use case where I am simulating my circuit piece by piece so using the ability to pass an initial state to qsim is very handy.
However I have noticed this makes a copy of the initial_state here:
Is there a way to avoid the expensive copy?
If there is a little patch that can be applied (I assume couple of lines in void init_state() should do it) I would be happy to apply it locally and re-build qsim.
Thanks!
- 主要言語
- C++
- スター
- 702
- フォーク
- 219
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quantumlib/qsim のほかの issue
-
`MPSStateSpace::Sample` accesses results out of bounds when the output vector is empty対応中かも @aadityarshah が 42 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
quantumlib/qsim#1126 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 57/100
quantumlib/qsim#1146 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 56/100
quantumlib/qsim#1145 ·
メンテナーはふだん 2 日以内に返信
-
`MPSStateSpace::SampleOnce` crashes for two-qubit states対応中かも @aadityarshah が 40 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
quantumlib/qsim#1129 ·
メンテナーはふだん 2 日以内に返信
-
Implement expectation values for the MPS Simulator対応中かも @rupasri118 が 36 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
quantumlib/qsim#1122 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
quantumlib/qsim の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
ai_p1 comp-sql-syntax
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ClickHouse/ClickHouse#133888 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
documentation good first issue
難易度 2/5 半日 初心者へのやさしさ 66/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jbcoe/cc-protocol#507 ·
メンテナーはふだん 1 日以内に返信