Repository: Qiskit/qiskit

Issue:
Remove code deprecated in 0.15 (released on August 06, 2020)
There is code released 36 month old that needs to be removed. 
 - qiskit/visualization/state_visualization.py:39 (`plot_state_hinton`)
 - qiskit/visualization/state_visualization.py:257 (`plot_bloch_multivector`)
 - qiskit/visualization/state_visualization.py:365 (`plot_state_city`)
 - qiskit/visualization/state_visualization.py:625 (`plot_state_paulivec`)
 - qiskit/visualization/state_visualization.py:799 (`plot_state_qsphere`)
 - qiskit/scheduler/utils.py:18 (`utils.format_meas_map`)
 - qiskit/scheduler/utils.py:23 (`macros.measure`)
 - qiskit/scheduler/utils.py:27 (`macros.measure_all`)

This includes:
- [ ] Remove deprecated code and tests (if they only check the deprecation raise)
- [ ] tag the PR as [`Changelog: Removal`](https://github.com/Qiskit/qiskit/labels/Changelog%3A%20Removal)
- [ ] create a release note in the category `upgrade:`. If you can include an example with an alternative for user to migrate to the new code, as this change might break users code.


Discussion:
Hello @1ucian0 thanks for posting some updated 'good first issues'. This seems like an issue that I might be able to tackle. Can you assign me here?
done. Thanks! I would recommend you to do it in two PRs: one for visualization, one for the scheduler.
Noted, thanks!

Resolving patch:
diff --git a/qiskit/scheduler/__init__.py b/qiskit/scheduler/__init__.py
--- a/qiskit/scheduler/__init__.py
+++ b/qiskit/scheduler/__init__.py
@@ -29,4 +29,3 @@
 """
 from qiskit.scheduler import schedule_circuit
 from qiskit.scheduler.config import ScheduleConfig
-from qiskit.scheduler.utils import measure, measure_all
diff --git a/qiskit/scheduler/utils.py b/qiskit/scheduler/utils.py
deleted file mode 100644
--- a/qiskit/scheduler/utils.py
+++ /dev/null
@@ -1,29 +0,0 @@
-# This code is part of Qiskit.
-#
-# (C) Copyright IBM 2019.
-#
-# This code is licensed under the Apache License, Version 2.0. You may
-# obtain a copy of this license in the LICENSE.txt file in the root directory
-# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
-#
-# Any modifications or derivative works of this code must retain this
-# copyright notice, and modified files need to carry a notice indicating
-# that they have been altered from the originals.
-
-"""Scheduling utility functions."""
-
-from qiskit.utils.deprecation import deprecate_function
-from qiskit.pulse import macros, utils
-
-format_meas_map = deprecate_function(
-    '"format_meas_map" has been moved to "qiskit.pulse.utils"',
-    since="0.15.0",
-)(utils.format_meas_map)
-
-measure = deprecate_function('"measure" has been moved to "qiskit.pulse.macros"', since="0.15.0")(
-    macros.measure
-)
-
-measure_all = deprecate_function(
-    '"measure_all" has been moved to "qiskit.pulse.macros"', since="0.15.0"
-)(macros.measure_all)
diff --git a/qiskit/visualization/state_visualization.py b/qiskit/visualization/state_visualization.py
--- a/qiskit/visualization/state_visualization.py
+++ b/qiskit/visualization/state_visualization.py
@@ -27,7 +27,7 @@
 from qiskit.quantum_info.operators.operator import Operator
 from qiskit.quantum_info.operators.symplectic import PauliList, SparsePauliOp
 from qiskit.quantum_info.states.densitymatrix import DensityMatrix
-from qiskit.utils.deprecation import deprecate_arg, deprecate_func
+from qiskit.utils.deprecation import deprecate_func
 from qiskit.utils import optionals as _optionals
 from qiskit.circuit.tools.pi_check import pi_check
 
@@ -36,11 +36,8 @@
 from .exceptions import VisualizationError
 
 
-@deprecate_arg("rho", new_alias="state", since="0.15.1")
 @_optionals.HAS_MATPLOTLIB.require_in_call
-def plot_state_hinton(
-    state, title="", figsize=None, ax_real=None, ax_imag=None, *, rho=None, filename=None
-):
+def plot_state_hinton(state, title="", figsize=None, ax_real=None, ax_imag=None, *, filename=None):
     """Plot a hinton diagram for the density matrix of a quantum state.
 
     The hinton diagram represents the values of a matrix using
@@ -254,14 +251,12 @@ def plot_bloch_vector(
     return None
 
 
-@deprecate_arg("rho", new_alias="state", since="0.15.1")
 @_optionals.HAS_MATPLOTLIB.require_in_call
 def plot_bloch_multivector(
     state,
     title="",
     figsize=None,
     *,
-    rho=None,
     reverse_bits=False,
     filename=None,
     font_size=None,
@@ -362,7 +357,6 @@ def plot_bloch_multivector(
         return fig.savefig(filename)
 
 
-@deprecate_arg("rho", new_alias="state", since="0.15.1")
 @_optionals.HAS_MATPLOTLIB.require_in_call
 def plot_state_city(
     state,
@@ -373,7 +367,6 @@ def plot_state_city(
     ax_real=None,
     ax_imag=None,
     *,
-    rho=None,
     filename=None,
 ):
     """Plot the cityscape of quantum state.
@@ -622,11 +615,8 @@ def plot_state_city(
         return fig.savefig(filename)
 
 
-@deprecate_arg("rho", new_alias="state", since="0.15.1")
 @_optionals.HAS_MATPLOTLIB.require_in_call
-def plot_state_paulivec(
-    state, title="", figsize=None, color=None, ax=None, *, rho=None, filename=None
-):
+def plot_state_paulivec(state, title="", figsize=None, color=None, ax=None, *, filename=None):
     r"""Plot the Pauli-vector representation of a quantum state as bar graph.
 
     The Pauli-vector of a density matrix :math:`\rho` is defined by the expectation of each
@@ -796,7 +786,6 @@ def phase_to_rgb(complex_number):
     return rgb
 
 
-@deprecate_arg("rho", new_alias="state", since="0.15.1")
 @_optionals.HAS_MATPLOTLIB.require_in_call
 @_optionals.HAS_SEABORN.require_in_call
 def plot_state_qsphere(
@@ -807,7 +796,6 @@ def plot_state_qsphere(
     show_state_phases=False,
     use_degrees=False,
     *,
-    rho=None,
     filename=None,
 ):
     """Plot the qsphere representation of a quantum state.


Test patch: