Skip to content

Commit

Permalink
Deprecate show_idle and show_barrier in favor of idle_wires and…
Browse files Browse the repository at this point in the history
… `plot_barriers` (Qiskit#13602)

* Deprecate show_idle and show_barrier in favor of idle_wires and plot_barriers

* skip deprecation for pulses
  • Loading branch information
1ucian0 authored Jan 14, 2025
1 parent f13673b commit 02e1476
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion qiskit/pulse/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ def wrapper(*args, **kwargs):
return decorator


@deprecate_arg("show_barriers", new_alias="plot_barriers", since="1.1.0", pending=True)
@deprecate_arg("show_barriers", new_alias="plot_barriers", since="1.4")
@_common_method(Schedule, ScheduleBlock)
def draw(
self,
Expand Down
2 changes: 0 additions & 2 deletions qiskit/visualization/pulse_v2/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@
from qiskit.visualization.exceptions import VisualizationError
from qiskit.visualization.pulse_v2 import core, device_info, stylesheet, types
from qiskit.exceptions import MissingOptionalLibraryError
from qiskit.utils import deprecate_arg
from qiskit.utils.deprecate_pulse import deprecate_pulse_dependency


@deprecate_pulse_dependency(moving_to_dynamics=True)
@deprecate_arg("show_barrier", new_alias="plot_barrier", since="1.1.0", pending=True)
def draw(
program: Union[Waveform, SymbolicPulse, Schedule, ScheduleBlock],
style: Optional[Dict[str, Any]] = None,
Expand Down
4 changes: 2 additions & 2 deletions qiskit/visualization/timeline/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
from qiskit.utils import deprecate_arg


@deprecate_arg("show_idle", new_alias="idle_wires", since="1.1.0", pending=True)
@deprecate_arg("show_barriers", new_alias="plot_barriers", since="1.1.0", pending=True)
@deprecate_arg("show_idle", new_alias="idle_wires", since="1.4")
@deprecate_arg("show_barriers", new_alias="plot_barriers", since="1.4")
def draw(
program: circuit.QuantumCircuit,
style: Optional[Dict[str, Any]] = None,
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/followup_11878-839c93ab3029d315.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
deprecations_visualization:
- |
The parameters ``show_idle`` and ``show_barrier`` in the timeline drawers had been replaced by ``idle_wires`` and ``plot_barriers``
respectively to match the circuit drawer parameters. Their previous names will be removed in Qiskit 2.0.
The new parameters are fully equivalent.

0 comments on commit 02e1476

Please sign in to comment.