From cbc9d5e6b99f2431fa4d33487e26469619a25462 Mon Sep 17 00:00:00 2001 From: Luciano Bello Date: Tue, 24 Dec 2024 15:36:50 +0100 Subject: [PATCH] raise DeprecationWarning for a targetless timeline drawer --- qiskit/visualization/timeline/interface.py | 2 +- releasenotes/notes/followup_13247-9511e4e8d3d88a42.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/followup_13247-9511e4e8d3d88a42.yaml diff --git a/qiskit/visualization/timeline/interface.py b/qiskit/visualization/timeline/interface.py index 686e0fe1d810..cf9892e26fe6 100644 --- a/qiskit/visualization/timeline/interface.py +++ b/qiskit/visualization/timeline/interface.py @@ -369,7 +369,7 @@ def draw( warnings.warn( "Target is not specified. In Qiskit 2.0.0 this will be required to get the duration of " "instructions.", - PendingDeprecationWarning, + DeprecationWarning, stacklevel=2, ) diff --git a/releasenotes/notes/followup_13247-9511e4e8d3d88a42.yaml b/releasenotes/notes/followup_13247-9511e4e8d3d88a42.yaml new file mode 100644 index 000000000000..402ca004f44c --- /dev/null +++ b/releasenotes/notes/followup_13247-9511e4e8d3d88a42.yaml @@ -0,0 +1,5 @@ +--- +deprecations_visualization: + - | + The timeline drawer :func:`~qiskit.visualization.timeline.interface.draw` now needs a ``target`` + to get the duration of instructions. From Qiskit 2.0 on, ``target`` will be required and fail if not specified.