From 12bb0ef3a6af5ade89b004a2b51db77c7609f2a6 Mon Sep 17 00:00:00 2001 From: TsafrirA Date: Wed, 15 Nov 2023 23:49:09 +0200 Subject: [PATCH 1/2] Promote to deprecation + add release note. --- qiskit/qpy/binary_io/schedules.py | 4 ++-- ...recate-complex-amp-old-qpy-d3d183e84c395d9c.yaml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml diff --git a/qiskit/qpy/binary_io/schedules.py b/qiskit/qpy/binary_io/schedules.py index 83a023b9527b..ba700d2c38b8 100644 --- a/qiskit/qpy/binary_io/schedules.py +++ b/qiskit/qpy/binary_io/schedules.py @@ -169,10 +169,10 @@ def _read_symbolic_pulse(file_obj, version): # And warn that this will change in future releases: warnings.warn( - "Complex amp support for symbolic library pulses will be deprecated. " + "Complex amp support for symbolic library pulses will be deprecated in Qiskit 1.0.0. " "Once deprecated, library pulses loaded from old QPY files (Terra version < 0.23)," " will be converted automatically to float (amp,angle) representation.", - PendingDeprecationWarning, + DeprecationWarning, ) class_name = "ScalableSymbolicPulse" diff --git a/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml b/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml new file mode 100644 index 000000000000..3aa1de1a8d85 --- /dev/null +++ b/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml @@ -0,0 +1,13 @@ +--- +deprecations: + - | + Loading library :class:`~.qiskit.pulse.ScalableSymbolicPulse` objects with + complex ``amp`` parameter from + qpy files of version 5 or lower (Qiskit Terra < 0.23.0) is now deprecated. + Following the deprecation in Qiskit 1.0.0, complex `amp` will be automatically + converted to float (`amp`,`angle`). The change applies to the pulses: + + * :class:`~.qiskit.pulse.Constant` + * :class:`~.qiskit.pulse.Drag` + * :class:`~.qiskit.pulse.Gaussian` + * :class:`~.qiskit.pulse.GaussianSquare` From 5f5a7020e7d76e4b6c7ddb5c3f2c6b723626e561 Mon Sep 17 00:00:00 2001 From: TsafrirA Date: Thu, 16 Nov 2023 12:33:11 +0200 Subject: [PATCH 2/2] Fix --- qiskit/qpy/binary_io/schedules.py | 4 ++-- .../notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qiskit/qpy/binary_io/schedules.py b/qiskit/qpy/binary_io/schedules.py index ba700d2c38b8..1302698631e4 100644 --- a/qiskit/qpy/binary_io/schedules.py +++ b/qiskit/qpy/binary_io/schedules.py @@ -169,8 +169,8 @@ def _read_symbolic_pulse(file_obj, version): # And warn that this will change in future releases: warnings.warn( - "Complex amp support for symbolic library pulses will be deprecated in Qiskit 1.0.0. " - "Once deprecated, library pulses loaded from old QPY files (Terra version < 0.23)," + "Complex amp support for symbolic library pulses is deprecated. Once removed " + "in Qiskit 1.0.0, library pulses loaded from old QPY files (Terra version < 0.23)," " will be converted automatically to float (amp,angle) representation.", DeprecationWarning, ) diff --git a/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml b/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml index 3aa1de1a8d85..7e4ec10ab1eb 100644 --- a/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml +++ b/releasenotes/notes/deprecate-complex-amp-old-qpy-d3d183e84c395d9c.yaml @@ -4,8 +4,8 @@ deprecations: Loading library :class:`~.qiskit.pulse.ScalableSymbolicPulse` objects with complex ``amp`` parameter from qpy files of version 5 or lower (Qiskit Terra < 0.23.0) is now deprecated. - Following the deprecation in Qiskit 1.0.0, complex `amp` will be automatically - converted to float (`amp`,`angle`). The change applies to the pulses: + Following the removal in Qiskit 1.0.0, complex ``amp`` will be automatically + converted to float (``amp``,``angle``). The change applies to the pulses: * :class:`~.qiskit.pulse.Constant` * :class:`~.qiskit.pulse.Drag`