This commit is contained in:
Rebecca Dimock 2024-08-02 13:53:53 -05:00
parent 5a8546769f
commit 817813358f
1 changed files with 9 additions and 9 deletions

View File

@ -264,15 +264,15 @@ print(f" > Metadata: {result.metadata[0]}")
<span id="backend"></span>
## Get started with the backend primitives
Unlike provider-specific primitives, backend primitives are generic implementations that can be used with an arbitrary
Unlike provider-specific primitives, backend primitives are generic implementations that can be used with an arbitrary
`backend` object, as long as it implements the [`Backend`](/api/qiskit/qiskit.providers.Backend) interface.
The `Sampler` primitive can be run with any provider by using [`qiskit.primitives.BackendSamplerV2`](/api/qiskit/qiskit.primitives.BackendSamplerV2)
or the legacy V1 implementation, [`qiskit.primitives.BackendSampler`](/api/qiskit/qiskit.primitives.BackendSampler).
Likewise, the `Estimator` primitive can be run with any provider using [`qiskit.primitives.BackendEstimatorV2`](../api/qiskit/qiskit.primitives.BackendEstimatorV2),
or the legacy V1 implementation, [`qiskit.primitives.BackendEstimator`](/api/qiskit/qiskit.primitives.BackendEstimator).
- The `Sampler` primitive can be run with any provider by using [`qiskit.primitives.BackendSamplerV2`](/api/qiskit/qiskit.primitives.BackendSamplerV2)
or the deprecated V1 implementation, [`qiskit.primitives.BackendSampler`](/api/qiskit/qiskit.primitives.BackendSampler).
- The `Estimator` primitive can be run with any provider by using [`qiskit.primitives.BackendEstimatorV2`](../api/qiskit/qiskit.primitives.BackendEstimatorV2),
or the deprecated V1 implementation, [`qiskit.primitives.BackendEstimator`](/api/qiskit/qiskit.primitives.BackendEstimator).
Some providers implement primitives natively (see [the Qiskit Ecosystem page](https://qiskit.github.io/ecosystem#provider) for more details).
Some providers implement primitives natively. See the [Qiskit Ecosystem page](https://qiskit.github.io/ecosystem#provider) for details.
### Example: BackendEstimator
@ -329,15 +329,15 @@ sampler = BackendSampler(backend)
### Similarities and differences between backend and Runtime primitives (V2)
- The inputs to [`qiskit.primitives.BackendSamplerV2`](/api/qiskit/qiskit.primitives.BackendSamplerV2) and [`qiskit.primitives.BackendEstimatorV2`](../api/qiskit/qiskit.primitives.BackendEstimatorV2)
follow the same PUB format as the primitives in Qiskit Runtime, so do the outputs, see (link to https://docs.quantum.ibm.com/guides/primitive-input-output).
follow the same PUB format as the primitives in Qiskit Runtime, so do the outputs, see [Primitive inputs and outputs](primitive-input-output) for details.
However, there can be differences in the fields of the returned metadata.
- The [`qiskit.primitives.BackendEstimatorV2`](/api/qiskit/qiskit.primitives.BackendEstimatorV2) class 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.
backend primitives are designed to run locally in the user's machine.
- The [`qiskit.primitives.BackendSamplerV2`](/api/qiskit/qiskit.primitives.BackendSamplerV2) class requires a backend that supports the `memory` option.
- The backend primitives V2 interfaces expose custom `Sampler` and `Estimator` `Options` for that are different to the Runtime implementations.
- The backend primitives V2 interfaces expose custom `Sampler` and `Estimator` `Options` for that are different to the Runtime implementations.
## Next steps