Sampler によるノイズ管理の設定
パッケージ・バージョン
このページのコードは、以下の要件を使用して開発されました。 これらのバージョン以降の使用をお勧めします。
qiskit-ibm-runtime~=0.46.1
ノイズを管理する方法はいくつかあります。一般的に、エラーが発生する前に回避するためのさまざまなエラー緩和およびエラー抑制技術を使用します。これらの技術は通常、前処理のオーバーヘッドを引き起こします。そのため、結果を完璧にすることと、ジョブが適切な時間内に完了することのバランスを取ることが重要です。
Sampler は以下のノイズ管理技術をサポートしています。各技術の説明については、エラー緩和と抑制技術を参照してください。
備考
すべてのオプションがすべての種類の回路で連携して機能するわけではありません。詳細については、機能互換性テーブルガイドを参照してください。
例
# Added by doQumentation — required packages for this notebook
!pip install -q qiskit-ibm-runtime
from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime import SamplerV2 as Sampler
service = QiskitRuntimeService()
backend = service.least_busy(operational=True, simulator=False)
sampler = Sampler(backend)
# Turn on dynamical decoupling with sequence XpXm.
sampler.options.dynamical_decoupling.enable = True
sampler.options.dynamical_decoupling.sequence_type = "XpXm"
# Turn on gate twirling. Requires qiskit_ibm_runtime 0.23.0 or later.
sampler.options.twirling.enable_gates = True
print(
f">>> dynamical decoupling sequence to use: "
f"{sampler.options.dynamical_decoupling.sequence_type}"
)
print(
f">>> gate twirling is turned on: {sampler.options.twirling.enable_gates}"
)
>>> dynamical decoupling sequence to use: XpXm
>>> gate twirling is turned on: True
次のステップ
おすすめ
- エラー緩和とエラー抑制技術について詳しく学びます。
- Sampler のオプションを探索します。
- ジョブを実行する実行モードを決定します。