diff --git a/qiskit/tools/jupyter/jupyter_magics.py b/qiskit/tools/jupyter/jupyter_magics.py index 6f90a1a76863..5fc9d92b7bb6 100644 --- a/qiskit/tools/jupyter/jupyter_magics.py +++ b/qiskit/tools/jupyter/jupyter_magics.py @@ -20,6 +20,7 @@ from IPython.core.magic import cell_magic, line_magic, Magics, magics_class, register_line_magic from qiskit.utils import optionals as _optionals +from qiskit.utils.deprecation import deprecate_func import qiskit from qiskit.tools.events.progressbar import TextProgressBar from .progressbar import HTMLProgressBar @@ -174,6 +175,10 @@ def qiskit_progress_bar(self, line="", cell=None): # pylint: disable=unused-arg if _optionals.HAS_MATPLOTLIB and get_ipython(): @register_line_magic + @deprecate_func( + since="0.25.0", + additional_msg="This was originally only for internal documentation and is no longer used.", + ) def circuit_library_info(circuit: qiskit.QuantumCircuit) -> None: """Displays library information for a quantum circuit. diff --git a/qiskit/tools/jupyter/library.py b/qiskit/tools/jupyter/library.py index 42eb4ded7a51..21a341871dbc 100644 --- a/qiskit/tools/jupyter/library.py +++ b/qiskit/tools/jupyter/library.py @@ -19,6 +19,7 @@ from qiskit import QuantumCircuit from qiskit.exceptions import MissingOptionalLibraryError from qiskit.utils import optionals as _optionals +from qiskit.utils.deprecation import deprecate_func try: import pygments @@ -49,6 +50,10 @@ def _generate_circuit_library_visualization(circuit: QuantumCircuit): plt.show() +@deprecate_func( + since="0.25.0", + additional_msg="This is unused by Qiskit, and no replacement will be publicly provided.", +) def circuit_data_table(circuit: QuantumCircuit) -> wid.HTML: """Create a HTML table widget for a given quantum circuit. @@ -114,6 +119,10 @@ def circuit_data_table(circuit: QuantumCircuit) -> wid.HTML: ) +@deprecate_func( + since="0.25.0", + additional_msg="This is unused by Qiskit, and no replacement will be publicly provided.", +) def properties_widget(circuit: QuantumCircuit) -> wid.VBox: """Create a HTML table widget with header for a given quantum circuit. @@ -130,6 +139,10 @@ def properties_widget(circuit: QuantumCircuit) -> wid.VBox: return properties +@deprecate_func( + since="0.25.0", + additional_msg="This is unused by Qiskit, and no replacement will be publicly provided.", +) def qasm_widget(circuit: QuantumCircuit) -> wid.VBox: """Generate a QASM widget with header for a quantum circuit. @@ -190,6 +203,10 @@ def qasm_widget(circuit: QuantumCircuit) -> wid.VBox: return qasm +@deprecate_func( + since="0.25.0", + additional_msg="This is unused by Qiskit, and no replacement will be publicly provided.", +) def circuit_diagram_widget() -> wid.Box: """Create a circuit diagram widget. @@ -212,6 +229,10 @@ def circuit_diagram_widget() -> wid.Box: return top +@deprecate_func( + since="0.25.0", + additional_msg="This is unused by Qiskit, and no replacement will be publicly provided.", +) def circuit_library_widget(circuit: QuantumCircuit) -> None: """Create a circuit library widget. diff --git a/releasenotes/notes/deprecate-circuit-library-jupyter-629f927e8dd5cc22.yaml b/releasenotes/notes/deprecate-circuit-library-jupyter-629f927e8dd5cc22.yaml new file mode 100644 index 000000000000..00a5a2487d20 --- /dev/null +++ b/releasenotes/notes/deprecate-circuit-library-jupyter-629f927e8dd5cc22.yaml @@ -0,0 +1,14 @@ +--- +deprecations: + - | + The Jupyter magic ``%circuit_library_info`` and the objects in ``qiskit.tools.jupyter.library`` + it calls in turn: + + - ``circuit_data_table`` + - ``properties_widget`` + - ``qasm_widget`` + - ``circuit_digram_widget`` + - ``circuit_library_widget`` + + are deprecated and will be removed in Terra 0.27. These objects were only intended for use in + the documentation build. They are no longer used there, so are no longer supported or maintained.