주 콘텐츠로 건너뛰기

옵션 소개

프리미티브에 옵션을 전달하여 필요에 맞게 사용자 정의할 수 있습니다. 이 섹션은 Qiskit Runtime 프리미티브 옵션에 초점을 맞춥니다. 프리미티브의 run() 메서드 인터페이스는 모든 구현에서 공통이지만, 옵션은 그렇지 않습니다. qiskit.primitivesqiskit_aer.primitives 옵션에 대한 정보는 해당 API 참조를 참조하세요.

개요

구조

프리미티브를 호출할 때 옵션 클래스 또는 딕셔너리를 사용하여 옵션을 전달할 수 있습니다. resilience_level과 같이 자주 사용되는 옵션은 첫 번째 수준에 있습니다. 다른 옵션은 execution과 같은 다양한 카테고리로 그룹화됩니다. 자세한 내용은 프리미티브 옵션 설정 섹션을 참조하세요.

기본값

옵션의 값을 지정하지 않으면 Unset의 특수 값이 지정되고 서버 기본값이 사용됩니다. 따라서 코드 버전에 관계없이 기본값은 동일합니다.

옵션 클래스 요약 섹션의 표에 기본값이 나열되어 있습니다.

옵션 설정

프리미티브가 구성되기 전에 옵션을 정의하고 프리미티브에 전달할 수 있으며, 이 때 복사본이 만들어집니다. 이는 중첩 딕셔너리 또는 옵션 클래스를 사용하여 수행할 수 있습니다. 또한 프리미티브가 구성된 후에도 옵션을 변경할 수 있습니다. 애플리케이션에 가장 적합한 워크플로를 사용하세요. 자세한 내용은 옵션 지정을 참조하세요.

옵션 클래스 요약

  • Dynamical decoupling: 동적 디커플링에 대한 옵션이에요.
  • Environment: 설정할 로깅 수준이나 추가할 작업 태그 같은 실행 환경 옵션이에요.
  • Execution: Qubit 초기화 여부나 반복 지연 같은 Primitive 실행 옵션이에요.
  • Resilience: 측정 오류 완화, ZNE, PEC 같은 오류 완화 방법을 설정하기 위한 고급 옵션이에요.
  • Simulator: 기본 게이트, 시뮬레이터 시드, 결합 맵 같은 시뮬레이터 옵션이에요. 로컬 테스트 모드에만 적용돼요.
  • Twirling: 2 Qubit Gate twirling 적용 여부나 각 무작위 샘플에 대해 실행할 샷 수 같은 twirling 옵션이에요.

사용 가능한 옵션

다음 표는 qiskit-ibm-runtime의 최신 버전에서의 옵션을 문서화합니다. 이전 옵션 버전을 보려면 qiskit-ibm-runtime API 참조를 방문하여 이전 버전을 선택하세요.

default_shots

회로당 구성당 사용할 총 샷 수입니다.

Choices: Integer >= 0

Default: None

default_shots API documentation

default_precision

정밀도를 지정하지 않는 PUB 또는 run() 호출에 사용할 기본 정밀도입니다.

Choices: Float > 0

Default: 0.015625 (1 / sqrt(4096))

default_precision API documentation

dynamical_decoupling

동적 디커플링 오류 완화 설정을 제어합니다.

dynamical_decoupling API documentation

dynamical_decoupling.enable

Choices: True, False

Default: False

dynamical_decoupling.extra_slack_distribution

Choices: middle, edges

Default: middle

dynamical_decoupling.scheduling_method

Choices: asap, alap Default: alap

dynamical_decoupling.sequence_type

Choices: XX, XpXm, XY4 Default: XX

dynamical_decoupling.skip_reset_qubits

Choices: True, False Default: False

environment

environment API documentation

environment.callback

Job IDJob result를 받는 콜러블 함수입니다.

Choices: None

Default: None

environment.job_tags

태그 목록입니다.

Choices: None

Default: None

environment.log_level

Choices: DEBUG, INFO, WARNING, ERROR, CRITICAL

Default: WARNING

environment.private

Choices: True, False

Default: False

execution

execution API documentation

execution.init_qubits

각 샷마다 Qubit를 기저 상태로 리셋할지 여부입니다.

Choices: True, False

Default: True

execution.rep_delay

측정과 후속 양자 회로 사이의 지연입니다.

Choices: Value in the range supplied by backend.rep_delay_range

Default: Given by backend.default_rep_delay

max_execution_time

Choices: Integer number of seconds in the range [1, 10800]

Default: 10800 (3 hours)

max_execution_time API documentation

resilience

복원력 전략을 세밀하게 조정하기 위한 고급 복원력 옵션입니다.

resilience API documentation

resilience.layer_noise_learning

레이어 노이즈 학습 옵션입니다.

resilience.layer_noise_learning API documentation

resilience.layer_noise_learning.layer_pair_depths

Choices: list[int] of 2-10 values in the range [0, 200]

Default: (0, 1, 2, 4, 16, 32)

resilience.layer_noise_learning.max_layers_to_learn

Choices: None, Integer >= 1

Default: 4

resilience.layer_noise_learning.num_randomizations

Choices: Integer >= 1

Default: 32

resilience.layer_noise_learning.shots_per_randomization

Choices: Integer >= 1

Default: 128

resilience.layer_noise_model

Choices: NoiseLearnerResult, Sequence[LayerError]

Default: None

resilience.measure_mitigation

Choices: True, False

Default: True

resilience.measure_noise_learning

Options for measurement noise learning.

resilience.measure_noise_learning API documentation

resilience.measure_noise_learning.num_randomizations

Choices: Integer >= 1

Default: 32

resilience.measure_noise_learning.shots_per_randomization

Choices: Integer, auto

Default: auto

resilience.pec_mitigation

Choices: True, False

Default: False

resilience.pec

Probabilistic error cancellation mitigation options.

resilience.pec API documentation

resilience.pec.max_overhead

Choices: None, Integer >= 1

Default: 100

resilience.pec.noise_gain

Choices: auto, float in the range [0, 1]

Default: auto

resilience.zne_mitigation

Choices: True, False

Default: False

resilience.zne

resilience.zne.amplifier

Choices: gate_folding, gate_folding_front, gate_folding_back, pea

Default: gate_folding

resilience.zne.extrapolated_noise_factors

Choices: List of floats

Default: [0, *noise_factors]

resilience.zne.extrapolator

Choices: One or more of: exponential, linear, double_exponential, polynomial_degree_(1 <= k <= 7), fallback

Default: (exponential, linear)

resilience.zne.noise_factors

Choices: List of floats; each float >= 1

Default: (1, 1.5, 2) for PEA, and (1, 3, 5) otherwise

resilience_level

오류에 대한 복원력을 얼마나 구축할지를 나타냅니다. 높은 수준일수록 더 긴 처리 시간을 대가로 더 정확한 결과를 생성합니다.

Choices: 0, 1, 2

Default: 1

resilience_level API documentation

seed_estimator

Choices: Integer

Default: None

seed_estimator

simulator

Options to pass when simulating a backend

simulator API documentation

simulator.basis_gates

Choices: List of basis gate names to unroll to

Default: The set of all basis gates supported by Qiskit Aer simulator

simulator.coupling_map

Choices: List of directed two-qubit interactions

Default: None, which implies no connectivity constraints (full connectivity).

simulator.noise_model

Choices: Qiskit Aer NoiseModel, or its representation

Default: None

simulator.seed_simulator

Choices: Integer

Default: None

twirling

Twirling options

twirling API documentation

twirling.enable_gates

Choices: True, False

Default: False

twirling.enable_measure

Choices: True, False

Default: True

twirling.num_randomizations

Choices: auto, Integer >= 1

Default: auto

twirling.shots_per_randomization

Choices: auto, Integer >= 1

Default: auto

twirling.strategy

Choices: active, active-circuit, active-accum, all

Default: active-accum

experimental

사용 가능한 실험적 옵션입니다.

기능 호환성

장치 컴파일 프로세스의 차이로 인해 특정 런타임 기능은 단일 작업에서 함께 사용할 수 없습니다. 선택한 기능과 호환되지 않는 기능 목록을 보려면 적절한 탭을 클릭하세요:

호환되지 않는 기능:

  • Gate-folding ZNE
  • PEA
  • PEC
  • Dynamical decoupling

기타 참고:

  • 비조건부 Gate에 대해 Gate 트월링과 함께 사용할 수 있습니다.
  • qiskit-ibm-runtime v0.42.0 이상 사용 시 분수 Gate와 호환됩니다.

다음 단계

권장 사항