Skip to content

Commit

Permalink
Prepare 0.22.0 release (#8868)
Browse files Browse the repository at this point in the history
* Prepare 0.22.0 release

This commit prepares the 0.22.0 release, this involves 2 steps first
changing all the version numbers to 0.22.0 from 0.22.0rc1 and secondly
migrating the release notes to a standalone directory for 0.22.0 (this
was already done on main as part of #8850 but not on the stable branch).

* Start updating release note

* Finish first pass over feature release notes

* Fix typo

* Update upgrade and deprecation notes

* Remove release notes for already release bug fixes

* Update bugfix release notes

* Fix typo

* Apply suggestions from code review

Co-authored-by: Julien Gacon <[email protected]>

* Move and update new release notes

* Fix up typos in release notes

Co-authored-by: Julien Gacon <[email protected]>
Co-authored-by: Jake Lishman <[email protected]>
  • Loading branch information
3 people authored Oct 13, 2022
1 parent b75df3a commit 6187703
Show file tree
Hide file tree
Showing 164 changed files with 726 additions and 782 deletions.
2 changes: 1 addition & 1 deletion qiskit/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.22.0rc2
0.22.0
1 change: 1 addition & 0 deletions qiskit/circuit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@
InstructionSet
Operation
EquivalenceLibrary
CommutationChecker
Control Flow Operations
-----------------------
Expand Down
3 changes: 3 additions & 0 deletions qiskit/circuit/library/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
CXGate
CYGate
CZGate
CCZGate
HGate
IGate
MSGate
Expand All @@ -97,6 +98,8 @@
ECRGate
SGate
SdgGate
CSGate
CSdgGate
SwapGate
iSwapGate
SXGate
Expand Down
5 changes: 5 additions & 0 deletions qiskit/pulse/channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
All channels are children of the same abstract base class:
.. autoclass:: Channel
And classical IO channels are children of:
.. autoclass:: ClassicalIOChannel
"""
from abc import ABCMeta
from typing import Any, Set, Union
Expand Down
9 changes: 9 additions & 0 deletions qiskit/transpiler/passes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@
ContainsInstruction
GatesInBasis
ConvertConditionsToIfOps
High Level Synthesis Configuration
==================================
.. autosummary::
:toctree: ../stubs/
HLSConfig
"""

# layout selection (placement)
Expand Down Expand Up @@ -243,6 +251,7 @@
from .synthesis import LinearFunctionsSynthesis
from .synthesis import LinearFunctionsToPermutations
from .synthesis import HighLevelSynthesis
from .synthesis import HLSConfig

# calibration
from .calibration import PulseGates
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions releasenotes/notes/0.21/fix-marginal_counts-on-pulse-backend.yaml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
features:
- |
Implements the :class:`qiskit.algorithms.minimum_eigensolvers.AdaptVQE`
algorithm. This algorithm uses a
:class:`qiskit.algorithms.minimum_eigensolvers.VQE` in combination with a
pool of operators from which to build out an
Added a new algorithm class, :class:`~.AdaptVQE` to :mod:`qiskit.algorithms`
This algorithm uses a :class:`qiskit.algorithms.minimum_eigensolvers.VQE`
in combination with a pool of operators from which to build out an
:class:`qiskit.circuit.library.EvolvedOperatorAnsatz` adaptively.
For example:
.. code-block:: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ features:
backends to run additional custom transpiler passes when targetting that
backend by leveraging the transpiler stage
:mod:`~qiskit.transpiler.preset_passmanagers.plugin` interface.
For more details on how to use this see :ref:`custom_transpiler_backend`.
For more details on how to use this see: :ref:`custom_transpiler_backend`.
- |
Added a new keyword argument, ``ignore_backend_supplied_default_methods``, to the
:func:`~.transpile` function can be used to disable a backend's custom
default method if the target backend has one set.
:func:`~.transpile` function which can be used to disable a backend's
custom selection of a default method if the target backend has
``get_scheduling_stage_plugin()`` or ``get_translation_stage_plugin()``
defined.
19 changes: 19 additions & 0 deletions releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
features:
- |
Added a ``label`` parameter to the :class:`.Barrier` class's constructor
and the :meth:`~.QuantumCircuit.barrier` method which allows a user to
assign a label to an instance of the :class:`~.Barrier` directive. For
visualizations generated with :func:`~.circuit_drawer` or
:meth:`.QuantumCircuit.draw` this label will be printed at the top of the
``barrier``.
.. jupyter-execute::
from qiskit import QuantumCircuit
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.h(1)
circuit.barrier(label="After H")
circuit.draw('mpl')
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
features:
- |
Add new gates :class:`.CCZGate`, :class:`.CSGate`, and :class:`.CSdgGate`
to the standard gates in the Circuit Library
(:mod:`qiskit.circuit.library`).
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
---
features:
- |
Added :class:`qiskit.algorithms.eigensolvers` package to include
interfaces for primitive-enabled algorithms.
:class:`qiskit.algorithms.eigensolvers.VQD` has been
refactored in this implementation to leverage primitives.
To use the new implementation with a reference primitive, one can do, for example:
Added :mod:`qiskit.algorithms.eigensolvers` package to include
interfaces for primitive-enabled algorithms. This new module
will eventually replace the previous ``qiskit.algorithms.eigen_solvers``.
This new module contains an alternative implementation of the
:class:`~qiskit.algorithms.eigensolvers.VQD` which instead of taking
a backend or :class:`~.QuantumInstance` instead takes an instance of
:class:`~.BaseEstimator`, including :class:`~.Estimator`,
:class:`~.BackendEstimator`, or any provider implementations such as
those as those present in ``qiskit-ibm-runtime`` and ``qiskit-aer``.
For example, to use the new implementation with an instance of
:class:`~.Estimator` class:
.. code-block:: python
from qiskit.algorithms.eigensolvers import VQQ
from qiskit.algorithms.eigensolvers import VQD
from qiskit.algorithms.optimizers import SLSQP
from qiskit.circuit.library import TwoLocal
from qiskit.primitives import Sampler, Estimator
from qiskit.algorithms.state_fidelities import ComputeUncompute
from qiskit.opflow import PauliSumOp
from qiskit.quantum_info import SparsePauliOp
h2_op = SparsePauliOp(
h2_op = PauliSumOp(SparsePauliOp(
["II", "IZ", "ZI", "ZZ", "XX"],
coeffs=[
-1.052373245772859,
Expand All @@ -25,7 +33,7 @@ features:
-0.01128010425623538,
0.18093119978423156,
],
)
))
estimator = Estimator()
ansatz = TwoLocal(rotation_blocks=["ry", "rz"], entanglement_blocks="cz")
Expand All @@ -40,4 +48,3 @@ features:
``aux_operators_evaluated`` field on the results. This will consist of a list or dict of
tuples containing the expectation values for these operators, as we well as the metadata from
primitive run. ``aux_operator_eigenvalues`` is no longer a valid field.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
features:
- |
Add new algorithms to calculate state fidelities/overlaps
Added new algorithms to calculate state fidelities/overlaps
for pairs of quantum circuits (that can be parametrized). Apart from
the base class (:class:`qiskit.algorithms.state_fidelities.BaseStateFidelity`),
there is now an implementation of the compute-uncompute method that leverages
the sampler primitive (:class:`qiskit.algorithms.state_fidelities.ComputeUncompute`).
the base class (:class:`~qiskit.algorithms.state_fidelities.BaseStateFidelity`) which defines the interface,
there is an implementation of the compute-uncompute method that leverages
instances of the :class:`~.BaseSampler` primitive: :class:`qiskit.algorithms.state_fidelities.ComputeUncompute`.
For example:
Expand All @@ -14,7 +14,7 @@ features:
import numpy as np
from qiskit.primitives import Sampler
from qiskit.algorithms.state_fidelities import ComputeUncompute
from qiskit. import RealAmplitudes
from qiskit.circuit.library import RealAmplitudes
sampler = Sampler(...)
fidelity = ComputeUncompute(sampler)
Expand All @@ -24,5 +24,3 @@ features:
job = fidelity.run([circuit], [circuit], [values], [values+shift])
fidelities = job.result().fidelities
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
features:
- |
Added a new module :mod:`qiskit.algorithms.gradients` that contains
classes which are used to compute gradients using the primitive
interfaces defined in :mod:`qiskit.primitives`. There are 4 types of
gradient classes: Finite Difference, Parameter Shift, Linear
Combination of Unitary, and SPSA with implementations that either use
an instance of the :class:`~.BaseEstimator` interface:
* :class:`~.ParamShiftEstimatorGradient`
* :class:`~.LinCombEstimatorGradient`
* :class:`~.FiniteDiffEstimatorGradient`
* :class:`~.SPSAEstimatorGradient`
or an instance of the :class:`~.BaseSampler` interface:
* :class:`~.ParamShiftSamplerGradient`
* :class:`~.LinCombSamplerGradient`
* :class:`~.FiniteDiffSamplerGradient`
* :class:`~.SPSASamplerGradient`
The estimator-based gradients compute the gradient of expectation
values, while the sampler-based gradients return gradients of the
measurement outcomes (also referred to as "probability gradients").
For example:
.. code-block:: python
estimator = Estimator(...)
gradient = ParamShiftEstimatorGradient(estimator)
job = gradient.run(circuits, observables, parameters)
gradients = job.result().gradients
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
features:
- |
The :class:`~.Grover` class has a new keyword argument, ``sampler`` which is
used to run the algorithm using an instance of the :class:`~.BaseSampler`
interface to calculate the results. This new argument supersedes the
the ``quantum_instance`` argument and accordingly, ``quantum_instance``
is pending deprecation and will be deprecated and subsequently removed in
future releases.
Example:
.. code-block:: python
from qiskit import QuantumCircuit
from qiskit.primitives import Sampler
from qiskit.algorithms import Grover, AmplificationProblem
sampler = Sampler()
oracle = QuantumCircuit(2)
oracle.cz(0, 1)
problem = AmplificationProblem(oracle, is_good_state=["11"])
grover = Grover(sampler=sampler)
result = grover.amplify(problem)
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
features:
- |
A new option, ``"formatter.control.fill_waveform"`` has been added to
the pulse drawer (:func:`.pulse_v2.draw` and :meth:`.Schedule.draw`)
style sheets. This option can be used to remove the face color of pulses
in the output visualization which allows for drawing pulses only with
lines.
For example:
.. code-block:: python
from qiskit.visualization.pulse_v2 import IQXStandard
my_style = IQXStandard(
**{"formatter.control.fill_waveform": False, "formatter.line_width.fill_waveform": 2}
)
my_sched.draw(style=my_style)
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
features:
- |
Added a new transpiler pass, :class:`~.ResetAfterMeasureSimplification`,
which is used to replace a :class:`~.Reset` operation after a
:class:`~.Measure` with a conditional :class:`~.XGate`. This pass can
be used on backends where a :class:`~.Reset` operation is performed by
doing a measurement and then a conditional X gate so that this will
remove the duplicate implicit :class:`~.Measure` from the :class:`~.Reset`
operation. For example:
.. jupyter-execute::
from qiskit import QuantumCircuit
from qiskit.transpiler.passes import ResetAfterMeasureSimplification
qc = QuantumCircuit(1)
qc.measure_all()
qc.reset(0)
qc.draw('mpl')
.. jupyter-execute::
result = ResetAfterMeasureSimplification()(qc)
result.draw('mpl')
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
features:
- |
Added a new supported value, ``"reverse_linear"`` for the ``entanglement`` keyword argument
to the constructor for the :class:`~.NLocal` circuit class. For :class:`~.TwoLocal` circuits
(which are subclassess of :class:`~.NLocal`), if ``entanglement_blocks="cx"`` then
using ``entanglement="reverse_linear"`` provides an equivalent n-qubit circuit as
``entanglement="full"`` but with only :math:`n-1` :class:`~.CXGate` gates, instead of
:math:`\frac{n(n-1)}{2}`.
upgrade:
- |
The default value for the ``entanglement`` keyword argument on the constructor for the
:class:`~.RealAmplitudes` and :class:`~.EfficientSU2` classes has changed from ``"full"`` to
``"reverse_linear"``. This change was made because the output circuit is equivalent but
uses only :math:`n-1` instead of :math:`\frac{n(n-1)}{2}` :class:`~.CXGate` gates. If you
desire the previous default you can explicity set ``entanglement="full"`` when calling either
constructor.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
upgrade:
- |
Added a validation check to :meth:`.BaseSampler.run`.
It raises an error if there is no classical bit.
Loading

0 comments on commit 6187703

Please sign in to comment.