Skip to content

Commit

Permalink
Deprecate V1 primitives (#1591)
Browse files Browse the repository at this point in the history
* deprecate V1

* linter fixes

* Update qiskit_ibm_runtime/base_primitive.py

Co-authored-by: Kevin Tian <kt474@cornell.edu>

* Update qiskit_ibm_runtime/base_primitive.py

Co-authored-by: Kevin Tian <kt474@cornell.edu>

---------

Co-authored-by: Kevin Tian <kt474@cornell.edu>
  • Loading branch information
ptristan3 and kt474 committed Apr 15, 2024
1 parent e547286 commit 8f9a59e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qiskit_ibm_runtime/base_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,14 @@ def __init__(
self._service: QiskitRuntimeService | QiskitRuntimeLocalService = None
self._backend: Optional[BackendV1 | BackendV2] = None

issue_deprecation_msg(
"The Sampler and Estimator V1 primitives have been deprecated",
"0.23.0",
"Please use the V2 Primitives. See the `V2 migration guide "
"<https://docs.quantum.ibm.com/api/migration-guides/v2-primitives>`_. for more details",
3,
)

if options is None:
self._options = asdict(Options())
elif isinstance(options, Options):
Expand Down

0 comments on commit 8f9a59e

Please sign in to comment.