Skip to content

Commit

Permalink
Adding deprecation warnings for new noise learner format (Qiskit#1848)
Browse files Browse the repository at this point in the history
* json

* warnings

* revert

* 0.27.0

* release
  • Loading branch information
SamFerracin authored and ihincks committed Aug 12, 2024
1 parent 5e3ab31 commit 01945db
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
28 changes: 28 additions & 0 deletions qiskit_ibm_runtime/utils/noise_learner_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from qiskit.circuit import QuantumCircuit
from qiskit.quantum_info import PauliList

from ..utils.deprecation import issue_deprecation_msg


class PauliLindbladError:
r"""A Pauli error channel generated by a Pauli Lindblad dissipators.
Expand Down Expand Up @@ -136,6 +138,32 @@ def error(self) -> PauliLindbladError:
"""
return self._error

@property
def generators(self) -> PauliList:
r"""
(DEPRECATED) The Pauli Lindblad generators of the error channel in this :class:`.~LayerError`.
"""
issue_deprecation_msg(
"The ``generators`` property is deprecated",
"0.27.0",
"Instead, you can access the generators through the ``error`` property.",
1,
)
return self.error.generators

@property
def rates(self) -> NDArray[np.float64]:
r"""
(DEPRECATED) The Lindblad generator rates of the error channel in this :class:`.~LayerError`.
"""
issue_deprecation_msg(
"The ``rates`` property is deprecated",
"0.27.0",
"Instead, you can access the rates through the ``error`` property.",
1,
)
return self.error.rates

@property
def num_qubits(self) -> int:
r"""
Expand Down
1 change: 1 addition & 0 deletions release-notes/unreleased/1844.feat.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added ``PauliLindbladError`` and ``LayerError`` classes to represent layers noise processes.

0 comments on commit 01945db

Please sign in to comment.