주 콘텐츠로 건너뛰기
번역 미완료

이 페이지는 아직 한국어로 번역되지 않았습니다. 영어 원본을 보고 있습니다.

Get started with the backend primitives

Unlike provider-specific primitives, backend primitives are generic implementations that can be used with an arbitrary backend object, as long as it implements the BackendV2 interface. Some providers implement primitives natively. See the Qiskit Ecosystem page for details.

Get started with the Estimator backend primitive

The Estimator primitive can be run with any provider by using the qiskit.primitives.BackendEstimatorV2 class. However, it offers no measurement or gate error mitigation implementations "out-of-the-box", as backend primitives are designed to run locally in the user's machine.

Example:

from qiskit.primitives import BackendEstimatorV2
from <some_qiskit_provider> import QiskitProvider

provider = QiskitProvider()
backend = provider.get_backend('backend_name')
estimator = BackendEstimatorV2(backend)

Get started with the Sampler backend primitive

The Sampler primitive can be run with any provider by using qiskit.primitives.BackendSamplerV2. However, it requires a backend that supports the memory option.

Example:

from qiskit.primitives import BackendSamplerV2
from <some_qiskit_provider> import QiskitProvider

provider = QiskitProvider()
backend = provider.get_backend('backend_name')
sampler = BackendSamplerV2(backend)

Next steps

Recommendations