주 콘텐츠로 건너뛰기
이 프로젝트는 베타 단계입니다. 버그를 발견하셨나요? GitHub 이슈 만들기. 질문이나 아이디어가 있으신가요? Discussions에서 질문하기 — 피드백을 기다립니다!
이 페이지의 번역 품질은 어떻습니까?

Sampler로 노이즈 관리 구성

패키지 버전

이 페이지의 코드는 다음 요구 사항을 사용하여 개발되었습니다. 이 버전 이상을 사용하는 것을 권장합니다.

qiskit-ibm-runtime~=0.47.0

노이즈를 관리하는 방법에는 여러 가지가 있으며, 일반적으로 오류가 발생하기 전에 방지하기 위해 다양한 오류 완화 및 오류 억제 기법을 사용합니다. 이러한 기법은 보통 전처리 오버헤드를 유발합니다. 따라서 결과를 완벽히 하는 것과 Job이 적절한 시간 내에 완료되도록 하는 것 사이의 균형을 달성하는 것이 중요합니다.

Sampler는 다음과 같은 노이즈 관리 기법을 지원합니다. 각 기법에 대한 설명은 오류 완화 및 억제 기법을 참조하세요.

참고

모든 옵션이 모든 유형의 Circuit에서 함께 작동하지는 않습니다. 전체 세부 사항은 기능 호환성 표 가이드를 참조하세요.

예제

# Added by doQumentation — installs the packages this notebook needs if they are missing
import importlib.util

_needed = {"qiskit_ibm_runtime": "qiskit-ibm-runtime"}
_missing = [pip for module, pip in _needed.items()
if importlib.util.find_spec(module) is None]
# One at a time, so a package that fails to install does not block the others
for _pip in _missing:
%pip install -q {_pip}
if not _missing:
print("\u2713 All required packages are installed")
from qiskit_ibm_runtime import QiskitRuntimeService

# Legacy server-side primitive before qiskit-ibm-runtime 0.50.0
# from qiskit_ibm_runtime import Sampler

# Client-side primitive introduced in qiskit-ibm-runtime 0.50.0
from qiskit_ibm_runtime.executor_sampler import 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

다음 단계​

권장 사항