SampledExpectation layer seems to recompute the same circuits for different measurement ops
メンテナーはふだん 21 日以内に返信
@MichaelBroughton がすでに取り組んでいます。
2020年6月20日 から。
評価
この issue はまだ評価されていません。
説明
Example
c = cirq.Circuit()
qubits = cirq.GridQubit.rect(2, 1)
c.append(cirq.rz(0.)(qubits[0]))
c.append(cirq.H(qubits[1]))
sampled_expectation_layer = tfq.layers.SampledExpectation()
output = sampled_expectation_layer(
[c],
operators=[cirq.Z(qubits[0]), cirq.Z(qubits[1]), cirq.Z(qubits[0]) * cirq.Z(qubits[1])],
repetitions=1)
print(output) # we have [1, -1, 1] sometimes
assert output[0,0]*output[0,1] == output[0,2] # and this may fail
It is unnatural to me that, when repetitions=1 (1 sample), we have inconsistent measurement results between Z1, Z2 and Z1*Z2.
And from code here https://github.com/tensorflow/quantum/blob/db2eac4e598f614a8c0e157c56313a23ef1943fb/tensorflow_quantum/core/ops/batch_util.py#L554-L561, this may be due to that each circuit, batch, measurement ops combination is simulated separately on backends. If it is so, it is not only unnatural but also inefficient since one can measure all ops for one circuit simulation.
My understanding may be wrong somewhere, any ideas on this?
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 675
- 平均マージ
- 15日 11時間
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tensorflow/quantum のほかの issue
-
area/c++ area/core kind/bug-report
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tensorflow/quantum#1140 ·
メンテナーはふだん 21 日以内に返信
-
area/c++ area/core kind/bug-report
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
tensorflow/quantum#1141 ·
メンテナーはふだん 21 日以内に返信
-
Support Keras 3再び着手できるかも @rosspeili が 127 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea/keras help wanted skill-level/intermediate
tensorflow/quantum#1090 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 21 日以内に返信
-
area/circuits priority/after-0.7.7 skill-level/expert
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tensorflow/quantum#1087 ·
メンテナーはふだん 21 日以内に返信
-
Efficiently handle circuit sizes 10x or more of today's circuits再び着手できるかも @SripriyaDevarapalli が 47 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンarea/circuits area/performance help wanted priority/after-0.7.7 skill-level/expert
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tensorflow/quantum#1086 · コメント 1 件 ·
メンテナーはふだん 21 日以内に返信
tensorflow/quantum の issue をすべて見る
似ている issue
-
[dbt] exported dataset keys reference physical columns対応中かも @WilliamKelley が今日担当しました。 オープンneeds-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
apache/ossie-converters#251 ·
メンテナーはふだん 2 日以内に返信
-
cli difficulty: easy enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
desec-io/desec-stack#1312 ·
メンテナーはふだん 14 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
aws/aws-durable-execution-sdk-python#977 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
flashinfer-ai/flashinfer#9803 ·
メンテナーはふだん 1 日以内に返信