NoiseLearner
class NoiseLearner(mode=None, options=None)
베이스: object
노이즈 학습 실험을 실행하기 위한 클래스입니다.
노이즈 학습자 클래스를 사용하면 [1에서] 설명한 폴리-린드블라드 노이즈 모델을 기반으로 관심 있는 하나 이상의 회로에서 게이트에 영향을 미치는 노이즈 프로세스를 특성화할 수 있습니다.
메서드를 사용하면 run() 메서드를 사용하면 회로 목록에 대한 노이즈 학습자 작업을 실행할 수 있습니다. 작업이 제출된 후 게이트는 독립된 레이어로 수집되고, 이후 결과 레이어는 개별적으로 특성화됩니다.
게이트가 레이어로 수집되는 방식은 주어진 options 에 지정된 회전 strategy 에 따라 달라집니다( NoiseLearnerOptions 를 참조하세요.) 모든 전략은 장벽을 따릅니다. 예를 들어, 3개의 ISA가 얽혀 있는 관심 레이어가 있는 경우, 회전하려는 큐비트에 작용하는 장벽으로 분리된 하나의 회로에 넣고 strategy="active-circuit" 을 선택합니다.
다음 코드 조각은 노이즈 학습기를 사용하여 두 개의 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, 잡음이 많은 양자 프로세서에서 희소 폴리-린드블라드 모델을 사용한 확률론적 오류 제거, Nature Physics 19권, 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)또는, 튜플이나 (circuit, observables) 와 같은 추정기 pub-like(원시 통합 블록) 객체를 지정할 수도 있습니다. 이 경우, 펍과 유사한 객체들은 회로 목록으로 변환되며, 그 외의 모든 필드(예: observables 및 parameter_values)는 무시됩니다.
리턴
제출된 작업입니다.
리턴 유형