qiskit/releasenotes/notes/2.0/remove-v1-primitive-impl-65...

35 lines
1.8 KiB
YAML

---
upgrade_primitives:
- |
Primitive V1 implementations and V1-exclusive non-versioned type aliases, deprecated in
Qiskit 1.2, have been removed. These interfaces have been superseded by their V2 counterparts.
The removal includes the following classes implementing V1 interfaces:
* :class:`.Estimator`, in favor of the V2 equivalent, :class:`.StatevectorEstimator`
* :class:`.Sampler`, in favor of the V2 equivalent, :class:`.StatevectorSampler`
* :class:`.BackendEstimator`, in favor of the V2 equivalent, :class:`.BackendEstimatorV2`
* :class:`.BackendSampler`, in favor of the V2 equivalent, :class:`.BackendSamplerV2`
As well as the following non-versioned type aliases:
* :class:`.BaseEstimator`, alias for :class:`.BaseEstimatorV1`
* :class:`.BaseSampler`, alias for :class:`.BaseSamplerV1`
This removal does NOT affect the explicitly-versioned :class:`BaseEstimatorV1`
and :class:`BaseSamplerV1` abstract
interface definitions or related result and job classes, which have been kept to maintain
backward compatibitily.
In addition, the following utility functions have been removed. These functions were only
used in Primitive V1 implementations:
* :func:`.init_circuit`, to initialize a circuit from a :class:`.Statevector`,
use :meth:`.QuantumCircuit.initialize` instead,
* :func:`.init_observable`, use the constructor of :class:`.SparsePauliOp` instead,
* :func:`.final_measurement_mapping`, use :meth:`.QuantumCircuit.layout` and
:meth:`.SparsePauliOp.apply_layout` to adjust an operator for a layout.
Otherwise, use ``mthree.utils.final_measurement_mapping``.
See `Mthree Utility functions <https://qiskit-extensions.github.io/mthree/apidocs/utils.html>`__
for details.