Skip to content

Commit

Permalink
add deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
nkanazawa1989 committed Mar 28, 2022
1 parent 805f246 commit 1f0f976
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qiskit_experiments/curve_analysis/visualization/curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@

from qiskit_experiments.curve_analysis.curve_data import FitData
from qiskit_experiments.framework.matplotlib import get_non_gui_ax
from qiskit_experiments.warnigs import deprecated_logic


@deprecated_logic(version_removed="0.4")
def plot_curve_fit(
func: Callable,
result: FitData,
Expand Down Expand Up @@ -94,6 +96,7 @@ def plot_curve_fit(
return ax


@deprecated_logic(version_removed="0.4")
def plot_scatter(
xdata: np.ndarray,
ydata: np.ndarray,
Expand Down Expand Up @@ -138,6 +141,7 @@ def plot_scatter(
return ax


@deprecated_logic(version_removed="0.4")
def plot_errorbar(
xdata: np.ndarray,
ydata: np.ndarray,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from qiskit_experiments.curve_analysis.curve_data import SeriesDef, FitData, CurveData
from qiskit_experiments.framework import AnalysisResultData
from qiskit_experiments.framework.matplotlib import get_non_gui_ax
from qiskit_experiments.warnigs import deprecated_logic
from .curves import plot_scatter, plot_errorbar, plot_curve_fit
from .style import PlotterStyle

Expand All @@ -40,6 +41,7 @@ class MplDrawSingleCanvas:
"""A plotter to draw a single canvas figure for fit result."""

@classmethod
@deprecated_logic(version_removed="0.4")
def draw(
cls,
series_defs: List[SeriesDef],
Expand Down Expand Up @@ -140,6 +142,7 @@ class MplDrawMultiCanvasVstack:
"""A plotter to draw a vertically stacked multi canvas figure for fit result."""

@classmethod
@deprecated_logic(version_removed="0.4")
def draw(
cls,
series_defs: List[SeriesDef],
Expand Down Expand Up @@ -288,6 +291,7 @@ def draw(
return figure


@deprecated_logic(version_removed="0.4")
def draw_single_curve_mpl(
axis: "matplotlib.axes.Axes",
series_def: SeriesDef,
Expand Down Expand Up @@ -341,6 +345,7 @@ def draw_single_curve_mpl(
)


@deprecated_logic(version_removed="0.4")
def write_fit_report(result_entries: List[AnalysisResultData]) -> str:
"""A function that generates fit reports documentation from list of data.
Expand Down
2 changes: 2 additions & 0 deletions qiskit_experiments/curve_analysis/visualization/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
"""
import dataclasses
from typing import Tuple, List
from qiskit_experiments.warnigs import deprecated_class


@dataclasses.dataclass
@deprecated_class(version_removed="0.4")
class PlotterStyle:
"""A stylesheet for curve analysis figure."""

Expand Down

0 comments on commit 1f0f976

Please sign in to comment.