NoiseLearner
class NoiseLearner(mode=None, options=None)
ベース: object
ノイズ学習実験を行うためのクラス。
ノイズ学習クラスは、 [1].で説明したPauli-Lindbladノイズモデルに基づいて、1つまたは複数の対象回路のゲートに影響を与えるノイズプロセスを特徴付けることができます。
この run() メソッドは、回路のリストに対してノイズ学習ジョブを実行することができる。 ジョブが提出されると、ゲートは独立したレイヤーに集められ、その後、得られたレイヤーは個々に特性評価される。
strategy ゲートがレイヤーに集められる方法は、与えられた options ( NoiseLearnerOptions を参照)。 すべての戦略は障壁に従うことに注意。 例えば、興味のある3つのISAエンタングルレイヤーがある場合、それらを渦巻きたい量子ビットに作用するバリアで区切られた1つの回路に入れることを考え、 strategy="active-circuit" を選択する。
次のスニペットは、2つのGHZ回路のレイヤーを特徴付けるためにノイズ学習器を使用した例である。
from qiskit.circuit import QuantumCircuit
from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime.noise_learner import NoiseLearner
from qiskit_ibm_runtime.options import NoiseLearnerOptions
service = QiskitRuntimeService()
backend = service.least_busy(operational=True, simulator=False)
# a circuit returning a two-qubit GHZ state
ghz = QuantumCircuit(2)
ghz.h(0)
ghz.cx(0, 1)
# another circuit returning a two-qubit GHZ state
another_ghz = QuantumCircuit(3)
another_ghz.h(0)
another_ghz.cx(0, 1)
another_ghz.cx(1, 2)
another_ghz.cx(0, 1)
pm = generate_preset_pass_manager(backend=backend, optimization_level=1)
circuits = pm.run([ghz, another_ghz])
# set the options
options = NoiseLearnerOptions()
options.layer_pair_depths = [0, 1, 10]
# run the noise learner job
learner = NoiseLearner(backend, options)
job = learner.run(circuits)パラメーター
-
mode (BackendV2 | Session |Batch | None) –
プリミティブクエリの実行モード。 これは以下のいずれかです。
- ジョブ・モードを使用している場合は、
Backend。 - セッション実行モードを使用している場合は、
Session。 - バッチ実行モードを使用している場合は、
Batch。
実行モードの詳細については、 Qiskit Runtime のドキュメントを参照してください。
- ジョブ・モードを使用している場合は、
-
options (dict | NoiseLearnerOptions |EstimatorOptions | None) –
NoiseLearnerOptionsあるいは、便宜上、を提供することもEstimatorOptions可能です。この場合、推定器オプションはノイズ学習器オプションに再フォーマットされ、関連性のないフィールドはすべて無視されます。
参考文献
- E. van den Berg, Z. Minev, A. Kandala, K. Temme, Probabilistic error cancellation with sparse Pauli–Lindblad models on noisy quantum processors, Nature Physics volume 19, pages 1116–1121 (2023). arXiv:2201.09866 [quant-ph]。
属性
options
この騒音学習者のオプション。
方法
backend
run
run(circuits)
騒音学習者プログラムにリクエストを提出する。
この関数は、 options (詳しくは NoiseLearnerOptions を参照)で指定された twirling_strategy フィールドによって設定された戦略に従って、与えられた回路のリストをユニークなレイヤーのリストに分割し、様々な回路での出現回数に基づいてソートする。 そして、 options の max_layers_to_learn フィールドで指定された数だけ、ノイズ学習実験を実行し、より頻繁に発生するレイヤーを優先する。
パラメーター
circuits (Iterable[QuantumCircuit | EstimatorPubLike]) – ノイズ学習プログラムを実行するための回路の反復可能オブジェクト。 (circuit, observables, parameter_values)あるいは、推定子「pub-like」(プリミティブ統一ブロック)のオブジェクトを指定することも可能です。例えば、タプル (circuit, observables) や などです。 parameter_valuesこの場合、パブのようなオブジェクトは回路のリストに変換され、その他のすべてのフィールド(や など observables )は無視されます。
戻り値
提出された仕事
戻りの型