Skip to content

Commit

Permalink
Prepare 0.45.0 release (#11169)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Add suggestions from Matt's code review

* Update qiskit/circuit/__init__.py

Co-authored-by: Matthew Treinish <[email protected]>

* Last try at reno subsections

* Revert "Last try at reno subsections"

This reverts commit 1b8a610.

* Apply suggestions from Matt's code review

Co-authored-by: Matthew Treinish <[email protected]>

---------

Co-authored-by: Matthew Treinish <[email protected]>
  • Loading branch information
ElePT and mtreinish authored Nov 3, 2023
1 parent a1100db commit 33ed163
Show file tree
Hide file tree
Showing 96 changed files with 398 additions and 574 deletions.
4 changes: 2 additions & 2 deletions docs/release_notes.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion qiskit/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.45.0rc1
0.45.0
21 changes: 21 additions & 0 deletions qiskit/circuit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
BreakLoopOp
ContinueLoopOp
The :class:`.SwitchCaseOp` also understands a special value:
.. py:data:: CASE_DEFAULT
Expand Down Expand Up @@ -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
----------
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions qiskit_pkg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
46 changes: 46 additions & 0 deletions releasenotes/config.yaml
Original file line number Diff line number Diff line change
@@ -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]
7 changes: 0 additions & 7 deletions releasenotes/notes/0.45/10787-078d7caa70fc7de8.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 <https://github.com/Qiskit/qiskit/issues/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 <https://github.com/Qiskit/qiskit/issues/10837>`_ for more information.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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`.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
112 changes: 57 additions & 55 deletions releasenotes/notes/0.45/add-passmanager-module-3ae30cff52cb83f1.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion releasenotes/notes/0.45/add-target-to-hls.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading

0 comments on commit 33ed163

Please sign in to comment.