Skip to content

Commit

Permalink
Deprecate simulator noise_model option (#1892)
Browse files Browse the repository at this point in the history
* Deprecate simulator noise model option

* Add release note
  • Loading branch information
kt474 authored Aug 28, 2024
1 parent 6a9f38c commit d01b07d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions qiskit_ibm_runtime/base_primitive.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ def _run(self, pubs: Union[list[EstimatorPub], list[SamplerPub]]) -> RuntimeJobV

logger.info("Submitting job using options %s", primitive_options)

if not isinstance(self._service, QiskitRuntimeLocalService):
if primitive_options.get("options", {}).get("simulator", {}).get("noise_model"):
issue_deprecation_msg(
msg="The noise_model option is deprecated",
version="0.29.0",
remedy="Use the local testing mode instead.",
period="3 months",
stacklevel=3,
)

# Batch or Session
if self._mode:
return self._mode.run(
Expand Down
2 changes: 2 additions & 0 deletions release-notes/unreleased/1892.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The simulator option ``noise_model`` is now deprecated for jobs running on real devices.
``noise_model`` will still be an acceptable option when using the local testing mode.

0 comments on commit d01b07d

Please sign in to comment.