From 33ed1634d98482f34d25ce6cfa300af219bfe5b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Pe=C3=B1a=20Tapia?= <57907331+ElePT@users.noreply.github.com> Date: Fri, 3 Nov 2023 12:42:18 +0100 Subject: [PATCH] Prepare 0.45.0 release (#11169) * Edit last batch of notes * Edit notes from rc1 * Remove 0.25 backports from releasenotes/notes/0.45 * Remove 0.25 backports from releasenotes/notes * Add config for reno sections * Add reno sections * Change version number to 0.45.0 * Add prelude * Add missing sections, order sections alphabetically * Restore fixes release notes * Remove fixes_quantum_info * Minor fixes * Fix release notes heading level * Fix indentation * Apply suggestions from code review Co-authored-by: Matthew Treinish * Apply suggestions from code review * Attempt to fix sphinx complaint * Another attempt to fix Sphinx complaint * Refactor prelude, hopefully fix Sphinx? * Fix duplicated categories * Fix typo * Fixes in the prelude * Flatten reno subsections * Apply suggestions from Matt's code review Co-authored-by: Matthew Treinish * Fix config * Apply suggestions from Matt's code review - part 2 * Correct typos from applying suggestions * Add gate map viz plot * Fix some api refs * Apply suggestions from Matt's code review Co-authored-by: Matthew Treinish * Add suggestions from Matt's code review * Update qiskit/circuit/__init__.py Co-authored-by: Matthew Treinish * Last try at reno subsections * Revert "Last try at reno subsections" This reverts commit 1b8a610666cf9380741f9b37bcae21477322e8b5. * Apply suggestions from Matt's code review Co-authored-by: Matthew Treinish --------- Co-authored-by: Matthew Treinish --- docs/release_notes.rst | 4 +- qiskit/VERSION.txt | 2 +- qiskit/circuit/__init__.py | 21 ++++ qiskit_pkg/setup.py | 4 +- releasenotes/config.yaml | 46 +++++++ .../notes/0.45/10787-078d7caa70fc7de8.yaml | 7 -- ...t.compiler.scheduler-a0366d3397c73af0.yaml | 19 +-- ...annotated-operations-de35a0d8d98eec23.yaml | 5 +- ...near-and-permutation-7a2bdbaae7c1c7e8.yaml | 8 +- .../add-expr-to-drawers-7a1ffa802064cad7.yaml | 2 +- ...-commutation-checker-66a1b9e90921621f.yaml | 2 +- ...operator-draw-method-47f0381ba3f2a280.yaml | 6 +- ...d-passmanager-module-3ae30cff52cb83f1.yaml | 112 +++++++++--------- ...py-symbolic-encoding-81d5321af38f259f.yaml | 4 +- ...abre-starting-layout-7e151b7abb8a6c13.yaml | 2 +- ...k-option-UnitaryGate-fb3fad8a9ac3c156.yaml | 2 +- .../notes/0.45/add-target-to-hls.yaml | 2 +- ...-parameterexpression-57693dd69103dc8c.yaml | 7 +- ...estimator-v2-support-a698353aeeb5236c.yaml | 5 - .../change-mpl-default-55c19d84713f276c.yaml | 10 +- ...l-validation-bug-fix-c06f8445cecc8478.yaml | 5 - .../dag-appenders-check-84d4ef20c1e20fd0.yaml | 2 +- ...-deprecate-none-args-e6ef868148da275d.yaml | 2 +- .../0.45/dd-pg-10833-ddddee68ffd913c4.yaml | 7 -- ...decimals_for_sampler-5aaa56642cce23e0.yaml | 2 +- ...reserved-plugin-name-3825c2000a579e38.yaml | 4 +- ...cate-algorithm-utils-6cdc5856015a7e65.yaml | 6 +- ...cate-bind-parameters-283c94069e8a9142.yaml | 2 +- ...deprecate-duplicates-a871f83bbbe1c96f.yaml | 4 +- ...deprecate-extensions-d7ab3fca19962e2e.yaml | 6 +- .../deprecate-unroller-2081d35d6d83e7e9.yaml | 8 +- ...ay-control-flow-text-8db4f15a68bf5322.yaml | 5 +- ...pr-rvalue-conditions-8b5d5f7c015658c0.yaml | 83 ------------- ...-coupling-map-reduce-bb19e35ec939570d.yaml | 4 +- ...ifford-from-diagonal-7708654373bd5b8b.yaml | 7 -- ...yout-in-apply-layout-dfbdbde593cf7929.yaml | 15 --- ...regbundle-transpiled-482979d57382b1dc.yaml | 16 --- .../fix-gate-direction-d8bc96b62b27dba8.yaml | 7 -- ...t-with-filter-qubits-171894cb758356ca.yaml | 9 -- ...alization-of-transpile-initial-layout.yaml | 6 - .../fix-parameter-hash-d22c270090ffc80e.yaml | 2 +- ...-qasm2-final-comment-f0904c3e13215a00.yaml | 5 - ...ed-custom-controlled-2a23dfe828bc46c8.yaml | 6 - ...ted-controlled-gates-e19fc4ee65a22756.yaml | 9 -- ...ix-sabre-performance-1b4503b6ecde6d13.yaml | 6 - ...-unscheduled-warning-873f7a24c6b51e2c.yaml | 2 +- .../notes/0.45/fix_9363-445db8fde1244e57.yaml | 40 ------- ..._pauli_new_style_bit-0704933127b4debe.yaml | 5 - .../0.45/h_basic_aer-3fc5e6776f0de9c1.yaml | 4 +- ...th-recursion-and-ucd-b559beb3a148fe59.yaml | 2 +- ...jacent-barriers-pass-c0cd064bdd059811.yaml | 4 +- .../keep-initial-resets-a5f75cb16c8edb57.yaml | 17 ++- ...ts-basis-translation-09380145f3cf97fc.yaml | 2 +- ...a-qubits-deprecation-d616c3fc24250d22.yaml | 4 +- ...ise-parameter-assign-398ed4f2074ca201.yaml | 9 +- ...-unsorted-parameters-310e5f2420771f49.yaml | 2 +- ...ecplot-normalization-5dd3cf3393c75afb.yaml | 7 -- ...ives-dynamic-circuit-b489f82df47af138.yaml | 3 - ...-fix-zero-op-barrier-4af211b119d5b24d.yaml | 13 -- .../qasm2-float-decimal-76b44281d9249f7a.yaml | 8 -- .../0.45/qasm2-new-api-4e1e4803d6a5a175.yaml | 4 +- ...d_custom_instruction-7738db7ba1a1a5cf.yaml | 8 -- ...qiskit_terra_version-956916f7b8d7bbb9.yaml | 7 +- ...eprecated-bip-mapper-e1206c8f905502dd.yaml | 10 +- ...recated-code-in-0.19-a97ccfec62405b9a.yaml | 19 ++- ...recated-code-in-0.22-128475199e6f3cc2.yaml | 8 +- ...cated-code-in-0.22.0-139fa09ee0cc6df9.yaml | 8 +- ...ated-in-quantum-info-0f9bd2b0c093307d.yaml | 6 +- ...-toqm-optional-extra-90e974b64ec4a3bd.yaml | 8 -- ...skit_scheduler_utils-fab5ec8a7ceddb56.yaml | 10 +- .../0.45/remove_8070-09b64e3a2aca1c2d.yaml | 9 +- ...ecated_functionality-13b33f9dfa7d690a.yaml | 4 +- ...epreciated_0.15_code-ee5c7d343e310888.yaml | 12 +- ...oved_deprecated_0.21-6c93f7bbc50ae40e.yaml | 22 ++-- ...ved_deprecation_0.20-17b0ea6a3980eb4f.yaml | 19 ++- .../0.45/rust-1.64-add4a4a8e5ce9786.yaml | 7 +- ...pler-with-no-measure-6cd3a05555187b58.yaml | 5 - ...ed-sabre-with-layout-17d46e1a6f516b0e.yaml | 2 +- .../single-pulse-rx-cal-347aadcee7bfe60b.yaml | 22 ++-- .../0.45/singletons-83782de8bd062cbc.yaml | 37 +++--- ...auli-op-apply-layout-43149125d29ad015.yaml | 2 +- ...straint-pauli-setter-52f6f89627d1937c.yaml | 6 - ...-pauli-op-num-qubits-9c1a3f7dcc7949b9.yaml | 4 +- ...pty-delete-for-pauli-16c5c5fae890c16c.yaml | 5 - ...deprecated-bit-index-7277aa6e2a903cb7.yaml | 2 +- ...-layout-improvements-118dd902d93e5b96.yaml | 2 +- .../unitary-overlap-7dde87a8e2d7a1f7.yaml | 4 +- .../unitary-u-not-u3-0a32c2d968f7890e.yaml | 5 +- ...e-map-visualizations-6ea907a0502fdc1a.yaml | 13 +- ...c-optimizer-typehint-34b54c6278d23f79.yaml | 3 +- ...-message-qpy-version-cf0763da22ce2224.yaml | 9 -- ...-plot-state-city-viz-2963c83bcf3d3347.yaml | 9 +- .../fix_backend_name-e84661707058b529.yaml | 7 -- .../notes/prepare-0.45-50118e5e6d110302.yaml | 41 +++++++ .../notes/vf2-threading-b778a36de5b8832a.yaml | 11 +- setup.py | 2 +- 96 files changed, 398 insertions(+), 574 deletions(-) delete mode 100644 releasenotes/notes/0.45/10787-078d7caa70fc7de8.yaml delete mode 100644 releasenotes/notes/0.45/backend-estimator-v2-support-a698353aeeb5236c.yaml delete mode 100644 releasenotes/notes/0.45/channel-validation-bug-fix-c06f8445cecc8478.yaml delete mode 100644 releasenotes/notes/0.45/dd-pg-10833-ddddee68ffd913c4.yaml delete mode 100644 releasenotes/notes/0.45/expr-rvalue-conditions-8b5d5f7c015658c0.yaml delete mode 100644 releasenotes/notes/0.45/fix-clifford-from-diagonal-7708654373bd5b8b.yaml delete mode 100644 releasenotes/notes/0.45/fix-final-layout-in-apply-layout-dfbdbde593cf7929.yaml delete mode 100644 releasenotes/notes/0.45/fix-flow-cregbundle-transpiled-482979d57382b1dc.yaml delete mode 100644 releasenotes/notes/0.45/fix-gate-direction-d8bc96b62b27dba8.yaml delete mode 100644 releasenotes/notes/0.45/fix-handling-of-mixed-ideal-target-with-filter-qubits-171894cb758356ca.yaml delete mode 100644 releasenotes/notes/0.45/fix-input-normalization-of-transpile-initial-layout.yaml delete mode 100644 releasenotes/notes/0.45/fix-qasm2-final-comment-f0904c3e13215a00.yaml delete mode 100644 releasenotes/notes/0.45/fix-qpy-nested-custom-controlled-2a23dfe828bc46c8.yaml delete mode 100644 releasenotes/notes/0.45/fix-qpy-repeated-controlled-gates-e19fc4ee65a22756.yaml delete mode 100644 releasenotes/notes/0.45/fix-sabre-performance-1b4503b6ecde6d13.yaml delete mode 100644 releasenotes/notes/0.45/fix_9363-445db8fde1244e57.yaml delete mode 100644 releasenotes/notes/0.45/fix_pauli_new_style_bit-0704933127b4debe.yaml delete mode 100644 releasenotes/notes/0.45/paulivecplot-normalization-5dd3cf3393c75afb.yaml delete mode 100644 releasenotes/notes/0.45/primitives-dynamic-circuit-b489f82df47af138.yaml delete mode 100644 releasenotes/notes/0.45/qasm2-fix-zero-op-barrier-4af211b119d5b24d.yaml delete mode 100644 releasenotes/notes/0.45/qasm2-float-decimal-76b44281d9249f7a.yaml delete mode 100644 releasenotes/notes/0.45/qasm_invalid_custom_instruction-7738db7ba1a1a5cf.yaml delete mode 100644 releasenotes/notes/0.45/remove-toqm-optional-extra-90e974b64ec4a3bd.yaml delete mode 100644 releasenotes/notes/0.45/sampler-with-no-measure-6cd3a05555187b58.yaml delete mode 100644 releasenotes/notes/0.45/sparse-pauli-op-constraint-pauli-setter-52f6f89627d1937c.yaml delete mode 100644 releasenotes/notes/0.45/support-empty-delete-for-pauli-16c5c5fae890c16c.yaml delete mode 100644 releasenotes/notes/fix-error-message-qpy-version-cf0763da22ce2224.yaml delete mode 100644 releasenotes/notes/fix_backend_name-e84661707058b529.yaml create mode 100644 releasenotes/notes/prepare-0.45-50118e5e6d110302.yaml diff --git a/docs/release_notes.rst b/docs/release_notes.rst index a9d629df850..16078eef37e 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -1,8 +1,8 @@ .. _release-notes: -============= +%%%%%%%%%%%%% Release Notes -============= +%%%%%%%%%%%%% This page contains the release notes for Qiskit, starting from the point at which the legacy "elements" structure was completely removed. For release notes stretching back through the old diff --git a/qiskit/VERSION.txt b/qiskit/VERSION.txt index 27edeeb5c03..bcce5d06b8a 100644 --- a/qiskit/VERSION.txt +++ b/qiskit/VERSION.txt @@ -1 +1 @@ -0.45.0rc1 +0.45.0 diff --git a/qiskit/circuit/__init__.py b/qiskit/circuit/__init__.py index 1a41c299d53..de10c6d240f 100644 --- a/qiskit/circuit/__init__.py +++ b/qiskit/circuit/__init__.py @@ -294,6 +294,7 @@ BreakLoopOp ContinueLoopOp + The :class:`.SwitchCaseOp` also understands a special value: .. py:data:: CASE_DEFAULT @@ -349,6 +350,25 @@ .. autofunction:: random_circuit .. currentmodule:: qiskit.circuit +Circuit Analysis +---------------- + +.. autosummary:: + :toctree: ../stubs/ + + CommutationChecker + +Annotated Operations +-------------------- + +.. autosummary:: + :toctree: ../stubs/ + + AnnotatedOperation + ControlModifier + PowerModifier + InverseModifier + Exceptions ---------- @@ -384,6 +404,7 @@ from .register import Register from . import library from .commutation_checker import CommutationChecker +from .annotated_operation import AnnotatedOperation, ControlModifier, PowerModifier, InverseModifier from .controlflow import ( ControlFlowOp, diff --git a/qiskit_pkg/setup.py b/qiskit_pkg/setup.py index 6148d3d8a96..3db3aa707fd 100644 --- a/qiskit_pkg/setup.py +++ b/qiskit_pkg/setup.py @@ -26,11 +26,11 @@ with open(README_PATH) as readme_file: README = readme_file.read() -requirements = ["qiskit-terra==0.45.0rc1"] +requirements = ["qiskit-terra==0.45.0"] setup( name="qiskit", - version="0.45.0rc1", + version="0.45.0", description="Software for developing quantum computing programs", long_description=README, long_description_content_type="text/markdown", diff --git a/releasenotes/config.yaml b/releasenotes/config.yaml index 141d552cd9f..bb9a5c4715e 100644 --- a/releasenotes/config.yaml +++ b/releasenotes/config.yaml @@ -1,3 +1,49 @@ --- encoding: utf8 default_branch: main +collapse_pre_releases: true +sections: + - [features, New Features] + - [features_algorithms, Algorithms Features] + - [features_circuits, Circuits Features] + - [features_primitives, Primitives Features] + - [features_providers, Providers Features] + - [features_pulse, Pulse Features] + - [features_qasm, OpenQASM Features] + - [features_qpy, QPY Features] + - [features_quantum_info, Quantum Information Features] + - [features_synthesis, Synthesis Features] + - [features_transpiler, Transpiler Features] + - [features_visualization, Visualization Features] + - [features_misc, Misc. Features] + - [issues, Known Issues] + - [upgrade, Upgrade Notes] + - [upgrade_algorithms, Algorithms Upgrade Notes] + - [upgrade_circuits, Circuits Upgrade Notes] + - [upgrade_primitives, Primitives Upgrade Notes] + - [upgrade_providers, Providers Upgrade Notes] + - [upgrade_pulse, Pulse Upgrade Notes] + - [upgrade_qasm, OpenQASM Upgrade Notes] + - [upgrade_qpy, QPY Upgrade Notes] + - [upgrade_quantum_info, Quantum Information Upgrade Notes] + - [upgrade_synthesis, Synthesis Upgrade Notes] + - [upgrade_transpiler, Transpiler Upgrade Notes] + - [upgrade_visualization, Visualization Upgrade Notes] + - [upgrade_misc, Misc. Upgrade Notes] + - [deprecations, Deprecation Notes] + - [deprecations_algorithms, Algorithms Deprecations] + - [deprecations_circuits, Circuits Deprecations] + - [deprecations_primitives, Primitives Deprecations] + - [deprecations_providers, Providers Deprecations] + - [deprecations_pulse, Pulse Deprecations] + - [deprecations_qasm, OpenQASM Deprecations] + - [deprecations_qpy, QPY Deprecations] + - [deprecations_quantum_info, Quantum Information Deprecations] + - [deprecations_synthesis, Synthesis Deprecations] + - [deprecations_transpiler, Transpiler Deprecations] + - [deprecations_visualization, Visualization Deprecations] + - [deprecations_misc, Misc. Deprecations] + - [critical, Critical Issues] + - [security, Security Issues] + - [fixes, Bug Fixes] + - [other, Other Notes] diff --git a/releasenotes/notes/0.45/10787-078d7caa70fc7de8.yaml b/releasenotes/notes/0.45/10787-078d7caa70fc7de8.yaml deleted file mode 100644 index ae22987bb75..00000000000 --- a/releasenotes/notes/0.45/10787-078d7caa70fc7de8.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fix the Quantum Shannon Decomposition implemented in :func:`.qs_decomposition`. When a unitary - could not take advantage of the diagonal commutation optimization, it used to error. - Now, it leaves it as undecomposed 2-qubit unitary gate. - Fixes `#10787 `__ diff --git a/releasenotes/notes/0.45/Adding-BackendV2-support-to-schedule-of-qiskit.compiler.scheduler-a0366d3397c73af0.yaml b/releasenotes/notes/0.45/Adding-BackendV2-support-to-schedule-of-qiskit.compiler.scheduler-a0366d3397c73af0.yaml index d1831bf84d5..c611d64bebb 100644 --- a/releasenotes/notes/0.45/Adding-BackendV2-support-to-schedule-of-qiskit.compiler.scheduler-a0366d3397c73af0.yaml +++ b/releasenotes/notes/0.45/Adding-BackendV2-support-to-schedule-of-qiskit.compiler.scheduler-a0366d3397c73af0.yaml @@ -1,21 +1,22 @@ --- -features: +features_pulse: - | - Enables circuit to pulse scheduling using BackendV2. - + Enabled circuit-to-pulse scheduling using :class:`~.BackendV2`. + .. code-block:: python - - # import a fake backend which is a sub-class of BackendV2. + + # import a fake backend which is a sub-class of BackendV2 from qiskit.providers.fake_provider import FakePerth from qiskit.compiler.scheduler import schedule from qiskit.circuit import QuantumCircuit - + qc = QuantumCircuit(1, 1) qc.x(0) qc.measure(0,0) sched = schedule(circuits=qc, backend=FakePerth()) - Since, BackendV2 was not supported by the :func:`~qiskit.compiler.schedule` function, this caused - schedule method to error out when the :code:`backend` argument is supplied with :class:`.BackendV2`. - Refer to `#10837 ` for more information. + Since :class:`.BackendV2` was not supported by the :func:`~qiskit.compiler.schedule` + function, this caused the :meth:`~.schedule` method to error out when the ``backend`` + argument was supplied with an instance of :class:`.BackendV2`. + Refer to `#10837 `_ for more information. diff --git a/releasenotes/notes/0.45/add-annotated-operations-de35a0d8d98eec23.yaml b/releasenotes/notes/0.45/add-annotated-operations-de35a0d8d98eec23.yaml index ca9a0abca85..3ac5fdb2bd7 100644 --- a/releasenotes/notes/0.45/add-annotated-operations-de35a0d8d98eec23.yaml +++ b/releasenotes/notes/0.45/add-annotated-operations-de35a0d8d98eec23.yaml @@ -1,5 +1,5 @@ --- -features: +features_circuits: - | Added a new class :class:`~.AnnotatedOperation` that is a subclass of :class:`~.Operation` and represents some "base operation" modified by a @@ -55,6 +55,7 @@ features: As of now, the annotated operations can appear only in the top-level of a quantum circuit, that is they cannot appear inside of the recursively-defined ``definition`` circuit. We are planning to remove this limitation later. +features_transpiler: - | - The :class:`.HighLevelSynthesis` is extended to synthesize circuits with objects + The :class:`.HighLevelSynthesis` class is extended to synthesize circuits with objects of type :class:`~.AnnotatedOperation`. diff --git a/releasenotes/notes/0.45/add-clifford-from-linear-and-permutation-7a2bdbaae7c1c7e8.yaml b/releasenotes/notes/0.45/add-clifford-from-linear-and-permutation-7a2bdbaae7c1c7e8.yaml index 5e9ac7ee6a7..6a634d2a41c 100644 --- a/releasenotes/notes/0.45/add-clifford-from-linear-and-permutation-7a2bdbaae7c1c7e8.yaml +++ b/releasenotes/notes/0.45/add-clifford-from-linear-and-permutation-7a2bdbaae7c1c7e8.yaml @@ -1,8 +1,8 @@ --- -features: +features_quantum_info: - | Added :meth:`.Clifford.from_linear_function` and :meth:`.Clifford.from_permutation` - methods that create a ``Clifford`` object from :class:`~.LinearFunction` - and from :class:`~.PermutationGate` respectively. As a consequence, a ``Clifford`` - can now be constructed directly from a ``LinearFunction``, a ``PermutationGate``, or + methods that create a :class:`.Clifford` object from :class:`~.LinearFunction` + and from :class:`~.PermutationGate` respectively. As a consequence, a :class:`.Clifford` + can now be constructed directly from a :class:`~.LinearFunction`, a :class:`.PermutationGate`, or a quantum circuit containing such gates. diff --git a/releasenotes/notes/0.45/add-expr-to-drawers-7a1ffa802064cad7.yaml b/releasenotes/notes/0.45/add-expr-to-drawers-7a1ffa802064cad7.yaml index 19557ff377a..bf925ac3e70 100644 --- a/releasenotes/notes/0.45/add-expr-to-drawers-7a1ffa802064cad7.yaml +++ b/releasenotes/notes/0.45/add-expr-to-drawers-7a1ffa802064cad7.yaml @@ -1,5 +1,5 @@ --- -features: +features_visualization: - | Added the ability to display conditions as expressions from :class:`.Expr` in the :meth:`.QuantumCircuit.draw` method and the diff --git a/releasenotes/notes/0.45/add-limits-in-commutation-checker-66a1b9e90921621f.yaml b/releasenotes/notes/0.45/add-limits-in-commutation-checker-66a1b9e90921621f.yaml index 9b8bc641108..cf66a7306a3 100644 --- a/releasenotes/notes/0.45/add-limits-in-commutation-checker-66a1b9e90921621f.yaml +++ b/releasenotes/notes/0.45/add-limits-in-commutation-checker-66a1b9e90921621f.yaml @@ -1,5 +1,5 @@ --- -features: +features_circuits: - | Added a new option ``max_num_qubits`` to :meth:`qiskit.circuit.CommutationChecker.commute` that specifies the maximum number of qubits to consider for the more expensive diff --git a/releasenotes/notes/0.45/add-operator-draw-method-47f0381ba3f2a280.yaml b/releasenotes/notes/0.45/add-operator-draw-method-47f0381ba3f2a280.yaml index 063846950f9..00d04674352 100644 --- a/releasenotes/notes/0.45/add-operator-draw-method-47f0381ba3f2a280.yaml +++ b/releasenotes/notes/0.45/add-operator-draw-method-47f0381ba3f2a280.yaml @@ -1,7 +1,7 @@ --- -features: +features_quantum_info: - | - The :class:`Operator` class now has a :meth:`~.Operator.draw` method allowing it to be displayed as - a text matrix, IPython LaTeX object or LaTeX source. The default draw type still is the ASCII + The :class:`.Operator` class now has a :meth:`~.Operator.draw` method allowing it to be displayed as + a text matrix, IPython LaTeX object or LaTeX source. The default draw type still is the ASCII ``__repr__`` of the operator. diff --git a/releasenotes/notes/0.45/add-passmanager-module-3ae30cff52cb83f1.yaml b/releasenotes/notes/0.45/add-passmanager-module-3ae30cff52cb83f1.yaml index 9e2947b7e53..dd01f15f29c 100644 --- a/releasenotes/notes/0.45/add-passmanager-module-3ae30cff52cb83f1.yaml +++ b/releasenotes/notes/0.45/add-passmanager-module-3ae30cff52cb83f1.yaml @@ -1,74 +1,76 @@ --- -features: +features_transpiler: - | - A new module :mod:`qiskit.passmanager` is added. + A new :mod:`qiskit.passmanager` module has been added to the Qiskit library. This module implements a generic pass manager and flow controllers, and provides infrastructure to manage execution of pass manager tasks. - The pass manager is a base class and not aware of the input and output object types, - and subclass must be created for a particular program type to optimize. - The :mod:`qiskit.transpiler` module is also reorganized to rebuild the existing - pass manager based off of the generic pass manager. + The module provides base classes for passes (:class:`.GenericPass`) and + flow controllers (:class:`.BaseController`), + as well as a new interface class, :class:`.passmanager.Task`, to manage the + execution of the pass manager (see the :meth:`.Task.execute` method). + These new classes follow the composite pattern, as flow controllers are + collections of passes, and a controller can be recursively nested into + the task pipeline. It must also be noted the base classes are not not aware + of the input and output object types, + and they must be subclassed for a particular program type to optimize. + This unified design reduces the complexity of the conventional pass manager, + and no longer requires the use of classes such as the :class:`.RunningPassManager` + to handle the execution logic dispatch and task structure renormalization. + The :mod:`qiskit.transpiler` module has been reorganized to rebuild the existing + pass managers based off of the generic pass manager. See upgrade notes for more details. -upgrade: + + +upgrade_transpiler: - | - One new base class for passes (:class:`.GenericPass`) and one for flow controllers (:class:`.BaseController`) - are introduced in the :mod:`qiskit.passmanager` module. - Because the flow controller is a collection of passes and a controller can be recursively - nested into the task pipeline, new classes are designed with the idea of - the composite pattern, and the interface class :class:`.passmanager.Task` - is also introduced. This class defines the signature of a :meth:`.Task.execute` method. - This unified design eliminates complexity of the conventional pass manager; - the execution logic dispatch and task structure renormalization - are no longer necessary, whom the :class:`.RunningPassManager` used to be responsible for. - Existing flow controllers :class:`.FlowControllerLinear`, + As a consequence of the pass manager refactoring efforts, existing flow controllers: + :class:`.FlowControllerLinear`, :class:`.ConditionalController`, and :class:`.DoWhileController` are now subclasses of the :class:`.BaseController`. - Note that these controllers are no longer iterable, as they drop the implementation of - :meth:`~object.__iter__` method; they are now only iterable in the context of a flow-controller + Note that these controllers have dropped the implementation of the :meth:`~object.__iter__` + method. They are now only iterable in the context of a flow-controller execution, which threads the compilation state through after each inner task is executed. - | - The :class:`.RunningPassManager` becomes largely an alias of :class:`.FlowControllerLinear`, - and this class will be completely replaced with the flow controller in the feature release. - This means the running pass manager becomes a stateless flow controller, and - the pass manager framework consists of :class:`.BasePassManager` and :class:`.BaseController`. - The pass manager is responsible for the construction of task pipeline, - while the controller is responsible for the execution of associated tasks. - Subclassing the :class:`.RunningPassManager` is no longer recommended. + The functionalitly of the :class:`.RunningPassManager` class has been superseded by the + new pass manager framework (:class:`.BasePassManager` and :class:`.BaseController`). + The running pass manager is now a stateless flow controller (essentially, an alias of + :class:`.FlowControllerLinear`), as the pass manager is responsible for the construction + of task pipeline, while the controller is responsible for the execution of associated tasks. + Subclassing the :class:`.RunningPassManager` is no longer recommended, and this class + will be completely replaced with the flow controller in future releases. - | - A new class :class:`.WorkflowStatus` is introduced to track the status of pass manager workflow. - This portable object is created when the pass manager is run, + A new class, :class:`.WorkflowStatus`, has been introduced to track the status of the + pass manager workflow. This portable object is created when the pass manager is run, and handed over to the underlying tasks. - Such status was previously managed by the :class:`.RunningPassManager` with instance variables, - however, now running pass manager becomes a controller object. + Such status was previously managed by the :class:`.RunningPassManager` with instance + variables. - | - The transpiler-specific (:func:`.transpile`) :class:`.transpiler.PassManager` is now a subclass of - the :class:`.passmanager.BasePassManager`. - There is no API break at public member level due to this class hierarchy change. + The transpiler-specific :class:`.transpiler.PassManager` (used in :func:`.transpile`) + is now a subclass of :class:`.passmanager.BasePassManager`. However, this class hierarchy + change doesn't introduce any breaking change to the public-facing API. - | - A new exception :exc:`~qiskit.passmanager.PassManagerError` is introduced as the base class of - exceptions raised during pass-manager execution. The transpiler-specific - :class:`.transpile.PassManager` continues to raise :exc:`.TranspilerError`, which is now a - subclass of :exc:`.PassManagerError`, for errors raised by specific tasks. A generic failure of - the pass-manager machinery, typically indicating programmer error and not recoverable, will - raise :exc:`.PassManagerError` for general pass managers, but :class:`.transpile.PassManager` - will currently wrap this in its specific :exc:`.TranspilerError` for backwards compatibility. + Exceptions raised during pass-manager execution now inherit from the newly introduced + :exc:`~qiskit.passmanager.PassManagerError`. A generic failure of the pass-manager + machinery will raise :exc:`.PassManagerError` for general pass managers, but the + transpiler-specific :class:`.transpile.PassManager` will currently wrap this in its + specific :exc:`.TranspilerError` for backwards compatibility. This wrapping will be removed in the future. - | - Use of :class:`.FencedObject` in the pass manager framework is removed. - These wrapper class cannot protect mutable object attribute from modification, - and protection doesn't matter as long as the code is properly implemented; - analysis passes should not modify an input IR, - controllers should not update the property set, and so forth. - Implementation of the proper code is the responsibility of pass manager developer. -deprecations: + The use of :class:`.FencedObject` in the pass manager framework has been removed. + This wrapper class cannot protect mutable object attributes from modification, + and this should not be an issue for properly implemented code. Analysis passes + should not modify an input IR, controllers should not update the property set, + and so forth. It's the pass manager developer's responsibility to ensure that + the pass is not modifying object attributes, +deprecations_transpiler: - | The flow controller factory method :meth:`.FlowController.controller_factory` is deprecated along with :meth:`.FlowController.add_flow_controller` and - :meth:`.FlowController.remove_flow_controller`, - as we are also going to deprecate task construction with - keyword arguments in the :meth:`.BasePassManager.append` method. + :meth:`.FlowController.remove_flow_controller`. In the future, + task construction with keyword arguments in the :meth:`.BasePassManager.append` method + will also be deprecated. Controllers must be explicitly instantiated and appended to the pass manager. - For example, conventional syntax + For example, the previously used conventional syntax .. code-block:: python @@ -88,11 +90,11 @@ deprecations: - | The :meth:`.FlowControllerLinear.append`, :meth:`.DoWhileController.append`, and :meth:`.ConditionalController.append` methods are all deprecated immediately. - The construction of pass manager task pipeline is the role of :class:`.BasePassManager`, - and individual flow controller do not need to implement method like this. For a flow - controller, you should pass all the passes in one go directly to the constructor. + The construction of the pass manager task pipeline is now the role of :class:`.BasePassManager`, + and individual flow controllers do not need to this method. For a flow + controller, all the passes should be specificed in one go directly to the constructor. - | The general attribute and variable name :code:`passes` is replaced with :code:`tasks` all over the :mod:`qiskit.passmanager` module. Note that a task must indicate a union of pass and controller, and the singular form `pass` conflicts with the Python keyword. - In this sense, use of `tasks` is much preferable. + In this sense, the use of `tasks` is much preferable. diff --git a/releasenotes/notes/0.45/add-qpy-symbolic-encoding-81d5321af38f259f.yaml b/releasenotes/notes/0.45/add-qpy-symbolic-encoding-81d5321af38f259f.yaml index 6f0ccc990b0..e12c6439e89 100644 --- a/releasenotes/notes/0.45/add-qpy-symbolic-encoding-81d5321af38f259f.yaml +++ b/releasenotes/notes/0.45/add-qpy-symbolic-encoding-81d5321af38f259f.yaml @@ -1,7 +1,7 @@ --- -features: +features_qpy: - | - QPY supports the use of symengine-native serialization and deserialization + QPY now supports the use of symengine-native serialization and deserialization for objects of type ``ParameterExpression`` as well as symbolic expressions in Pulse schedule blocks. This is a faster serialization alternative, but not supported in all platforms. Please check that your target platform is supported diff --git a/releasenotes/notes/0.45/add-sabre-starting-layout-7e151b7abb8a6c13.yaml b/releasenotes/notes/0.45/add-sabre-starting-layout-7e151b7abb8a6c13.yaml index 98c2467bb84..c9713a744cf 100644 --- a/releasenotes/notes/0.45/add-sabre-starting-layout-7e151b7abb8a6c13.yaml +++ b/releasenotes/notes/0.45/add-sabre-starting-layout-7e151b7abb8a6c13.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | Added a new analysis :class:`.SabrePreLayout` pass that creates a starting layout for :class:`.SabreLayout`, writing the layout into the property set diff --git a/releasenotes/notes/0.45/add-skip_check-option-UnitaryGate-fb3fad8a9ac3c156.yaml b/releasenotes/notes/0.45/add-skip_check-option-UnitaryGate-fb3fad8a9ac3c156.yaml index 6cc4fdbe01c..9cab7fb0a6e 100644 --- a/releasenotes/notes/0.45/add-skip_check-option-UnitaryGate-fb3fad8a9ac3c156.yaml +++ b/releasenotes/notes/0.45/add-skip_check-option-UnitaryGate-fb3fad8a9ac3c156.yaml @@ -1,5 +1,5 @@ --- -features: +features_circuits: - | Added a new argument, ``check_input``, to the constructor for the :class:`~.UnitaryGate` class. This flag is used to disable the default diff --git a/releasenotes/notes/0.45/add-target-to-hls.yaml b/releasenotes/notes/0.45/add-target-to-hls.yaml index 27fd8005072..bd586244b1b 100644 --- a/releasenotes/notes/0.45/add-target-to-hls.yaml +++ b/releasenotes/notes/0.45/add-target-to-hls.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | Added the arguments ``coupling_map``, ``target`` and ``use_qubit_indices`` to :class:`.HighLevelSynthesis` transpiler pass. The argument ``target`` specifies diff --git a/releasenotes/notes/0.45/added-sign-feature-parameterexpression-57693dd69103dc8c.yaml b/releasenotes/notes/0.45/added-sign-feature-parameterexpression-57693dd69103dc8c.yaml index 4c7b3f49fe5..3ebdd870ff7 100644 --- a/releasenotes/notes/0.45/added-sign-feature-parameterexpression-57693dd69103dc8c.yaml +++ b/releasenotes/notes/0.45/added-sign-feature-parameterexpression-57693dd69103dc8c.yaml @@ -1,8 +1,9 @@ --- -features: +features_misc: - | - Added support for expressing the sign of a :class:`.ParameterExpression` - Instead of assigning a concrete value and using :data:`numpy.sign` or other library functions, the user can use the instance of the :class:`.ParameterExpression` + Added support for expressing the sign of a :class:`.ParameterExpression`. + Instead of assigning a concrete value and using :data:`numpy.sign` or other library functions, + the user can use the instance of the :class:`.ParameterExpression` class to calculate the sign and can work with the sign before the expression is fully assigned. It can be used as follows:: diff --git a/releasenotes/notes/0.45/backend-estimator-v2-support-a698353aeeb5236c.yaml b/releasenotes/notes/0.45/backend-estimator-v2-support-a698353aeeb5236c.yaml deleted file mode 100644 index 544adfa5617..00000000000 --- a/releasenotes/notes/0.45/backend-estimator-v2-support-a698353aeeb5236c.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Fixed a bug where :class:`.primitives.BackendEstimator` cannot be used with the - :class:`.providers.BackendV2` that does not have coupling_map. diff --git a/releasenotes/notes/0.45/change-mpl-default-55c19d84713f276c.yaml b/releasenotes/notes/0.45/change-mpl-default-55c19d84713f276c.yaml index 4c0a4402afc..8d1b2628d03 100644 --- a/releasenotes/notes/0.45/change-mpl-default-55c19d84713f276c.yaml +++ b/releasenotes/notes/0.45/change-mpl-default-55c19d84713f276c.yaml @@ -1,20 +1,20 @@ --- -upgrade: +deprecations_visualization: - | The default ``matplotlib`` drawer setting now issues a ``FutureWarning``, as the default - style is changing to the ``"iqp"`` style (previously known as ``"iqx"``). The old default is + style is changing to the ``"iqp"`` style (previously known as ``"iqx"``). The old default is available as the ``"clifford"`` style. To silence the warning, you can explicitly set the desired style, e.g.:: from qiskit import QuantumCircuit - + circuit = QuantumCircuit(2) circuit.x(0) circuit.h(0) circuit.cp(0.5, 0, 1) circuit.draw("mpl", style="clifford") # or style="iqp" -features: +features_visualization: - | - Add the ``"iqp"`` and ``"iqp-dark"`` color styles for the ``matplotlib`` circuit drawer, + Added the ``"iqp"`` and ``"iqp-dark"`` color styles for the ``matplotlib`` circuit drawer, which are based on the IBM Quantum Platform color scheme. diff --git a/releasenotes/notes/0.45/channel-validation-bug-fix-c06f8445cecc8478.yaml b/releasenotes/notes/0.45/channel-validation-bug-fix-c06f8445cecc8478.yaml deleted file mode 100644 index b68ae2a68df..00000000000 --- a/releasenotes/notes/0.45/channel-validation-bug-fix-c06f8445cecc8478.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Fixed a bug in :class:`.pulse.Channel` where index validation was done incorrectly and only - raised an error when the index was both non-integer and negative, instead of either. diff --git a/releasenotes/notes/0.45/dag-appenders-check-84d4ef20c1e20fd0.yaml b/releasenotes/notes/0.45/dag-appenders-check-84d4ef20c1e20fd0.yaml index 4126b91bb86..b184fd509d8 100644 --- a/releasenotes/notes/0.45/dag-appenders-check-84d4ef20c1e20fd0.yaml +++ b/releasenotes/notes/0.45/dag-appenders-check-84d4ef20c1e20fd0.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | The :class:`.DAGCircuit` methods :meth:`~.DAGCircuit.apply_operation_back` and :meth:`~.DAGCircuit.apply_operation_front` have gained a ``check`` keyword argument that can be diff --git a/releasenotes/notes/0.45/dag-deprecate-none-args-e6ef868148da275d.yaml b/releasenotes/notes/0.45/dag-deprecate-none-args-e6ef868148da275d.yaml index 7c1be31b578..7d973c91b93 100644 --- a/releasenotes/notes/0.45/dag-deprecate-none-args-e6ef868148da275d.yaml +++ b/releasenotes/notes/0.45/dag-deprecate-none-args-e6ef868148da275d.yaml @@ -1,5 +1,5 @@ --- -deprecations: +deprecations_circuits: - | Passing ``None`` as the ``qargs`` or ``cargs`` arguments to :meth:`.DAGCircuit.apply_operation_back` or :meth:`~.DAGCircuit.apply_operation_front` is deprecated and will be removed in Qiskit 1.0. diff --git a/releasenotes/notes/0.45/dd-pg-10833-ddddee68ffd913c4.yaml b/releasenotes/notes/0.45/dd-pg-10833-ddddee68ffd913c4.yaml deleted file mode 100644 index cdf23b9ef9a..00000000000 --- a/releasenotes/notes/0.45/dd-pg-10833-ddddee68ffd913c4.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed a bug in the :class:`.PadDynamicalDecoupling` transpiler pass which - would cause the pass to fail if a circuit contained a pulse gate - calibration for one of the gates in the decoupling sequence. Fixed `#10833 - `_. diff --git a/releasenotes/notes/0.45/decimals_for_sampler-5aaa56642cce23e0.yaml b/releasenotes/notes/0.45/decimals_for_sampler-5aaa56642cce23e0.yaml index 619cb3a408c..19bdb0d1b68 100644 --- a/releasenotes/notes/0.45/decimals_for_sampler-5aaa56642cce23e0.yaml +++ b/releasenotes/notes/0.45/decimals_for_sampler-5aaa56642cce23e0.yaml @@ -1,5 +1,5 @@ --- -upgrade: +upgrade_misc: - | The :class:`~.QuasiDistribution` values might include floating-point errors. ``QuasiDistribution.__repr__`` rounds using :meth:`numpy.round` diff --git a/releasenotes/notes/0.45/default-reserved-plugin-name-3825c2000a579e38.yaml b/releasenotes/notes/0.45/default-reserved-plugin-name-3825c2000a579e38.yaml index 083c2ed90f8..62c9456950f 100644 --- a/releasenotes/notes/0.45/default-reserved-plugin-name-3825c2000a579e38.yaml +++ b/releasenotes/notes/0.45/default-reserved-plugin-name-3825c2000a579e38.yaml @@ -1,7 +1,7 @@ --- -upgrade: +upgrade_transpiler: - | - The plugin name ``default`` is reserved for the :ref:`stage_table` + The plugin name ``default`` is reserved for the :ref:`plugin stages ` ``init``, ``layout``, ``optimization``, and ``scheduling``. These stages previously did not reserve this plugin name, but the ``default`` name is now used to represent Qiskit's built-in default method for these stages. If you were diff --git a/releasenotes/notes/0.45/deprecate-algorithm-utils-6cdc5856015a7e65.yaml b/releasenotes/notes/0.45/deprecate-algorithm-utils-6cdc5856015a7e65.yaml index e9e47043473..495b4bd4ad8 100644 --- a/releasenotes/notes/0.45/deprecate-algorithm-utils-6cdc5856015a7e65.yaml +++ b/releasenotes/notes/0.45/deprecate-algorithm-utils-6cdc5856015a7e65.yaml @@ -1,5 +1,5 @@ --- -deprecations: +deprecations_algorithms: - | The algorithm utils in ``qiskit.utils.validation`` and ``qiskit.utils.algorithm_globals`` are now deprecated and will be removed in no less than 3 months from the release date. @@ -8,7 +8,7 @@ deprecations: and the primitive-based algorithms codebase has been migrated to a standalone `library `_, these utils are no longer used in the context of Qiskit. If your application allows it, we recommend that - you migrate your code to use ``qiskit_algorithms``, where you will be able to import - the relevant utilities in ``algorithm_globals`` and ``validation`` from + you migrate your code to use `qiskit_algorithms `_, + where you will be able to import the relevant utilities in ``algorithm_globals`` and ``validation`` from ``qiskit_algorithms.utils``. Please note that legacy functionality has not been migrated to the new package. diff --git a/releasenotes/notes/0.45/deprecate-bind-parameters-283c94069e8a9142.yaml b/releasenotes/notes/0.45/deprecate-bind-parameters-283c94069e8a9142.yaml index 62ed323a4a5..e578a992a65 100644 --- a/releasenotes/notes/0.45/deprecate-bind-parameters-283c94069e8a9142.yaml +++ b/releasenotes/notes/0.45/deprecate-bind-parameters-283c94069e8a9142.yaml @@ -1,5 +1,5 @@ --- -deprecations: +deprecations_circuits: - | The method :meth:`.QuantumCircuit.bind_parameters` is now deprecated and will be removed from the codebase in no less than 3 months from the release date. Its functionality diff --git a/releasenotes/notes/0.45/deprecate-duplicates-a871f83bbbe1c96f.yaml b/releasenotes/notes/0.45/deprecate-duplicates-a871f83bbbe1c96f.yaml index a62ed79a047..42dbb99fa64 100644 --- a/releasenotes/notes/0.45/deprecate-duplicates-a871f83bbbe1c96f.yaml +++ b/releasenotes/notes/0.45/deprecate-duplicates-a871f83bbbe1c96f.yaml @@ -1,5 +1,5 @@ --- -deprecations: +deprecations_circuits: - | Deprecate duplicate gate methods on :class:`.QuantumCircuit`. The rule applied is that the method names reflect that gate names, e.g. the :class:`.CXGate` is added via @@ -14,4 +14,4 @@ deprecations: Note that :meth:`.QuantumCircuit.i` is the only exception to the rule above, but since :meth:`.QuantumCircuit.id` more intuively represents the identity and is used more, we chose - it over its counterpart. \ No newline at end of file + it over its counterpart. diff --git a/releasenotes/notes/0.45/deprecate-extensions-d7ab3fca19962e2e.yaml b/releasenotes/notes/0.45/deprecate-extensions-d7ab3fca19962e2e.yaml index 27d0abd9ac2..5fa75f43cac 100644 --- a/releasenotes/notes/0.45/deprecate-extensions-d7ab3fca19962e2e.yaml +++ b/releasenotes/notes/0.45/deprecate-extensions-d7ab3fca19962e2e.yaml @@ -1,15 +1,15 @@ --- -deprecations: +deprecations_circuits: - | To streamline the structure of Qiskit's gates and operations, the :mod:`qiskit.extensions` module is pending deprecation and will be deprecated in a future release. The following objects have been moved to :mod:`qiskit.circuit.library` * :class:`~.library.DiagonalGate`, - * :class:`~.library.HamiltonianGateGate`, + * :class:`~.library.HamiltonianGate`, * :class:`~.library.Initialize`, * :class:`~.library.Isometry`, - * :class:`~.library.generalized_gates.mcg_up_diag.MCGupDiag`, + * :class:`~.library.generalized_gates.mcg_up_to_diagonal.MCGupDiag`, * :class:`~.library.UCGate`, * :class:`~.library.UCPauliRotGate`, * :class:`~.library.UCRXGate`, diff --git a/releasenotes/notes/0.45/deprecate-unroller-2081d35d6d83e7e9.yaml b/releasenotes/notes/0.45/deprecate-unroller-2081d35d6d83e7e9.yaml index 4615ecee0f8..100657c0000 100644 --- a/releasenotes/notes/0.45/deprecate-unroller-2081d35d6d83e7e9.yaml +++ b/releasenotes/notes/0.45/deprecate-unroller-2081d35d6d83e7e9.yaml @@ -1,5 +1,5 @@ --- -deprecations: +deprecations_transpiler: - | The :class:`.Unroller` transpiler pass has been deprecated and will be removed in a future release. The :class:`.Unroller` has been superseded by the @@ -30,11 +30,11 @@ deprecations: ``"translator"`` method which will work similarly to the ``"unroller"`` plugin but support a broader set of target backends. -upgrade: +upgrade_circuits: - | - The :attr:`.ControlledGate.definition` of the output from the :meth:`.Gate.control()` method + The :attr:`.ControlledGate.definition` of the output from the :meth:`.Gate.control` method may be different as compared to previous releases. The internal generation - of the :meth:`.Gate.control` is no longer using the now deprecated + of the :meth:`.Gate.control` method is no longer using the now deprecated :class:`.Unroller` transpiler pass to generate its definition and this can potentially cause a different definition to be generated. The output :class:`.ControlledGate` object's definition will be unitary equivalent to what diff --git a/releasenotes/notes/0.45/display-control-flow-text-8db4f15a68bf5322.yaml b/releasenotes/notes/0.45/display-control-flow-text-8db4f15a68bf5322.yaml index 7c483fdd90d..e2c05eadd9e 100644 --- a/releasenotes/notes/0.45/display-control-flow-text-8db4f15a68bf5322.yaml +++ b/releasenotes/notes/0.45/display-control-flow-text-8db4f15a68bf5322.yaml @@ -1,9 +1,10 @@ --- -features: +features_visualization: - | In :class:`~qiskit.visualization.circuit.TextDrawer`, operations built from :class:`~qiskit.circuit.ControlFlowOp`, including ``if``, ``else``, ``while``, ``for``, and ``switch/case``, whether - directly instantiated or built using methods in :class:`~qiskit.circuit.QuantumCircuit`, + directly instantiated or built using methods in + :class:`~qiskit.circuit.QuantumCircuit`, will now fully display the circuits defined in the ControlFlowOps with brackets to delineate the circuits. diff --git a/releasenotes/notes/0.45/expr-rvalue-conditions-8b5d5f7c015658c0.yaml b/releasenotes/notes/0.45/expr-rvalue-conditions-8b5d5f7c015658c0.yaml deleted file mode 100644 index 234888b2ac9..00000000000 --- a/releasenotes/notes/0.45/expr-rvalue-conditions-8b5d5f7c015658c0.yaml +++ /dev/null @@ -1,83 +0,0 @@ ---- -features: - - | - The fields :attr:`.IfElseOp.condition`, :attr:`.WhileLoopOp.condition` and - :attr:`.SwitchCaseOp.target` can now be instances of the new runtime classical-expression type - :class:`.expr.Expr`. This is distinct from :class:`.ParameterExpression` because it is - evaluated *at runtime* for backends that support such operations. - - These new expressions have significantly more power than the old two-tuple form of supplying - classical conditions. For example, one can now represent equality constraints between two - different classical registers, or the logic "or" of two classical bits. These two examples - would look like:: - - from qiskit.circuit import QuantumCircuit, ClassicalRegister, QuantumRegister - from qiskit.circuit.classical import expr - - qr = QuantumRegister(4) - cr1 = ClassicalRegister(2) - cr2 = ClassicalRegister(2) - qc = QuantumCircuit(qr, cr1, cr2) - qc.h(0) - qc.cx(0, 1) - qc.h(2) - qc.cx(2, 3) - qc.measure([0, 1, 2, 3], [0, 1, 2, 3]) - - # If the two registers are equal to each other. - with qc.if_test(expr.equal(cr1, cr2)): - qc.x(0) - - # While either of two bits are set. - with qc.while_loop(expr.logic_or(cr1[0], cr1[1])): - qc.reset(0) - qc.reset(1) - qc.measure([0, 1], cr1) - - For more examples, see the documentation for :mod:`qiskit.circuit.classical`. - - This is a feature that hardware is only just beginning to support, so Qiskit's support is - starting conservatively, and you may well find rough edges in places where hardware doesn't - support expressions that look simple in Qiskit. Please bear with us, and your hardware vendors! - - In this initial release, Qiskit has added the operations: - - * :func:`~.expr.bit_not` - * :func:`~.expr.logic_not` - * :func:`~.expr.bit_and` - * :func:`~.expr.bit_or` - * :func:`~.expr.bit_xor` - * :func:`~.expr.logic_and` - * :func:`~.expr.logic_or` - * :func:`~.expr.equal` - * :func:`~.expr.not_equal` - * :func:`~.expr.less` - * :func:`~.expr.less_equal` - * :func:`~.expr.greater` - * :func:`~.expr.greater_equal` - - These can act on Python integer and Boolean literals, or on :class:`.ClassicalRegister` - and :class:`.Clbit` instances. - - All these classical expressions are fully supported through the Qiskit transpiler stack, through - QPY serialisation (:mod:`qiskit.qpy`) and for export to OpenQASM 3 (:mod:`qiskit.qasm3`). Import - from OpenQASM 3 is currently managed by `a separate package `__ - (which is re-exposed via :mod:`qiskit.qasm3`), which we hope will be extended to match the new - features in Qiskit. - - | - In addition to the new representations of classical runtime expressions, some tools for working - with these objects have also been added. A general :class:`~.expr.ExprVisitor` is provided for - consumers of these expressions to subclass. Two utilities based on this structure, - :func:`~.expr.iter_vars` and :func:`~.expr.structurally_equivalent`, are also provided, which - respectively produce an iterator through the :class:`~.expr.Var` nodes and check whether two - :class:`~.expr.Expr` instances are structurally the same, up to some mapping of the - :class:`~.expr.Var` nodes contained. - - | - For those who wish to convert all old-style conditions into new-style :class:`~.expr.Expr` nodes - immediately, the function :func:`~.expr.lift_legacy_condition` is provided, though these new - expression nodes are not permitted in old-style :attr:`.Instruction.condition` fields, which are - due to be replaced by more advanced classical handling such as :class:`.IfElseOp`. -issues: - - | - Circuits containing classical expressions made with the :mod:`~.classical.expr` module are not - yet supported by the circuit visualizers. diff --git a/releasenotes/notes/0.45/extend-coupling-map-reduce-bb19e35ec939570d.yaml b/releasenotes/notes/0.45/extend-coupling-map-reduce-bb19e35ec939570d.yaml index 5f2d2644240..343894343d7 100644 --- a/releasenotes/notes/0.45/extend-coupling-map-reduce-bb19e35ec939570d.yaml +++ b/releasenotes/notes/0.45/extend-coupling-map-reduce-bb19e35ec939570d.yaml @@ -1,7 +1,7 @@ --- -features: +features_transpiler: - | - The method :meth:`~qiskit.transpiler.CouplingMap.reduce` now accepts an + The method :meth:`.CouplingMap.reduce` now accepts an additional argument ``check_if_connected``, defaulted to ``True``. This corresponds to the previous behavior, checking whether the reduced coupling map remains connected and raising a ``CouplingError`` if not so. When set to diff --git a/releasenotes/notes/0.45/fix-clifford-from-diagonal-7708654373bd5b8b.yaml b/releasenotes/notes/0.45/fix-clifford-from-diagonal-7708654373bd5b8b.yaml deleted file mode 100644 index 8340ee33a07..00000000000 --- a/releasenotes/notes/0.45/fix-clifford-from-diagonal-7708654373bd5b8b.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed a bug where :meth:`~.Clifford.from_matrix` and :meth:`~.Clifford.from_operator` - do not fail with non-Clifford diagonal operators (matrices) and return incorrect - Clifford objects. This has been corrected so that they raise an error in the cases. - Fixed `#10903 `__ diff --git a/releasenotes/notes/0.45/fix-final-layout-in-apply-layout-dfbdbde593cf7929.yaml b/releasenotes/notes/0.45/fix-final-layout-in-apply-layout-dfbdbde593cf7929.yaml deleted file mode 100644 index f4297f55d8a..00000000000 --- a/releasenotes/notes/0.45/fix-final-layout-in-apply-layout-dfbdbde593cf7929.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -fixes: - - | - Fixed an issue with the :func:`~.transpile` function and all the preset - pass managers generated via :func:`~.generate_preset_pass_manager` where - the output :class:`~.QuantumCircuit` object's :attr:`~.QuantumCircuit.layout` - attribute would have an invalid :attr:`.TranspileLayout.final_layout` - attribute. This would occur in scenarios when the :class:`~.VF2PostLayout` - pass would run and find an alternative initial layout that has lower - reported error rates. When altering the initial layout the - :attr:`~.TranspileLayout.final_layout` attribute was never updated to - reflect this change. This has been corrected so that the ``final_layout`` - is always correctly reflecting the output permutation caused by the routing - stage. - Fixed `#10457 `__ diff --git a/releasenotes/notes/0.45/fix-flow-cregbundle-transpiled-482979d57382b1dc.yaml b/releasenotes/notes/0.45/fix-flow-cregbundle-transpiled-482979d57382b1dc.yaml deleted file mode 100644 index 71b575bba18..00000000000 --- a/releasenotes/notes/0.45/fix-flow-cregbundle-transpiled-482979d57382b1dc.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -fixes: - - | - Fixed an issue with the matplotlib based visualization in the - :meth:`.QuantumCircuit.draw` method and the :func:`~.circuit_drawer` - function when visualizing circuits that had control flow instructions. - Previously in some situations, especially with a layout set, the output - visualization could have put gates inside a control flow block on the - wrong wires in the visualization. - Fixed `#10601 `__ - - | - Fixed an issue with the matplotlib based visualization in the - :meth:`.QuantumCircuit.draw` method and the :func:`~.circuit_drawer` - function when visualizing circuits that had control flow instructions. - Previously when the `cregbundle` option was set to None or True, the - drawer did not properly display the `cregs` as bundled. diff --git a/releasenotes/notes/0.45/fix-gate-direction-d8bc96b62b27dba8.yaml b/releasenotes/notes/0.45/fix-gate-direction-d8bc96b62b27dba8.yaml deleted file mode 100644 index 54d29206ccd..00000000000 --- a/releasenotes/notes/0.45/fix-gate-direction-d8bc96b62b27dba8.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixes a bug with the :class:`.GateDirection` transpiler pass where it - unnecessarily raised an exception for input DAGs with more than 1 - quantum register. - Fixed `#10824 `__. diff --git a/releasenotes/notes/0.45/fix-handling-of-mixed-ideal-target-with-filter-qubits-171894cb758356ca.yaml b/releasenotes/notes/0.45/fix-handling-of-mixed-ideal-target-with-filter-qubits-171894cb758356ca.yaml deleted file mode 100644 index 2741d76df58..00000000000 --- a/releasenotes/notes/0.45/fix-handling-of-mixed-ideal-target-with-filter-qubits-171894cb758356ca.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -fixes: - - | - Fixed an issue in the :meth:`.Target.build_coupling_map` method when the - ``filter_idle_qubits`` argument was set to ``True`` and there was a mix - of fixed width ideal and physical instructions in the target. In these cases - previously the :meth:`.Target.build_coupling_map` would have raised an - exception because it was assuming all instructions in the target were - physical and defined over qubits. diff --git a/releasenotes/notes/0.45/fix-input-normalization-of-transpile-initial-layout.yaml b/releasenotes/notes/0.45/fix-input-normalization-of-transpile-initial-layout.yaml deleted file mode 100644 index a996861ce99..00000000000 --- a/releasenotes/notes/0.45/fix-input-normalization-of-transpile-initial-layout.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixed a regression in :func:`.transpile`, where an ``initial_layout`` given - as a :class:`range` object would no longer be treated as a valid input. - Fixed `#10544 `__. diff --git a/releasenotes/notes/0.45/fix-parameter-hash-d22c270090ffc80e.yaml b/releasenotes/notes/0.45/fix-parameter-hash-d22c270090ffc80e.yaml index e03fa8555a4..dbf9ed536e2 100644 --- a/releasenotes/notes/0.45/fix-parameter-hash-d22c270090ffc80e.yaml +++ b/releasenotes/notes/0.45/fix-parameter-hash-d22c270090ffc80e.yaml @@ -1,5 +1,5 @@ --- -features: +features_misc: - | :class:`.Parameter` now has an advanced-usage keyword argument ``uuid`` in its constructor, which can be used to make the :class:`.Parameter` compare equal to another of the same name. diff --git a/releasenotes/notes/0.45/fix-qasm2-final-comment-f0904c3e13215a00.yaml b/releasenotes/notes/0.45/fix-qasm2-final-comment-f0904c3e13215a00.yaml deleted file mode 100644 index 53f114caf3e..00000000000 --- a/releasenotes/notes/0.45/fix-qasm2-final-comment-f0904c3e13215a00.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - OpenQASM 2 programs that end in comments with no terminating newline character will now parse - successfully. Fixed `#10770 `__. diff --git a/releasenotes/notes/0.45/fix-qpy-nested-custom-controlled-2a23dfe828bc46c8.yaml b/releasenotes/notes/0.45/fix-qpy-nested-custom-controlled-2a23dfe828bc46c8.yaml deleted file mode 100644 index a6a26732601..00000000000 --- a/releasenotes/notes/0.45/fix-qpy-nested-custom-controlled-2a23dfe828bc46c8.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixed a bug in QPY serialization (:mod:`qiskit.qpy`) where multiple controlled custom gates in - a circuit could result in an invalid QPY file that could not be parsed. Fixed `#9746 - `__. diff --git a/releasenotes/notes/0.45/fix-qpy-repeated-controlled-gates-e19fc4ee65a22756.yaml b/releasenotes/notes/0.45/fix-qpy-repeated-controlled-gates-e19fc4ee65a22756.yaml deleted file mode 100644 index bb6b9024561..00000000000 --- a/releasenotes/notes/0.45/fix-qpy-repeated-controlled-gates-e19fc4ee65a22756.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -fixes: - - | - Fixed a bug in QPY serialization (:mod:`qiskit.qpy`) where if a circuit contained - multiple instances of parametrized controlled gates of the same class (not custom), - the parameter values from the first instance were used to build the gate definitions - of subsequent instances. The gates were rendered correctly despite this bug because - the correct parameter values were stored, but not used to build the gates. Fixed - `#10735 `__. diff --git a/releasenotes/notes/0.45/fix-sabre-performance-1b4503b6ecde6d13.yaml b/releasenotes/notes/0.45/fix-sabre-performance-1b4503b6ecde6d13.yaml deleted file mode 100644 index 9d36940582c..00000000000 --- a/releasenotes/notes/0.45/fix-sabre-performance-1b4503b6ecde6d13.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - Fixed a performance regression in the :class:`~.SabreLayout` and - :class:`~.SabreSwap` transpiler passes. - Fixed `#10650 `__ diff --git a/releasenotes/notes/0.45/fix-timeline-draw-unscheduled-warning-873f7a24c6b51e2c.yaml b/releasenotes/notes/0.45/fix-timeline-draw-unscheduled-warning-873f7a24c6b51e2c.yaml index e93e62c963a..7d4609e7b80 100644 --- a/releasenotes/notes/0.45/fix-timeline-draw-unscheduled-warning-873f7a24c6b51e2c.yaml +++ b/releasenotes/notes/0.45/fix-timeline-draw-unscheduled-warning-873f7a24c6b51e2c.yaml @@ -1,5 +1,5 @@ --- -deprecations: +deprecations_visualization: - | Passing a circuit to :func:`qiskit.visualization.timeline_drawer` that does not have scheduled node start-time information is deprecated. Only circuits that have gone through one of the diff --git a/releasenotes/notes/0.45/fix_9363-445db8fde1244e57.yaml b/releasenotes/notes/0.45/fix_9363-445db8fde1244e57.yaml deleted file mode 100644 index ef0e6f01fbe..00000000000 --- a/releasenotes/notes/0.45/fix_9363-445db8fde1244e57.yaml +++ /dev/null @@ -1,40 +0,0 @@ ---- -fixes: - - | - Fixed `#9363 `__. - by labeling the non-registerless synthesis in the order that Tweedledum - returns. For example, compare this example before and after the fix:: - - from qiskit.circuit import QuantumCircuit - from qiskit.circuit.classicalfunction import BooleanExpression - - boolean_exp = BooleanExpression.from_dimacs_file("simple_v3_c2.cnf") - circuit = QuantumCircuit(boolean_exp.num_qubits) - circuit.append(boolean_exp, range(boolean_exp.num_qubits)) - circuit.draw("text") - - from qiskit.circuit.classicalfunction import classical_function - from qiskit.circuit.classicalfunction.types import Int1 - - @classical_function - def grover_oracle(a: Int1, b: Int1, c: Int1) -> Int1: - return (a and b and not c) - - quantum_circuit = grover_oracle.synth(registerless=False) - print(quantum_circuit.draw()) - - Which would print - - .. parsed-literal:: - - Before After - - c: ──■── a: ──■── - │ │ - b: ──■── b: ──■── - │ │ - a: ──o── c: ──o── - ┌─┴─┐ ┌─┴─┐ - return: ┤ X ├ return: ┤ X ├ - └───┘ └───┘ - diff --git a/releasenotes/notes/0.45/fix_pauli_new_style_bit-0704933127b4debe.yaml b/releasenotes/notes/0.45/fix_pauli_new_style_bit-0704933127b4debe.yaml deleted file mode 100644 index db494233218..00000000000 --- a/releasenotes/notes/0.45/fix_pauli_new_style_bit-0704933127b4debe.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - The class :class:`.Pauli` now support creation from :class:`.QuantumCircuit` - that use new-style :class:`.Bit`. diff --git a/releasenotes/notes/0.45/h_basic_aer-3fc5e6776f0de9c1.yaml b/releasenotes/notes/0.45/h_basic_aer-3fc5e6776f0de9c1.yaml index df80391c330..03c86671b69 100644 --- a/releasenotes/notes/0.45/h_basic_aer-3fc5e6776f0de9c1.yaml +++ b/releasenotes/notes/0.45/h_basic_aer-3fc5e6776f0de9c1.yaml @@ -1,5 +1,5 @@ --- -upgrade: +upgrade_providers: - | - The ``QasmSimulator`` python-based simulator included in :class:`qiskit.providers.basicaer` + The :class:`.QasmSimulatorPy` python-based simulator included in :class:`qiskit.providers.basicaer` now includes ``'h'`` (:class:`.HGate`), ``'p'`` (:class:`.PhaseGate`), and ``'u'`` (:class:`.UGate`) in its basis gate set. diff --git a/releasenotes/notes/0.45/hls-with-recursion-and-ucd-b559beb3a148fe59.yaml b/releasenotes/notes/0.45/hls-with-recursion-and-ucd-b559beb3a148fe59.yaml index 1451d6bfaea..c617950ff00 100644 --- a/releasenotes/notes/0.45/hls-with-recursion-and-ucd-b559beb3a148fe59.yaml +++ b/releasenotes/notes/0.45/hls-with-recursion-and-ucd-b559beb3a148fe59.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | The constructor for :class:`.HighLevelSynthesis` transpiler pass now accepts additional arguments ``equivalence_library``, ``basis_gates``, and ``min_qubits``. diff --git a/releasenotes/notes/0.45/improve-performance-merge-adjacent-barriers-pass-c0cd064bdd059811.yaml b/releasenotes/notes/0.45/improve-performance-merge-adjacent-barriers-pass-c0cd064bdd059811.yaml index cf2d73b5b01..b8037e4c8a2 100644 --- a/releasenotes/notes/0.45/improve-performance-merge-adjacent-barriers-pass-c0cd064bdd059811.yaml +++ b/releasenotes/notes/0.45/improve-performance-merge-adjacent-barriers-pass-c0cd064bdd059811.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | - Performance improvement of the :class:`~.MergeAdjacentBarriers` transpiler pass, which used to + Significantly improved the performance of the :class:`~.MergeAdjacentBarriers` transpiler pass, which used to rebuild the complete DAG to merge the barriers. diff --git a/releasenotes/notes/0.45/keep-initial-resets-a5f75cb16c8edb57.yaml b/releasenotes/notes/0.45/keep-initial-resets-a5f75cb16c8edb57.yaml index e0c987504dc..3b6c8e65c37 100644 --- a/releasenotes/notes/0.45/keep-initial-resets-a5f75cb16c8edb57.yaml +++ b/releasenotes/notes/0.45/keep-initial-resets-a5f75cb16c8edb57.yaml @@ -1,6 +1,15 @@ --- -upgrade: +upgrade_transpiler: - | - Disables the use of :class:`.RemoveResetInZeroState` in the preset passmanagers. - This better aligns circuits to the notion of arbitrary initial states - unless explicitly set to zeros with resets. + Disabled the use of the :class:`.RemoveResetInZeroState` class in the preset passmanagers. + Previously, when :func:`.transpile` or :func:`.generate_preset_pass_manager` was run with + ``optimization_level`` at level 1, 2, or 3, it would run :class:`.RemoveResetInZeroState`. + However, this pass prohibited the notion of arbitrary initial states unless explicitly set + to zeros with resets. If you need to run the pass as part of your compilation pipeline, you + can run something like:: + + pm = generate_preset_pass_manager(1, backend) + pm.init.append(RemoveResetInZeroState()) + pm.run(circuit) + + to retain this functionality for your circuit compilation. diff --git a/releasenotes/notes/0.45/min-qubits-basis-translation-09380145f3cf97fc.yaml b/releasenotes/notes/0.45/min-qubits-basis-translation-09380145f3cf97fc.yaml index 84ea98e8e90..9defb51c6e9 100644 --- a/releasenotes/notes/0.45/min-qubits-basis-translation-09380145f3cf97fc.yaml +++ b/releasenotes/notes/0.45/min-qubits-basis-translation-09380145f3cf97fc.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | Added a new keyword argument, ``min_qubits``, to the constructor of the :class:`.BasisTranslator` transpiler pass. When set to a non-zero value this diff --git a/releasenotes/notes/0.45/num-ancilla-qubits-deprecation-d616c3fc24250d22.yaml b/releasenotes/notes/0.45/num-ancilla-qubits-deprecation-d616c3fc24250d22.yaml index 23d65d13a3e..cc1e7282c83 100644 --- a/releasenotes/notes/0.45/num-ancilla-qubits-deprecation-d616c3fc24250d22.yaml +++ b/releasenotes/notes/0.45/num-ancilla-qubits-deprecation-d616c3fc24250d22.yaml @@ -1,6 +1,6 @@ --- -upgrade: +upgrade_circuits: - | - The property ``num_ancilla_qubits`` from the class :class:`.PolynomialPauliRotations` + The property ``num_ancilla_qubits`` from the class :class:`.PolynomialPauliRotations` has been removed, as deprecated in Qiskit 0.23.0. Instead, use the property :attr:`.PolynomialPauliRotations.num_ancillas`. diff --git a/releasenotes/notes/0.45/optimise-parameter-assign-398ed4f2074ca201.yaml b/releasenotes/notes/0.45/optimise-parameter-assign-398ed4f2074ca201.yaml index 1efa868317c..33fbd671731 100644 --- a/releasenotes/notes/0.45/optimise-parameter-assign-398ed4f2074ca201.yaml +++ b/releasenotes/notes/0.45/optimise-parameter-assign-398ed4f2074ca201.yaml @@ -1,6 +1,7 @@ --- -features: +features_circuits: - | - A fast path for :meth:`.Parameter.assign` has been added, which improves the performance of - :meth:`.QuantumCircuit.assign_parameters` for the common case of circuits that contain - predominantly "expressions" that are actually just single parameters to be assigned later. + A new method :meth:`.Parameter.assign` has been added. This method primarily serves as + a fast path to improve the performance of :meth:`.QuantumCircuit.assign_parameters` + for the common case of circuits that predominantly contain + "expressions" that are actually just single parameters to be assigned later. diff --git a/releasenotes/notes/0.45/optimise-unsorted-parameters-310e5f2420771f49.yaml b/releasenotes/notes/0.45/optimise-unsorted-parameters-310e5f2420771f49.yaml index 2ab9a49af4f..b3ea02600f6 100644 --- a/releasenotes/notes/0.45/optimise-unsorted-parameters-310e5f2420771f49.yaml +++ b/releasenotes/notes/0.45/optimise-unsorted-parameters-310e5f2420771f49.yaml @@ -1,5 +1,5 @@ --- -features: +features_circuits: - | The performance of :meth:`.QuantumCircuit.assign_parameters` when assigning a single parameter of a circuit that involves many parameters has been improved. diff --git a/releasenotes/notes/0.45/paulivecplot-normalization-5dd3cf3393c75afb.yaml b/releasenotes/notes/0.45/paulivecplot-normalization-5dd3cf3393c75afb.yaml deleted file mode 100644 index a22e2a3abc5..00000000000 --- a/releasenotes/notes/0.45/paulivecplot-normalization-5dd3cf3393c75afb.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed :func:`plot_state_paulivec`, which previously damped the state coefficients by a factor of - :math:`2^n`, where :math:`n` is the number of qubits. Now the bar graph correctly displays - the coefficients as :math:`\mathrm{Tr}(\sigma\rho)`, where :math:`\rho` is the state to - be plotted and :math:`\sigma` iterates over all possible tensor products of single-qubit Paulis. diff --git a/releasenotes/notes/0.45/primitives-dynamic-circuit-b489f82df47af138.yaml b/releasenotes/notes/0.45/primitives-dynamic-circuit-b489f82df47af138.yaml deleted file mode 100644 index 78d4211fa25..00000000000 --- a/releasenotes/notes/0.45/primitives-dynamic-circuit-b489f82df47af138.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -fixes: - Fix the bug :class:`.BackendEstimator` fails if circuits have classical registers. diff --git a/releasenotes/notes/0.45/qasm2-fix-zero-op-barrier-4af211b119d5b24d.yaml b/releasenotes/notes/0.45/qasm2-fix-zero-op-barrier-4af211b119d5b24d.yaml deleted file mode 100644 index 9b86441fe81..00000000000 --- a/releasenotes/notes/0.45/qasm2-fix-zero-op-barrier-4af211b119d5b24d.yaml +++ /dev/null @@ -1,13 +0,0 @@ ---- -fixes: - - | - The OpenQASM 2 parser (:func:`.qasm2.load` and :func:`~.qasm2.loads`) running in ``strict`` mode - will now correctly emit an error if a ``barrier`` statement has no arguments. When running in - the (default) more permissive mode, an argument-less ``barrier`` statement will continue to - cause a barrier on all qubits currently in scope (the qubits a gate definition affects, or all - the qubits defined by a program, if the statement is in a gate body or in the global scope, - respectively). - - | - The OpenQASM 2 exporter (:meth:`.QuantumCircuit.qasm`) will now no longer attempt - to output ``barrier`` statements that act on no qubits. Such a barrier statement has no effect - in Qiskit either, but is invalid OpenQASM 2. diff --git a/releasenotes/notes/0.45/qasm2-float-decimal-76b44281d9249f7a.yaml b/releasenotes/notes/0.45/qasm2-float-decimal-76b44281d9249f7a.yaml deleted file mode 100644 index 03fd561324d..00000000000 --- a/releasenotes/notes/0.45/qasm2-float-decimal-76b44281d9249f7a.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -fixes: - - | - Angles in the OpenQASM 2 exporter (:func:`.QuantumCircuit.qasm`) will now always include a - decimal point, for example in the case of ``1.e-5``. This is required by a strict interpretation of the - floating-point-literal specification in OpenQASM 2. Qiskit's OpenQASM 2 parser - (:func:`.qasm2.load` and :func:`~.qasm2.loads`) is more permissive by default, and will allow - ``1e-5`` without the decimal point unless in ``strict`` mode. diff --git a/releasenotes/notes/0.45/qasm2-new-api-4e1e4803d6a5a175.yaml b/releasenotes/notes/0.45/qasm2-new-api-4e1e4803d6a5a175.yaml index befe3011c70..dd2c3440746 100644 --- a/releasenotes/notes/0.45/qasm2-new-api-4e1e4803d6a5a175.yaml +++ b/releasenotes/notes/0.45/qasm2-new-api-4e1e4803d6a5a175.yaml @@ -1,5 +1,5 @@ --- -features: +features_qasm: - | The OpenQASM 2 module :mod:`qiskit.qasm2` has gained the export functions :func:`~.qasm2.dump` and :func:`~.qasm2.dumps`. These are used in a very @@ -20,7 +20,7 @@ features: gave no indication of the OpenQASM version, and since it was originally added, Qiskit has gained several serialisation modules that could easily become confused. -deprecations: +deprecations_circuits: - | The little-used :class:`.QuantumCircuit` class data attributes :attr:`~.QuantumCircuit.header` and :attr:`~.QuantumCircuit.extension_lib` diff --git a/releasenotes/notes/0.45/qasm_invalid_custom_instruction-7738db7ba1a1a5cf.yaml b/releasenotes/notes/0.45/qasm_invalid_custom_instruction-7738db7ba1a1a5cf.yaml deleted file mode 100644 index 545032c17a1..00000000000 --- a/releasenotes/notes/0.45/qasm_invalid_custom_instruction-7738db7ba1a1a5cf.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -fixes: - - | - Qiskit can represent custom instructions that act on zero qubits, or on a non-zero number of - classical bits. These cannot be exported to OpenQASM 2, but previously :meth:`.QuantumCircuit.qasm` - would try, and output invalid OpenQASM 2. Instead, a :exc:`.QASM2ExportError` will now correctly - be raised. See `#7351 `__ and - `#10435 `__. diff --git a/releasenotes/notes/0.45/qiskit_terra_version-956916f7b8d7bbb9.yaml b/releasenotes/notes/0.45/qiskit_terra_version-956916f7b8d7bbb9.yaml index 06ded95fc99..c931b629ffd 100644 --- a/releasenotes/notes/0.45/qiskit_terra_version-956916f7b8d7bbb9.yaml +++ b/releasenotes/notes/0.45/qiskit_terra_version-956916f7b8d7bbb9.yaml @@ -1,4 +1,7 @@ --- -upgrade: +upgrade_misc: - | - The magic ``%qiskit_version_table`` from ``qiskit.tools.jupyter`` and the deprecated ``qiskit.__qiskit_version__`` do not include `qiskit-terra` anymore. Now Qiskit Terra is called Qiskit. + The magic ``%qiskit_version_table`` from ``qiskit.tools.jupyter`` and the deprecated + ``qiskit.__qiskit_version__`` do not include `qiskit-terra` anymore. Now that Qiskit + Terra is called Qiskit, these entries are not needed anymore and you can just refer + to the ``qiskit`` entry. diff --git a/releasenotes/notes/0.45/remove-deprecated-bip-mapper-e1206c8f905502dd.yaml b/releasenotes/notes/0.45/remove-deprecated-bip-mapper-e1206c8f905502dd.yaml index 223d931c7f2..7423c517c05 100644 --- a/releasenotes/notes/0.45/remove-deprecated-bip-mapper-e1206c8f905502dd.yaml +++ b/releasenotes/notes/0.45/remove-deprecated-bip-mapper-e1206c8f905502dd.yaml @@ -1,5 +1,5 @@ --- -upgrade: +upgrade_transpiler: - | The deprecated transpiler routing pass, ``BIPMapping`` has been removed. It was marked as deprecated in the Qiskit 0.43.0 release. It has been @@ -8,8 +8,8 @@ upgrade: https://github.com/qiskit-community/qiskit-bip-mapper - The pass was made into a separate plugin package for two reasons, first - the dependency on CPLEX makes it harder to use and secondly the plugin - package more cleanly integrates with :func:`~.transpile`. The optional - extra ``bip-mapper`` to install the ``cplex`` and ``docplex`` to support + The pass was made into a separate plugin package for two reasons: first, + the dependency on CPLEX makes it harder to use, and secondly, the plugin + package integrates more cleanly with :func:`~.transpile`. The optional + extra ``bip-mapper`` to install ``cplex`` and ``docplex`` to support this pass has been removed as nothing in Qiskit optionally requires it anymore. diff --git a/releasenotes/notes/0.45/remove-deprecated-code-in-0.19-a97ccfec62405b9a.yaml b/releasenotes/notes/0.45/remove-deprecated-code-in-0.19-a97ccfec62405b9a.yaml index eb62402ab3c..b8c37e8beaa 100644 --- a/releasenotes/notes/0.45/remove-deprecated-code-in-0.19-a97ccfec62405b9a.yaml +++ b/releasenotes/notes/0.45/remove-deprecated-code-in-0.19-a97ccfec62405b9a.yaml @@ -1,10 +1,17 @@ --- -upgrade: +upgrade_transpiler: - | - The argument ``qubits`` in the method :meth:`qiskit.transpiler.instruction_durations.InstructionDurations.get`, does not accept :class:`.Qubit` (or a list of them) any more. This functionality was deprecated in Qiskit 0.33 (with Terra 0.19), released on Dec 2021. Instead, use an integer for the qubit indices. - + The argument ``qubits`` in the method :meth:`.InstructionDurations.get`, does not accept + :class:`.Qubit` (or a list of them) any more. This functionality was deprecated + in Qiskit 0.33 (with Terra 0.19), released on Dec 2021. Instead, use an integer + for the qubit indices. +upgrade_providers: - | - The argument ``channel`` in the method :meth:`qiskit.providers.models.backendconfiguration.PulseBackendConfiguration.control` is removed. It was deprecated in Qiskit 0.33 (with Terra 0.19), released on Dec 2021. Instead use the ``qubits`` argument. - + The argument ``channel`` in the method :meth:`.PulseBackendConfiguration.control` is + removed. It was deprecated in Qiskit 0.33 (with Terra 0.19), released on Dec 2021. + Instead use the ``qubits`` argument. +upgrade_misc: - | - The class ``qiskit.qobj.Qobj`` is removed. It was deprecated in Qiskit 0.33 (with Terra 0.19), released on Dec 2021. Instead, use :class:`qiskit.qobj.QasmQobj` or :class:`qiskit.qobj.PulseQobj`. \ No newline at end of file + The class ``qiskit.qobj.Qobj`` is removed. It was deprecated in Qiskit 0.33 + (with Terra 0.19), released on Dec 2021. Instead, use :class:`qiskit.qobj.QasmQobj` + or :class:`qiskit.qobj.PulseQobj`. diff --git a/releasenotes/notes/0.45/remove-deprecated-code-in-0.22-128475199e6f3cc2.yaml b/releasenotes/notes/0.45/remove-deprecated-code-in-0.22-128475199e6f3cc2.yaml index 13b3953ecd9..3ed37090541 100644 --- a/releasenotes/notes/0.45/remove-deprecated-code-in-0.22-128475199e6f3cc2.yaml +++ b/releasenotes/notes/0.45/remove-deprecated-code-in-0.22-128475199e6f3cc2.yaml @@ -1,12 +1,12 @@ --- -upgrade: +upgrade_quantum_info: - | The method :meth:`qiskit.quantum_info.pauli_basis` - does not accept ``pauli_list`` argument any more. + does not accept the ``pauli_list`` argument any more. It was deprecated in Qiskit 0.39 (with Terra 0.22), released on Oct 2022. - | - The function ``random_stabilizer_table`` - in the class :class:`qiskit.quantum_info.random` is removed. + The function ``random_stabilizer_table`` + in the :mod:`qiskit.quantum_info.random` module is removed. It was deprecated in Qiskit 0.39 (with Terra 0.22), released on Oct 2022. Instead, use :func:`qiskit.quantum_info.random.random_pauli_list`. diff --git a/releasenotes/notes/0.45/remove-deprecated-code-in-0.22.0-139fa09ee0cc6df9.yaml b/releasenotes/notes/0.45/remove-deprecated-code-in-0.22.0-139fa09ee0cc6df9.yaml index 9a97d7edddf..67f173beb92 100644 --- a/releasenotes/notes/0.45/remove-deprecated-code-in-0.22.0-139fa09ee0cc6df9.yaml +++ b/releasenotes/notes/0.45/remove-deprecated-code-in-0.22.0-139fa09ee0cc6df9.yaml @@ -1,9 +1,10 @@ -upgrade: +upgrade_transpiler: - | - Removed the argument `qubit_channel_mapping` in :class:`qiskit.transpiler.passes.calibration.rzx_builder.RZXCalibrationBuilder`, + Removed the argument ``qubit_channel_mapping`` in :class:`.RZXCalibrationBuilder`, which was deprecated in Qiskit 0.39 (released on Oct 2022, with qiskit-terra 0.22) +upgrade_providers: - | - Replaced the argument ``qobj[Qobj]`` in :meth:`qiskit.providers.aer.QasmSimulator.run()` with ``run_input[QuantumCircuit or Schedule or list]`` + Replaced the argument ``qobj[Qobj]`` in :meth:`.QasmSimulatorPy.run` with ``run_input[QuantumCircuit or list]`` Here is an example to migrate your code:: @@ -25,6 +26,5 @@ upgrade: # Get the simulation result result = job.result() - All these were deprecated since 0.22 (released on October 13, 2022) and now they are removed. diff --git a/releasenotes/notes/0.45/remove-deprecated-in-quantum-info-0f9bd2b0c093307d.yaml b/releasenotes/notes/0.45/remove-deprecated-in-quantum-info-0f9bd2b0c093307d.yaml index cd77daf912b..76447ad77d4 100644 --- a/releasenotes/notes/0.45/remove-deprecated-in-quantum-info-0f9bd2b0c093307d.yaml +++ b/releasenotes/notes/0.45/remove-deprecated-in-quantum-info-0f9bd2b0c093307d.yaml @@ -1,7 +1,7 @@ --- -upgrade: +upgrade_quantum_info: - | The classes ``qiskit.quantum_info.PauliTable`` and ``qiskit.quantum_info.StabilizerTable`` - are removed. The function ``random_pauli_table`` is also removed. + are removed. The function ``random_pauli_table()`` is also removed. They were deprecated in Qiskit 0.43 (with Terra 0.24), released in May 2023. - Instead, you should use :class:`.PauliList` and :func:`.random_pauli_list`. + Instead, you should use :class:`~.PauliList` and :func:`~.random_pauli_list`. diff --git a/releasenotes/notes/0.45/remove-toqm-optional-extra-90e974b64ec4a3bd.yaml b/releasenotes/notes/0.45/remove-toqm-optional-extra-90e974b64ec4a3bd.yaml deleted file mode 100644 index 3bc6411d73c..00000000000 --- a/releasenotes/notes/0.45/remove-toqm-optional-extra-90e974b64ec4a3bd.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -upgrade: - - | - The ``toqm`` optional setuptools extra that previously enabled running - ``pip install qiskit-terra[topm]`` has been removed as nothing in the - Qiskit code base is currently using that package anymore. If you'd like - to use the qiskit TOQM transpiler plugin you should install the - ``qiskit-toqm`` package directly. diff --git a/releasenotes/notes/0.45/remove_0.15_qiskit_scheduler_utils-fab5ec8a7ceddb56.yaml b/releasenotes/notes/0.45/remove_0.15_qiskit_scheduler_utils-fab5ec8a7ceddb56.yaml index 23088051d56..f3002344ff0 100644 --- a/releasenotes/notes/0.45/remove_0.15_qiskit_scheduler_utils-fab5ec8a7ceddb56.yaml +++ b/releasenotes/notes/0.45/remove_0.15_qiskit_scheduler_utils-fab5ec8a7ceddb56.yaml @@ -1,8 +1,8 @@ --- -upgrade: +upgrade_pulse: - | - The functions ``qiskit.scheduler.utils.format_meas_map``, ``qiskit.scheduler.utils.measure``, and - ``qiskit.scheduler.utils.measure_all`` - had been moved to ``qiskit.pulse.utils.format_meas_map``, ``qiskit.pulse.macros.measure``, - and ``qiskit.pulse.macros.measure_all`` respectively. The previous location was deprecated + The functions ``qiskit.scheduler.utils.format_meas_map()``, ``qiskit.scheduler.utils.measure()``, and + ``qiskit.scheduler.utils.measure_all()`` + had been moved to ``qiskit.pulse.utils.format_meas_map()``, ``qiskit.pulse.macros.measure()``, + and ``qiskit.pulse.macros.measure_all()`` respectively. The previous location was deprecated in Qiskit 0.20.0 (Terra 0.15.0, released on 2020-08-10) and it is no longer supported. diff --git a/releasenotes/notes/0.45/remove_8070-09b64e3a2aca1c2d.yaml b/releasenotes/notes/0.45/remove_8070-09b64e3a2aca1c2d.yaml index ea24c0021ed..a6c01880bd3 100644 --- a/releasenotes/notes/0.45/remove_8070-09b64e3a2aca1c2d.yaml +++ b/releasenotes/notes/0.45/remove_8070-09b64e3a2aca1c2d.yaml @@ -1,12 +1,13 @@ --- -upgrade: +upgrade_quantum_info: - | - The arguments ``z`` and ``x``, as separate arrays to :class:`.Pauli` + The arguments ``z`` and ``x`` to the initializer of to :class:`.Pauli` were removed, as deprecated in Qiskit Terra 0.17 (released on April, 2021). - Use a tuple instead, such as ``Pauli((z, x[, phase]))``. + A pair of ``x`` and ``z`` should be passed positionally as a single + tuple instead (``Pauli((z, x))``). - | The argument ``label`` to the initializer of - :class:`.Pauli` were removed, as deprecated in Qiskit Terra 0.17 (released on April, 2021). + :class:`.Pauli` was removed, as deprecated in Qiskit Terra 0.17 (released on April, 2021). Pass the label positionally instead, such as ``Pauli("XYZ")``. - | Importing from ``qiskit.quantum_info.operators.pauli`` is not allowed anymore, as it was diff --git a/releasenotes/notes/0.45/remove_deprecated_functionality-13b33f9dfa7d690a.yaml b/releasenotes/notes/0.45/remove_deprecated_functionality-13b33f9dfa7d690a.yaml index 46b1e414aaa..81ce0311670 100644 --- a/releasenotes/notes/0.45/remove_deprecated_functionality-13b33f9dfa7d690a.yaml +++ b/releasenotes/notes/0.45/remove_deprecated_functionality-13b33f9dfa7d690a.yaml @@ -1,6 +1,6 @@ --- -upgrade: +upgrade_misc: - | - The decorator ``qiskit.utils.deprecation.deprecate_function`` has been deprecated since Qiskit + The decorator ``qiskit.utils.deprecation.deprecate_function()`` has been deprecated since Qiskit 0.39.0 (released on October 2022, with qiskit-terra 0.22.0) and now is been removed. Use :func:`qiskit.utils.deprecate_func` instead. diff --git a/releasenotes/notes/0.45/remove_depreciated_0.15_code-ee5c7d343e310888.yaml b/releasenotes/notes/0.45/remove_depreciated_0.15_code-ee5c7d343e310888.yaml index b796eb3e4f3..3ca87bb688a 100644 --- a/releasenotes/notes/0.45/remove_depreciated_0.15_code-ee5c7d343e310888.yaml +++ b/releasenotes/notes/0.45/remove_depreciated_0.15_code-ee5c7d343e310888.yaml @@ -1,10 +1,12 @@ --- -upgrade: +upgrade_visualization: - | - Removed the argument `rho` in :func:`~qiskit.visualization.plot_state_hinton`, + Removed support for using the keyword ``rho`` for the first positional argument in + :func:`~qiskit.visualization.plot_state_hinton`, :func:`~qiskit.visualization.plot_bloch_multivector`, :func:`~qiskit.visualization.plot_state_city`, :func:`~qiskit.visualization.plot_state_paulivec`, - and :func:`~qiskit.visualization.plot_state_qsphere`. That argument was replaced by `state`. - Removed `qiskit.scheduler.utils` as all contained functions were moved to - `qiskit.pulse.macros` and `qiskit.pulse.utils`. + and :func:`~qiskit.visualization.plot_state_qsphere`. The use of ``rho`` has been replaced by + ``state``, which can be used instead. + Removed ``qiskit.scheduler.utils`` as all contained functions were moved to + :mod:`qiskit.pulse.macros` and :mod:`qiskit.pulse.utils`. All these were deprecated since 0.15 (released on August 06, 2020) and now they are removed. diff --git a/releasenotes/notes/0.45/removed_deprecated_0.21-6c93f7bbc50ae40e.yaml b/releasenotes/notes/0.45/removed_deprecated_0.21-6c93f7bbc50ae40e.yaml index 6c7b67336b8..31ffaed1da8 100644 --- a/releasenotes/notes/0.45/removed_deprecated_0.21-6c93f7bbc50ae40e.yaml +++ b/releasenotes/notes/0.45/removed_deprecated_0.21-6c93f7bbc50ae40e.yaml @@ -1,25 +1,25 @@ --- -upgrade: +upgrade_misc: - | The function :func:`~qiskit.execute_function.execute` - does not accept the arguments `qobj_id` and `qobj_header` any more. + does not accept the arguments ``qobj_id`` and ``qobj_header`` any more. Their use was deprecated in Qiskit 0.37 (with Terra 0.21), released on June 2022. - | - The transpilation pass ``qiskit.transpiler.passes.CXDirection`` is removed. It use was deprecated + The transpilation pass ``qiskit.transpiler.passes.CXDirection`` is removed. Its use was deprecated in Qiskit 0.37 (with Terra 0.21), released on June 2022. Instead, use the more generic :class:`~.GateDirection` pass. - | - The transpilation pass ``qiskit.transpiler.passes.CheckCXDirection`` is removed. It use was deprecated + The transpilation pass ``qiskit.transpiler.passes.CheckCXDirection`` is removed. Its use was deprecated in Qiskit 0.37 (with Terra 0.21), released on June 2022. Instead, use the more generic :class:`~.CheckGateDirection` pass. +upgrade_pulse: - | The methods ``to_dict`` in the classes :class:`.pulse.transforms.AlignmentKind`, - `.pulse.transforms.AlignEquispaced`, and :class:`.pulse.transforms.AlignFunc` are removed. - They were deprecated - in Qiskit 0.37 (with Terra 0.21), released on June 2022. + :class:`.pulse.transforms.AlignEquispaced`, and :class:`.pulse.transforms.AlignFunc` are removed. + They were deprecatedin Qiskit 0.37 (with Terra 0.21), released on June 2022. +upgrade_qpy: - | - The argument ``circuits`` in the method :meth:`qiskit.qpy.interface.dump` - is removed as its usage was deprecated - in Qiskit 0.37 (with Terra 0.21), released on June 2022. - Instead, use the argument ``programs``, which behaves identically. + The use of the keyword ``circuits`` for the first positional argument in the function :func:`qiskit.qpy.dump` + is removed as its usage was deprecated in Qiskit 0.37 (with Terra 0.21), released on June 2022. + Instead, use the keyword ``programs`` can be used instead (or just pass the argument in positionally), which behaves identically. diff --git a/releasenotes/notes/0.45/removed_deprecation_0.20-17b0ea6a3980eb4f.yaml b/releasenotes/notes/0.45/removed_deprecation_0.20-17b0ea6a3980eb4f.yaml index e5a6faff006..e37a8a7ac52 100644 --- a/releasenotes/notes/0.45/removed_deprecation_0.20-17b0ea6a3980eb4f.yaml +++ b/releasenotes/notes/0.45/removed_deprecation_0.20-17b0ea6a3980eb4f.yaml @@ -1,18 +1,17 @@ --- -upgrade: +upgrade_visualization: - | - The class constructor arguments `qregs`, `cregs`, - `layout` and `global_phase` for :class:`.visualization.QCircuitImage` + The class constructor arguments ``qregs``, ``cregs``, + ``layout`` and ``global_phase`` for :class:`.visualization.QCircuitImage` are removed, as they were deprecated in 0.20. - +upgrade_transpiler: - | - In :class:`.transpiler.CouplingMap` method `subgraph` is removed - as deprecated in 0.20. :meth:`~reduce` can be used in place of method `subgraph`. - + In :class:`.transpiler.CouplingMap` method ``subgraph`` is removed + as deprecated in 0.20. :meth:`~reduce` can be used in place of method ``subgraph``. +upgrade_synthesis: - | - The parameter `order` in :class:`.synthesis.SuzukiTrotter` + The parameter ``order`` in :class:`.synthesis.SuzukiTrotter` constructor raises an exception instead of deprecation warning when set in an odd number. Suzuki product formulae are symmetric and therefore only defined for even orders. - - \ No newline at end of file + diff --git a/releasenotes/notes/0.45/rust-1.64-add4a4a8e5ce9786.yaml b/releasenotes/notes/0.45/rust-1.64-add4a4a8e5ce9786.yaml index a41d30c83f6..80aba7f6340 100644 --- a/releasenotes/notes/0.45/rust-1.64-add4a4a8e5ce9786.yaml +++ b/releasenotes/notes/0.45/rust-1.64-add4a4a8e5ce9786.yaml @@ -1,5 +1,6 @@ --- -upgrade: +upgrade_misc: - | - Building Qiskit from source now requires a Rust compiler compatible with language version 1.64, - up from 1.61. + Building Qiskit from source now requires a Rust compiler compatible with language version 1.64. + This has been increased from the previous minimum supported Rust version of 1.61 for building + earlier versions of Qiskit. diff --git a/releasenotes/notes/0.45/sampler-with-no-measure-6cd3a05555187b58.yaml b/releasenotes/notes/0.45/sampler-with-no-measure-6cd3a05555187b58.yaml deleted file mode 100644 index 89ca3644df9..00000000000 --- a/releasenotes/notes/0.45/sampler-with-no-measure-6cd3a05555187b58.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Add early validation for :class:`.BaseSampler` when input :class:`.QuantumCircuit` does not - have measurements. diff --git a/releasenotes/notes/0.45/seed-sabre-with-layout-17d46e1a6f516b0e.yaml b/releasenotes/notes/0.45/seed-sabre-with-layout-17d46e1a6f516b0e.yaml index fa6a12b9c1f..af697739e42 100644 --- a/releasenotes/notes/0.45/seed-sabre-with-layout-17d46e1a6f516b0e.yaml +++ b/releasenotes/notes/0.45/seed-sabre-with-layout-17d46e1a6f516b0e.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | Added support to the :class:`.SabreLayout` pass to add trials with specified starting layouts. The :class:`.SabreLayout` transpiler pass typically diff --git a/releasenotes/notes/0.45/single-pulse-rx-cal-347aadcee7bfe60b.yaml b/releasenotes/notes/0.45/single-pulse-rx-cal-347aadcee7bfe60b.yaml index 48b02694f64..a5088675b28 100644 --- a/releasenotes/notes/0.45/single-pulse-rx-cal-347aadcee7bfe60b.yaml +++ b/releasenotes/notes/0.45/single-pulse-rx-cal-347aadcee7bfe60b.yaml @@ -1,25 +1,25 @@ --- -features: +features_transpiler: - | Two new transpiler passes are added to generate single-pulse RX gate calibrations on the fly. - These single-pulse RX calibrations will reduce the gate time in half, as described in - P.Gokhale et al, Optimized Quantum Compilation for Near-Term Algorithms with OpenPulse + These single-pulse RX calibrations will reduce the gate time in half, as described in + P.Gokhale et al, Optimized Quantum Compilation for Near-Term Algorithms with OpenPulse (2020), `arXiv:2004.11205 `__. To reduce the amount of RX calibration data that needs to be generated, :class:`~qiskit.transpiler.passes.optimization.normalize_rx_angle.NormalizeRXAngle` - performs three optimizations: wrapping RX gate rotation angles to [0, pi], - replacing RX(pi/2) and RX(pi) with SX and X gates, and quantizing the rotation angles. - This pass is required to be run before + performs three optimizations: wrapping the :class:`.RXGate` rotation angles to ``[0, pi]``, + replacing ``RX(pi/2)`` and ``RX(pi)`` with :class:`.SXGate` and :class:`.XGate`, and + quantizing the rotation angles. This pass is required to be run before :class:`~qiskit.transpiler.passes.calibration.rx_builder.RXCalibrationBuilder`, which generates RX calibrations on the fly. - The optimizations performed by ``NormalizeRXAngle`` reduce the amount of calibration data and + The optimizations performed by :class:`~.NormalizeRXAngle` reduce the amount of calibration data and enable us to take advantage of the more accurate, hardware-calibrated - pulses. The calibrations generated by ``RXCalibrationBuilder`` are bootstrapped from - the SX gate calibration, which should be already present in the target. + pulses. The calibrations generated by :class:`~.RXCalibrationBuilder` are bootstrapped from + the :class:`.SXGate` calibration, which should be already present in the target. The amplitude is linearly scaled to achieve the desired arbitrary rotation angle. - Such single-pulse calibrations reduces the RX gate time in half, compared to the - conventional sequence that consists of two SX pulses. + Such single-pulse calibrations reduces the :class:`.RXGate` time in half, compared to the + conventional sequence that consists of two :class:`.SXGate` pulses. There could be an improvement in fidelity due to this reduction in gate time. diff --git a/releasenotes/notes/0.45/singletons-83782de8bd062cbc.yaml b/releasenotes/notes/0.45/singletons-83782de8bd062cbc.yaml index 7b8313e6b08..7d52d00d0e6 100644 --- a/releasenotes/notes/0.45/singletons-83782de8bd062cbc.yaml +++ b/releasenotes/notes/0.45/singletons-83782de8bd062cbc.yaml @@ -1,5 +1,5 @@ --- -features: +features_circuits: - | Introduced two new classes, :class:`.SingletonInstruction` and :class:`~.SingletonGate`, which are subclasses of :class:`~.circuit.Instruction` and :class:`~.Gate` respectively, that use a @@ -14,8 +14,8 @@ features: and thus can not use :class:`~.SingletonGate` because a single shared global instance can not represent the parameter values. - The other potential issue to be aware of when using this class is around the - use of the singleton classes is that the :class:`~.circuit.Instruction` + The other potential issue to be aware of when using + singleton classes is that the :class:`~.circuit.Instruction` data model supports some mutable state. Specifically, the :attr:`~.Instruction.label`, :attr:`~.Instruction.duration`, :attr:`~.Instruction.unit`, and :attr:`~.Instruction.condition` attributes are all accessible and mutable in the @@ -23,9 +23,9 @@ features: with having a shared object via :class:`~.SingletonInstruction`. For instances of :class:`~.SingletonInstruction`, setting these attributes directly is not allowed and it will raise an exception. If they are needed for a particular - instance you must ensure you have a mutable instance using :meth:`.Instruction.to_mutable` - (or use :meth:`.Instruction.c_if` for :attr:`~.Instruction.condition`), or - ``label``, ``duration`` and ``unit`` can be given as keyword arguments during class construction. + instance, you must ensure you have a mutable instance using :meth:`.Instruction.to_mutable` + (or use :meth:`.Instruction.c_if` for :attr:`~.Instruction.condition`). + ``label``, ``duration`` and ``unit`` can also be given as keyword arguments during class construction. - | The following standard library gates are now instances of :class:`~.SingletonGate`: @@ -48,16 +48,16 @@ features: * :class:`~.YGate` * :class:`~.ZGate` - This means that if these classes are instantiated as (e.g.) ``XGate()`` using + This means that if these classes are instantiated as (e.g.) :class:`.XGate()` using all the constructor defaults, they will all share a single global - instance. This results in large reduction in the memory overhead for > 1 + instance. This results in a large reduction in the memory overhead for > 1 object of these types and significantly faster object construction time. - | Introduced a new class :class:`~.SingletonControlledGate` which is a subclass of :class:`~.ControlledGate` that uses a single instance for all objects of that type. The intent behind this class is to minimize the memory and construction overhead of using multiple gates in a circuit with the tradeoff of having - global shared state. For this reason this class is only applicable to + a global shared state. For this reason, this class is only applicable to gates that do not have any unique and/or mutable state stored in an instance. For example, a :class:`.CXGate` doesn't contain any state and thus can leverage :class:`~.SingletonControlledGate` (and does starting in @@ -96,7 +96,7 @@ features: This means that unless a ``label``, ``condition``, ``duration``, ``unit``, or ``ctrl_state`` are set on the instance at creation time they will all share a - single global instance whenever a new gate object is created. This results in large + single global instance whenever a new gate object is created. This results in a large reduction in the memory overhead for > 1 object of these types. - | Added a new method :meth:`.Instruction.to_mutable` and attribute @@ -111,7 +111,7 @@ features: of their base type. You can use the new :attr:`~.Instruction.base_class` attribute to find the base class of these. See the attribute documentation for considerations on when other subclasses may modify their :attr:`~.Instruction.base_class`, and what this means for execution. -upgrade: +upgrade_circuits: - | The following standard library gates: @@ -146,10 +146,10 @@ upgrade: * :class:`~.CZGate` - no longer are able to set :attr:`~.Gate.label`, :attr:`~.Gate.condition`, + are no longer able to set :attr:`~.Gate.label`, :attr:`~.Gate.condition`, :attr:`~.Gate.duration`, or :attr:`~.Gate.unit` (and :attr:`~.ControlledGate.ctrl_state` for :class:`~.ControlledGate` subclasses) after instantiating an object - anymore. :attr:`~.Gate.condition` can be set through + anymore. You can still set :attr:`~.Gate.condition` through the use :meth:`~.Gate.c_if`. You can use :meth:`~.Gate.to_mutable` to get a mutable copy of the instruction and then use the setter on that copy instead of the original object. ``label``, ``duration`` and ``unit`` can @@ -161,16 +161,15 @@ upgrade: - | For anything that interacts with :class:`~.Gate`, :class:`~.Operation`, or :class:`~.circuit.Instruction` objects or works with these as part of a - :class:`~.QuantumCircuit` or :class:`~.DAGCircuit` classes it is important + :class:`~.QuantumCircuit` or :class:`~.DAGCircuit` classes, it is important to note that the use of shared references for instances is much more common now. Previously, it was possible to reuse and share an instance of a - circuit operation it wasn't very commonly used and a copy would generate + circuit operation, but it wasn't very commonly used and a copy would generate a unique instance. This has changed starting in this release because of :class:`~.SingletonInstruction` and :class:`.SingletonGate` being made available (and a large - number of standard library gates now built off of it). If your usage of these objects is - assuming - unique instances for every circuit operation there are potential issue because - of shared state that will be reused between operations of the same type (that + number of standard library gates now built off of them). If your usage of these objects is + assuming unique instances for every circuit operation, this becomes a potential issue, as now + a shared state will be reused between operations of the same type (that will persist through copy and deep copies). You can rely on the :attr:`.Instruction.mutable` attribute to check the mutability of an object or use :meth:`.Instruction.to_mutable` to get a mutable copy of any instruction. diff --git a/releasenotes/notes/0.45/sparse-pauli-op-apply-layout-43149125d29ad015.yaml b/releasenotes/notes/0.45/sparse-pauli-op-apply-layout-43149125d29ad015.yaml index 237b1caa491..84b470f444c 100644 --- a/releasenotes/notes/0.45/sparse-pauli-op-apply-layout-43149125d29ad015.yaml +++ b/releasenotes/notes/0.45/sparse-pauli-op-apply-layout-43149125d29ad015.yaml @@ -1,5 +1,5 @@ --- -features: +features_quantum_info: - | Added a new method, :meth:`~.SparsePauliOp.apply_layout`, to the :class:`~.SparsePauliOp` class. This method is used to apply diff --git a/releasenotes/notes/0.45/sparse-pauli-op-constraint-pauli-setter-52f6f89627d1937c.yaml b/releasenotes/notes/0.45/sparse-pauli-op-constraint-pauli-setter-52f6f89627d1937c.yaml deleted file mode 100644 index 86d4b552ffe..00000000000 --- a/releasenotes/notes/0.45/sparse-pauli-op-constraint-pauli-setter-52f6f89627d1937c.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -fixes: - - | - The setter for :attr:`.SparsePauliOp.paulis` will now correctly reject attempts to set the - attribute with incorrectly shaped data, rather than silently allowing an invalid object to be - created. See `#10384 `__. diff --git a/releasenotes/notes/0.45/sparse-pauli-op-num-qubits-9c1a3f7dcc7949b9.yaml b/releasenotes/notes/0.45/sparse-pauli-op-num-qubits-9c1a3f7dcc7949b9.yaml index 3fa14d6ac23..a8d08811618 100644 --- a/releasenotes/notes/0.45/sparse-pauli-op-num-qubits-9c1a3f7dcc7949b9.yaml +++ b/releasenotes/notes/0.45/sparse-pauli-op-num-qubits-9c1a3f7dcc7949b9.yaml @@ -1,6 +1,6 @@ --- -features: +fixes: - | - Added support to allow :class:`SparsePauliOp` default initialization passing empty + Added support to allow :class:`SparsePauliOp` default initialization passing an empty iterable to the static methods :meth:`~.SparsePauliOp.from_list` and :meth:`~.SparsePauliOp.from_sparse_list`. Fixed `#10159 `__. diff --git a/releasenotes/notes/0.45/support-empty-delete-for-pauli-16c5c5fae890c16c.yaml b/releasenotes/notes/0.45/support-empty-delete-for-pauli-16c5c5fae890c16c.yaml deleted file mode 100644 index ba7fd7a63c5..00000000000 --- a/releasenotes/notes/0.45/support-empty-delete-for-pauli-16c5c5fae890c16c.yaml +++ /dev/null @@ -1,5 +0,0 @@ ---- -fixes: - - | - Passing an empty list to the methods :meth:`.Pauli.delete`, :meth:`.PauliList.delete`, - and :meth:`.PauliTable.delete` now returns a copy of the original object instead of throwing an error. diff --git a/releasenotes/notes/0.45/timeline-visualisation-deprecated-bit-index-7277aa6e2a903cb7.yaml b/releasenotes/notes/0.45/timeline-visualisation-deprecated-bit-index-7277aa6e2a903cb7.yaml index ea4c5fd9b02..0d6932dbf44 100644 --- a/releasenotes/notes/0.45/timeline-visualisation-deprecated-bit-index-7277aa6e2a903cb7.yaml +++ b/releasenotes/notes/0.45/timeline-visualisation-deprecated-bit-index-7277aa6e2a903cb7.yaml @@ -1,5 +1,5 @@ --- -features: +features_visualization: - | When defining a custom stylesheet for the pulse timeline drawer :func:`qiskit.visualization.timeline_drawer`, "generator" functions that have the object attribute ``accepts_program`` set to ``True`` will diff --git a/releasenotes/notes/0.45/transpile-layout-improvements-118dd902d93e5b96.yaml b/releasenotes/notes/0.45/transpile-layout-improvements-118dd902d93e5b96.yaml index 139708ea41c..f4fbc5296b5 100644 --- a/releasenotes/notes/0.45/transpile-layout-improvements-118dd902d93e5b96.yaml +++ b/releasenotes/notes/0.45/transpile-layout-improvements-118dd902d93e5b96.yaml @@ -1,5 +1,5 @@ --- -features: +features_transpiler: - | Added new methods to :class:`.TranspileLayout`, :meth:`~.TranspileLayout.initial_index_layout` and :meth:`~.TranspileLayout.routing_permutation`, which are used to generate a list view of diff --git a/releasenotes/notes/0.45/unitary-overlap-7dde87a8e2d7a1f7.yaml b/releasenotes/notes/0.45/unitary-overlap-7dde87a8e2d7a1f7.yaml index 781eeae7464..ee9c49a58b5 100644 --- a/releasenotes/notes/0.45/unitary-overlap-7dde87a8e2d7a1f7.yaml +++ b/releasenotes/notes/0.45/unitary-overlap-7dde87a8e2d7a1f7.yaml @@ -1,7 +1,7 @@ --- -features: +features_circuits: - | - Added the :class:`.UnitaryOverlap` circuit to the Qiskit circuit library that + Added the :class:`.UnitaryOverlap` circuit to the Qiskit circuit library. It can be used to compute the fidelity of states generated by unitaries by looking at the probability of the output distribution in the all-zeros state or, equivalently, by computing the expectation value of the projector diff --git a/releasenotes/notes/0.45/unitary-u-not-u3-0a32c2d968f7890e.yaml b/releasenotes/notes/0.45/unitary-u-not-u3-0a32c2d968f7890e.yaml index 84b459d22b6..7c64aa75f8e 100644 --- a/releasenotes/notes/0.45/unitary-u-not-u3-0a32c2d968f7890e.yaml +++ b/releasenotes/notes/0.45/unitary-u-not-u3-0a32c2d968f7890e.yaml @@ -1,4 +1,5 @@ --- -upgrade: +upgrade_circuits: - | - the definition of UnitaryGate for single qubit unitaries is now in terms of UGate instead of the legacy U3Gate class + The definition of :class:`~.UnitaryGate` for single qubit unitaries is now in + terms of :class:`~.UGate` instead of the legacy :class:`~.U3Gate` class. diff --git a/releasenotes/notes/0.45/update-gate-map-visualizations-6ea907a0502fdc1a.yaml b/releasenotes/notes/0.45/update-gate-map-visualizations-6ea907a0502fdc1a.yaml index 4ef11ae430d..8fcd82a427a 100644 --- a/releasenotes/notes/0.45/update-gate-map-visualizations-6ea907a0502fdc1a.yaml +++ b/releasenotes/notes/0.45/update-gate-map-visualizations-6ea907a0502fdc1a.yaml @@ -1,14 +1,21 @@ --- -features: +features_visualization: - | The visualizations from the :func:`~.plot_gate_map`, :func:`~.plot_coupling_map`. - :func:`~.plot_error_map`, and :func:`~.plot_circuit_layout` functions have been significantly + :func:`~.plot_error_map`, and :func:`~.plot_circuit_layout` functions have been significantly improved for rendering layouts of backends with large numbers of qubits. This was accomplished by leveraging `graphviz `__ through rustworkx's ``graphviz_draw()`` function to perform a more sophisticated algorithmic graph layout that scales for large numbers of qubits. -upgrade: + .. plot:: + + from qiskit.visualization import plot_coupling_map + from rustworkx.generators import grid_graph + graph = grid_graph(50, 10) + plot_coupling_map(len(graph), None, graph.edge_list()) + +upgrade_visualization: - | The visualization functions: :func:`~.plot_gate_map`, :func:`~.plot_coupling_map`. :func:`~.plot_error_map`, and :func:`~.plot_circuit_layout` now depend on diff --git a/releasenotes/notes/fix-aqc-optimizer-typehint-34b54c6278d23f79.yaml b/releasenotes/notes/fix-aqc-optimizer-typehint-34b54c6278d23f79.yaml index bca717c1874..1da5d07fb79 100644 --- a/releasenotes/notes/fix-aqc-optimizer-typehint-34b54c6278d23f79.yaml +++ b/releasenotes/notes/fix-aqc-optimizer-typehint-34b54c6278d23f79.yaml @@ -3,8 +3,7 @@ fixes: - | The use of the (deprecated) ``Optimizer`` class on :class:`~.AQC` did not have a non-deprecated alternative path, which should have been introduced in - the original ``qiskit-algorithms`` deprecation PR - [#10406](https://github.com/Qiskit/qiskit/pull/10406). + Qiskit 0.44. It now accepts a callable that implements the :class:`~.Minimizer` protocol, as explicitly stated in the deprecation warning. The callable can look like the following example: diff --git a/releasenotes/notes/fix-error-message-qpy-version-cf0763da22ce2224.yaml b/releasenotes/notes/fix-error-message-qpy-version-cf0763da22ce2224.yaml deleted file mode 100644 index 67690c01112..00000000000 --- a/releasenotes/notes/fix-error-message-qpy-version-cf0763da22ce2224.yaml +++ /dev/null @@ -1,9 +0,0 @@ ---- -fixes: - - | - Fixed an issue with :func:`.qpy.load` when attempting to load a QPY format - version that is not supported by this version of Qiskit it will now display - a descriptive error message. Previously, it would raise an internal error - because of the incompatibility between the formats which was difficult to - debug. If the QPY format verison is not supported that indicates the Qiskit - version will need to be upgraded to read the QPY payload. diff --git a/releasenotes/notes/fix-plot-state-city-viz-2963c83bcf3d3347.yaml b/releasenotes/notes/fix-plot-state-city-viz-2963c83bcf3d3347.yaml index 8205c2ded5f..0c621c9df07 100644 --- a/releasenotes/notes/fix-plot-state-city-viz-2963c83bcf3d3347.yaml +++ b/releasenotes/notes/fix-plot-state-city-viz-2963c83bcf3d3347.yaml @@ -1,9 +1,6 @@ --- fixes: - | - Adjusted zoom, fontsize, and margins to fit the plot better for more figure - sizes. - - | - Corrected the Z-ordering behavior of bars and the zero-amplitude plane. - - | - Corrected display of negative real value bars + Adjusted zoom, fontsize, and margins in :func:`.plot_state_city` to fit the plot better for more figure + sizes. Corrected the Z-ordering behavior of bars and the zero-amplitude plane, and corrected display + of negative real value bars. diff --git a/releasenotes/notes/fix_backend_name-e84661707058b529.yaml b/releasenotes/notes/fix_backend_name-e84661707058b529.yaml deleted file mode 100644 index ed0cbe9a265..00000000000 --- a/releasenotes/notes/fix_backend_name-e84661707058b529.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -fixes: - - | - Fixed an issue in the :class:`.QuantumInstance` class where it was assuming - all ``AerSimulator`` backends were always :class:`.BackendV1`. This would cause - combatibility issues with the 0.13.0 release of ``qiskit-aer`` which is starting to - use :class:`.BackendV2` for `AerSimulator`` backends. diff --git a/releasenotes/notes/prepare-0.45-50118e5e6d110302.yaml b/releasenotes/notes/prepare-0.45-50118e5e6d110302.yaml new file mode 100644 index 00000000000..d052bc9b7fc --- /dev/null +++ b/releasenotes/notes/prepare-0.45-50118e5e6d110302.yaml @@ -0,0 +1,41 @@ +--- +prelude: | + Qiskit 0.45.0 is the last feature release before 1.0. It prepares the ground for the API + changes we are planning for our first major version release, including many removals of + previously deprecated functionality as well as a series of new deprecations. + + .. note:: + If your project depends on Qiskit, it may rely on functionality that will no longer + be supported in Qiskit 1.0. For this reason, we recommend that you proactively cap your + supported version to ``<1.0``. + + Some feature highlights of Qiskit 0.45.0 are: + + * Starting in this release, all unparametrized gates in the Qiskit standard circuit library are now + **singletons**. By default, these gates share a single instance in memory, so once a gate of a + specific type, let's say :class:`.XGate`, is instantiated, any subsequent instances of + :class:`.XGate` will be a reference to the first one. This results in a reduced memory usage and + construction overhead when using multiple gates of the same type in a circuit. + To realize this feature, new base classes have been + introduced: :class:`.SingletonInstruction` and :class:`.SingletonGate`. See feature notes for more details. + + * We have added a new **generic pass manager interface** that can be found in the new + :mod:`qiskit.passmanager` module. This is a generalization of the pass manager that was used to build the + Qiskit transpiler, and it introduces a generic framework to enable users to create new pass managers + that use different intermediate representations (IRs). The module includes a generic pass manager base class, + flow controllers, and the necessary infrastructure to manage the execution of pass manager tasks. + The new interface was used to rebuild the existing pass manager in the :mod:`qiskit.transpiler` module, + cleaning up technical debt in the code, and improving usability and performance. + See feature and upgrade notes for more details. + + * 0.45.0 allows users to better interact with the **layout permutations** performed by the transpiler. The data + contained in the :class:`.TranspileLayout` class is now more accessible through a series of new methods + and attributes. And a new :meth:`.SparsePauliOp.apply_layout` method allows to apply a specific layout + permutation to a :class:`~.SparsePauliOp` observable that was built for an input circuit to the transpiler. + See feature notes for more details. + + * Finally, we have introduced **annotated operations** with the new :class:`.AnnotatedOperation` class, + which allows to formulate complex circuit instructions as a base instruction with a set of modifiers. + For example, instead of a specific operation type that implements the controlled inverse of a + :class:`.RXGate`, we can now use an annotated :class:`.RXGate` with inverse and control attributes. + See feature notes for more details. diff --git a/releasenotes/notes/vf2-threading-b778a36de5b8832a.yaml b/releasenotes/notes/vf2-threading-b778a36de5b8832a.yaml index e813f9ed512..7dd20afd0eb 100644 --- a/releasenotes/notes/vf2-threading-b778a36de5b8832a.yaml +++ b/releasenotes/notes/vf2-threading-b778a36de5b8832a.yaml @@ -1,8 +1,9 @@ --- other: - | - The :class:`.VF2Layout` and :class:`.VF2PostLayout` transpiler passes previously would - potentially run their internal scoring using multithreading if the input - circuit's were sufficiently large. However, the multithreading usage has - been removed from the passes as it was shown to cause a performance - regression instead of an improvement like originally intended. + Modified the behavior of the :class:`.VF2Layout` and :class:`.VF2PostLayout` + transpiler passes, which would previously run their internal scoring using + multithreading if the input circuits were sufficiently large. The + multithreading usage has now been removed from the passes, as it was shown + to cause a performance regression instead of an improvement like originally + intended. diff --git a/setup.py b/setup.py index 3162a11198b..c678e44651c 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ setup( name="qiskit-terra", - version="0.45.0rc1", + version="0.45.0", description="Software for developing quantum computing programs", long_description=README, long_description_content_type="text/markdown",