-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate V1 Primitives and their utils (#12575)
* Deprecate V1 Primitives and their utils * Fix tests * Fix yaml error * Fix build * Fix error after mc * Fix error after mc * Apply comments * Use correct deprecate version for warning message * Update deprecation messages * Add missed `` * update releasenote * Deprecate SamplerResult and EstimatorResult * fix deprecation warning for SamplerResult and EstimatorResult * apply review comments Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]> * Applying the agreement of deprecations. - Revert BaseSamplerV1 and BaseEstimatorV1 - Deprecate BaseSampler and BaseEstimator #12497 (comment) * revert SamplerResult, EstimatorResult, and BasePrimitiveResult * fix test_backend_sampler * revert tox.ini * revise deprecation warning for BaseSampler and BaseEstimator * update reno * revert BaseSampler and BaseEstimator --------- Co-authored-by: Takashi Imamichi <[email protected]> Co-authored-by: Takashi Imamichi <[email protected]> Co-authored-by: Matthew Treinish <[email protected]> Co-authored-by: Elena Peña Tapia <[email protected]>
- Loading branch information
1 parent
6ce5250
commit 250acc3
Showing
19 changed files
with
540 additions
and
326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
deprecations_primitives: | ||
- | | ||
Primitives V1 is now deprecated and will be removed in no less than 3 months from the release date. | ||
The following Primitives V1 classes are deprecated: | ||
* :class:`.BaseEstimator`, use :class:`.BaseEstimatorV2` instead, | ||
* :class:`.BaseSampler`, use :class:`.BaseSamplerV2` instead, | ||
* :class:`.Estimator`, use :class:`.StatevectorEstimator` instead, | ||
* :class:`.Sampler`, use :class:`.StatevectorSampler` instead, | ||
* :class:`.BackendEstimator`, use :class:`.BackendEstimatorV2` instead, | ||
* :class:`.BackendSampler`, use :class:`.BackendSamplerV2` instead, | ||
In addition, the following utility functions are deprecated: | ||
* :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. | ||
Oops, something went wrong.