From 433393ae5e4a20200faa62b8b4cb95a3f9385e47 Mon Sep 17 00:00:00 2001 From: Daniel Puzzuoli Date: Mon, 18 Mar 2024 15:11:23 -0700 Subject: [PATCH] Compile 0.5.0 release notes (#345) --- .../0.4/carrier-freq-0-19ad4362c874944f.yaml | 7 -- .../classical-registers-9bb117398a4d21d5.yaml | 5 -- .../0.4/diffrax-bound-0bd80c01b7f4b48f.yaml | 5 -- ...ent_property_bug_fix-12461088823a943c.yaml | 11 ---- .../notes/0.4/move-repo-c0b48ba3b0ced8db.yaml | 9 --- ...ltiset-order-bug-fix-1f1603ee1e230cba.yaml | 6 -- ...malize-probabilities-d729245bb3fe5f10.yaml | 5 -- ...ystem_labels-removal-9fcc71c310eff220.yaml | 15 ----- .../0.5/0.5.0-notes-5d846b13c228f5c3.yaml | 64 +++++++++++++++++++ .../backend-arraylias-eb88f65de28bdf3c.yaml | 6 -- ...ch-array-deprecation-fb945946caba447a.yaml | 10 --- ...namics-backend-solve-fd42dac884ff80cc.yaml | 5 -- .../notes/model-changes-221fb43b3e9cc0dd.yaml | 12 ---- ...rbation-ordering-bug-efa3f6ce7559d2b9.yaml | 6 -- .../python-versions-655040935a2359c2.yaml | 4 -- ...lver-class-arraylias-80781bb527c3bf52.yaml | 15 ----- .../notes/update-jax-a50ce1b7d6b47219.yaml | 10 --- 17 files changed, 64 insertions(+), 131 deletions(-) delete mode 100644 releasenotes/notes/0.4/carrier-freq-0-19ad4362c874944f.yaml delete mode 100644 releasenotes/notes/0.4/classical-registers-9bb117398a4d21d5.yaml delete mode 100644 releasenotes/notes/0.4/diffrax-bound-0bd80c01b7f4b48f.yaml delete mode 100755 releasenotes/notes/0.4/measurement_property_bug_fix-12461088823a943c.yaml delete mode 100644 releasenotes/notes/0.4/move-repo-c0b48ba3b0ced8db.yaml delete mode 100644 releasenotes/notes/0.4/multiset-order-bug-fix-1f1603ee1e230cba.yaml delete mode 100644 releasenotes/notes/0.4/normalize-probabilities-d729245bb3fe5f10.yaml delete mode 100644 releasenotes/notes/0.4/subsystem_labels-removal-9fcc71c310eff220.yaml create mode 100644 releasenotes/notes/0.5/0.5.0-notes-5d846b13c228f5c3.yaml delete mode 100644 releasenotes/notes/backend-arraylias-eb88f65de28bdf3c.yaml delete mode 100644 releasenotes/notes/dispatch-array-deprecation-fb945946caba447a.yaml delete mode 100644 releasenotes/notes/dynamics-backend-solve-fd42dac884ff80cc.yaml delete mode 100644 releasenotes/notes/model-changes-221fb43b3e9cc0dd.yaml delete mode 100644 releasenotes/notes/perturbation-ordering-bug-efa3f6ce7559d2b9.yaml delete mode 100644 releasenotes/notes/python-versions-655040935a2359c2.yaml delete mode 100644 releasenotes/notes/solver-class-arraylias-80781bb527c3bf52.yaml delete mode 100644 releasenotes/notes/update-jax-a50ce1b7d6b47219.yaml diff --git a/releasenotes/notes/0.4/carrier-freq-0-19ad4362c874944f.yaml b/releasenotes/notes/0.4/carrier-freq-0-19ad4362c874944f.yaml deleted file mode 100644 index 10aa674b7..000000000 --- a/releasenotes/notes/0.4/carrier-freq-0-19ad4362c874944f.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - In the case that ``envelope`` is a constant, the :meth:`Signal.__init__` method has been updated - to not attempt to evaluate ``carrier_freq == 0.0`` if ``carrier_freq`` is a JAX tracer. In this - case, it is not possible to determine if the :class:`Signal` instance is constant. This resolves - an error that was being raised during JAX tracing if ``carrier_freq`` is abstract. \ No newline at end of file diff --git a/releasenotes/notes/0.4/classical-registers-9bb117398a4d21d5.yaml b/releasenotes/notes/0.4/classical-registers-9bb117398a4d21d5.yaml deleted file mode 100644 index 1f1403f28..000000000 --- a/releasenotes/notes/0.4/classical-registers-9bb117398a4d21d5.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Fixes bug in :meth:`DynamicsBackend.run` that caused miscounting of the number of classical - registers in a `QuantumCircuit` (issue #251). \ No newline at end of file diff --git a/releasenotes/notes/0.4/diffrax-bound-0bd80c01b7f4b48f.yaml b/releasenotes/notes/0.4/diffrax-bound-0bd80c01b7f4b48f.yaml deleted file mode 100644 index 293d6966f..000000000 --- a/releasenotes/notes/0.4/diffrax-bound-0bd80c01b7f4b48f.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -issues: - - | - Due to a bug in JAX, Dynamics can only be used with jax<=0.4.6. As they depend on newer versions - of JAX, Dynamics is also now only compatible with diffrax<=0.3.1 and equinox<=0.10.3. \ No newline at end of file diff --git a/releasenotes/notes/0.4/measurement_property_bug_fix-12461088823a943c.yaml b/releasenotes/notes/0.4/measurement_property_bug_fix-12461088823a943c.yaml deleted file mode 100755 index 9ba7a2394..000000000 --- a/releasenotes/notes/0.4/measurement_property_bug_fix-12461088823a943c.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -features: - - | - The :meth:`DynamicsBackend.from_backend` method has been updated to automatically populate the - `control_channel_map` option based on the supplied backend if the user does not supply one. - -fixes: - - | - A bug in :meth:`DynamicsBackend.__init__` causing existing measurement instructions for a user-supplied - :class:`Target` to be overwritten has been fixed. - diff --git a/releasenotes/notes/0.4/move-repo-c0b48ba3b0ced8db.yaml b/releasenotes/notes/0.4/move-repo-c0b48ba3b0ced8db.yaml deleted file mode 100644 index ae189342d..000000000 --- a/releasenotes/notes/0.4/move-repo-c0b48ba3b0ced8db.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -other: - - | - The repository has been moved from - [github.com/Qiskit/qiskit-dynamics](https://github.com/Qiskit/qiskit-dynamics) to - [github.com/Qiskit-Extensions/qiskit-dynamics](https://github.com/Qiskit-Extensions/qiskit-dynamics), - and the [documentation](https://qiskit-extensions.github.io/qiskit-dynamics/) has been moved from - qiskit.org/documentation/dynamics - qiskit.org/ecosystem/dynamics \ No newline at end of file diff --git a/releasenotes/notes/0.4/multiset-order-bug-fix-1f1603ee1e230cba.yaml b/releasenotes/notes/0.4/multiset-order-bug-fix-1f1603ee1e230cba.yaml deleted file mode 100644 index eb1110ce1..000000000 --- a/releasenotes/notes/0.4/multiset-order-bug-fix-1f1603ee1e230cba.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixes a bug in the perturbation module with internal sorting of ``Multiset`` instances, which - caused incorrect computation of perturbation theory terms when ``>10`` perturbations are - present. diff --git a/releasenotes/notes/0.4/normalize-probabilities-d729245bb3fe5f10.yaml b/releasenotes/notes/0.4/normalize-probabilities-d729245bb3fe5f10.yaml deleted file mode 100644 index 568d77eaf..000000000 --- a/releasenotes/notes/0.4/normalize-probabilities-d729245bb3fe5f10.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - ``DynamicsBackend.options.normalize_states`` now also controls whether or not the probability - distribution over outcomes is normalized before sampling outcomes. diff --git a/releasenotes/notes/0.4/subsystem_labels-removal-9fcc71c310eff220.yaml b/releasenotes/notes/0.4/subsystem_labels-removal-9fcc71c310eff220.yaml deleted file mode 100644 index a444fbb94..000000000 --- a/releasenotes/notes/0.4/subsystem_labels-removal-9fcc71c310eff220.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -upgrade: - - | - The ``subsystem_labels`` option has been removed from the :class:`.DynamicsBackend`. This - removal impacts some technical aspects of the backend returned by - :meth:`.DynamicsBackend.from_backend` when the ``subsystem_list`` argument is used. Using the - ``subsystem_list`` argument with :meth:`.DynamicsBackend.from_backend` restricts the internally - constructed model to the qubits in ``subsystem_list``. When doing so previously, the option - ``subsystem_labels`` would be set to ``subsystem_labels``, and ``subsystem_dims`` would record - only the dimensions for the systems in ``subsystem_labels``. To account for the fact that - ``subsystem_labels`` no longer exists, :meth:`.DynamicsBackend.from_backend` now constructs - ``subsystem_dims`` to list a dimension for all of the qubits in the original backend, however - now the dimensions of the removed systems are given as 1 (i.e. they are treated as trivial - quantum systems with a single state). This change is made only for technical bookkeping - purposes, and has no impact on the core simulation behaviour. \ No newline at end of file diff --git a/releasenotes/notes/0.5/0.5.0-notes-5d846b13c228f5c3.yaml b/releasenotes/notes/0.5/0.5.0-notes-5d846b13c228f5c3.yaml new file mode 100644 index 000000000..891dc911c --- /dev/null +++ b/releasenotes/notes/0.5/0.5.0-notes-5d846b13c228f5c3.yaml @@ -0,0 +1,64 @@ +--- +prelude: > + + | Qiskit Dynamics ``0.5.0`` introduces a major change to the internal array dispatching + mechanism. Users can now work directly with their supported array library of choice, without + the need to personally manage the dispatching behaviour using the :class:`.Array` class as in + previous versions. Internally, Qiskit Dynamics now uses `Arraylias + `_ for dispatching. See the :ref:`user guide + entry on using different array libraries with Qiskit Dynamics ` for more details on the updated approach. + + | To accompany this change, arguments that explicitly control the array library used to store + matrices (e.g. ``evaluation_mode``) in models and related classes have also been changed. See + the upgrade notes for a list of such changes, as well as the updated :ref:`user guide on + configuring simulations for performance ` for how to use the new + versions of these arguments. + + | Due to the scale of these changes, this release will generally break any pre-existing + Dynamics code utilizing :class:`.Array` or any of the aformentioned model and solver + arguments. The :class:`.Array` class and ``array`` and ``dispatch`` submodules have been + deprecated, and will be removed in ``0.6.0``. The documentation for the previous release + ``0.4.5`` is still available `here + `_. +features: + - | + Adds the :meth:`.DynamicsBackend.solve` method for running simulations of circuits and schedules + for arbitrary input types, and returning the ODE simulation results. +deprecations: + - | + The ``array`` and ``dispatch`` submodules of Qiskit Dynamics have been deprecated as of version + 0.5.0, and will be removed in version ``0.6.0``. +upgrade: + - | + Support for Python 3.12 has been added, and Python 3.8 has been dropped. + - | + The upper bound on JAX and Diffrax in the last version of Qiskit Dynamics has been removed. + Users should try to use the latest version of JAX. + - | + The interface for :class:`.GeneratorModel`, :class:`.HamiltonianModel`, and + :class:`.LindbladModel` have been modified. The ``copy`` method has been removed, and all setter + methods other than ``in_frame_basis`` and ``signals`` have been removed. The ``evaluation_mode`` + construction argument has been replaced by ``array_library``, which controls which array library + is used internally to store and evaluate operations, and the additional ``vectorized`` boolean + argument has been added to :class:`.LindbladModel` to control whether the equation is evaluated + in vectorized mode. Note that, regardless of array library used, dense arrays must be supplied + to the constructors of these classes, due to peculiarities of the internal setup for sparse + libraries. + - | + In conjunction with the change to the ``evaluation_mode`` argument in the model classes, the + :class:`.Solver` class has been updated to take the ``array_library`` constructor argument, as + well as the ``vectorized`` constructor argument (for use when Lindblad terms are present). + - | + Similar to the :class:`.Solver` initialization method, the :meth:`.DynamicsBackend.from_backend` + constructor method argument ``evaluation_mode`` has been removed and replaced by the arguments + ``array_library`` and ``vectorized``. + - | + The logic in :meth:`.Solver.solve` for automatic ``jit`` compiling when using JAX and simulating + a list of schedules has been updated to no longer be based on when ``Array.default_backend() == + "jax"``. The attempted automatic ``jit`` now occurs based purely on whether + ``method="jax_odeint"``, or ``method`` is a Diffrax integration method. A warning will be raised + if the ``array_library`` is not known to be compatible with the compilation routine. (For now, + ``"scipy_sparse"`` is the only ``array_library`` not compatible with this routine, however a + warning will still be raised if no explicit ``array_library`` is provided, as in this case the + JAX-compatibility is unknown.) \ No newline at end of file diff --git a/releasenotes/notes/backend-arraylias-eb88f65de28bdf3c.yaml b/releasenotes/notes/backend-arraylias-eb88f65de28bdf3c.yaml deleted file mode 100644 index 018c8d4fb..000000000 --- a/releasenotes/notes/backend-arraylias-eb88f65de28bdf3c.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -upgrade: - - | - Similar to the :class:`.Solver` initialization method, the :meth:`.DynamicsBackend.from_backend` - constructor method argument ``evaluation_mode`` has been removed and replaced by the arguments - ``array_library`` and ``vectorized``. \ No newline at end of file diff --git a/releasenotes/notes/dispatch-array-deprecation-fb945946caba447a.yaml b/releasenotes/notes/dispatch-array-deprecation-fb945946caba447a.yaml deleted file mode 100644 index 0fbe684cc..000000000 --- a/releasenotes/notes/dispatch-array-deprecation-fb945946caba447a.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -upgrade: - - | - The ``array`` and ``dispatch`` submodules of Qiskit Dynamics have been deprecated as of version - 0.5.0. The use of the ``Array`` class is no longer required to work with different array - libraries in Qiskit Dynamics, and is broken in some cases. Refer to the :ref:`user guide entry - on using different array libraries with Qiskit Dynamics `. - Users can now work directly with the supported array type of their choice, without the need to - wrap them to enable dispatching. The ``array`` and ``dispatch`` submodules will be removed in - version 0.6.0. \ No newline at end of file diff --git a/releasenotes/notes/dynamics-backend-solve-fd42dac884ff80cc.yaml b/releasenotes/notes/dynamics-backend-solve-fd42dac884ff80cc.yaml deleted file mode 100644 index 5080e1ac1..000000000 --- a/releasenotes/notes/dynamics-backend-solve-fd42dac884ff80cc.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -features: - - | - Adds the :meth:`.DynamicsBackend.solve` method for running simulations of circuits and schedules - for arbitrary input types, and returning the ODE simulation results. \ No newline at end of file diff --git a/releasenotes/notes/model-changes-221fb43b3e9cc0dd.yaml b/releasenotes/notes/model-changes-221fb43b3e9cc0dd.yaml deleted file mode 100644 index 05ff10a34..000000000 --- a/releasenotes/notes/model-changes-221fb43b3e9cc0dd.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -upgrade: - - | - The interface for :class:`.GeneratorModel`, :class:`.HamiltonianModel`, and - :class:`.LindbladModel` has been modified. The ``copy`` method has been removed, and all setter - methods other than ``in_frame_basis`` and ``signals`` have been removed. The ``evaluation_mode`` - construction argument has been replaced by ``array_library``, which controls which array library - is used internally to store and evaluate operations, and the additional ``vectorized`` boolean - argument has been added to :class:`.LindbladModel` to control whether the equation is evaluated - in vectorized mode. Note that, regardless of array library used, dense arrays must be supplied - to the constructors of these classes, due to peculiarities of the internal setup for sparse - libraries. \ No newline at end of file diff --git a/releasenotes/notes/perturbation-ordering-bug-efa3f6ce7559d2b9.yaml b/releasenotes/notes/perturbation-ordering-bug-efa3f6ce7559d2b9.yaml deleted file mode 100644 index 84f352d4b..000000000 --- a/releasenotes/notes/perturbation-ordering-bug-efa3f6ce7559d2b9.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixes a bug in :func:`.solve_lmde_perturbation` in which the ``perturbation_labels`` argument - was being unexpectedly re-ordered, leading to errors when retrieving results. - diff --git a/releasenotes/notes/python-versions-655040935a2359c2.yaml b/releasenotes/notes/python-versions-655040935a2359c2.yaml deleted file mode 100644 index 1196a2014..000000000 --- a/releasenotes/notes/python-versions-655040935a2359c2.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -upgrade: - - | - Support for Python 3.12 has been added, and Python 3.8 has been dropped. \ No newline at end of file diff --git a/releasenotes/notes/solver-class-arraylias-80781bb527c3bf52.yaml b/releasenotes/notes/solver-class-arraylias-80781bb527c3bf52.yaml deleted file mode 100644 index 3c792f92a..000000000 --- a/releasenotes/notes/solver-class-arraylias-80781bb527c3bf52.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -upgrade: - - | - In conjunction with the change to the ``evaluation_mode`` argument in the model classes, the - :class:`.Solver` class has been updated to take the ``array_library`` constructor argument, as - well as the ``vectorized`` constructor argument (for use when Lindblad terms are present). - - | - The logic in :meth:`.Solver.solve` for automatic ``jit`` compiling when using JAX and simulating - a list of schedules has been updated to no longer be based on when - ``Array.default_backend() == "jax"``. The attempted automatic ``jit`` compiling in this case - is now based only when whether either ``method="jax_odeint"``, or ``method`` is a Diffrax - integration method. A warning will be raised if the ``array_library`` is not known to be - compatible with the compilation routine. (For now, ``"scipy_sparse"`` is the only - ``array_library`` not compatible with this routine, however a warning will still be raised if - no explicit ``array_library`` is provided, as in this case the JAX-compatibility is unknown.) \ No newline at end of file diff --git a/releasenotes/notes/update-jax-a50ce1b7d6b47219.yaml b/releasenotes/notes/update-jax-a50ce1b7d6b47219.yaml deleted file mode 100644 index cf80785d4..000000000 --- a/releasenotes/notes/update-jax-a50ce1b7d6b47219.yaml +++ /dev/null @@ -1,10 +0,0 @@ ---- -issues: - - | - A JAX warning about casting complex values to real is raised when computing gradients of - simulations in Qiskit Dynamics. Note that this warning does not appear to signify any error - in numerical computation, and can be safely ignored. -upgrade: - - | - The upper bound on JAX and Diffrax in the last version of Qiskit Dynamics has been removed. - Users should try to use the latest version of JAX. \ No newline at end of file