Skip to main content
IBM Quantum Platform
번역 정보

이 페이지의 추가 언어 번역이 곧 제공될 예정입니다.

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
이 페이지가 도움이 되었습니까?
GitHub에서 버그, 오타를 보고하거나 컨텐츠를 요청하십시오.