-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Foward port release note updates for 0.22.0 release (#8901)
As part of the 0.22.0 release process we updated the release notes on the stable branch alone with bumping the version string for the package. This commit forward ports those changes from the stable branch to main. This will make it easier for us to backport any subsequent changes to the release notes as part of a potential 0.22.1 release. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
af459aa
commit 3292a03
Showing
88 changed files
with
529 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
releasenotes/notes/0.22/add-backend-sampler-dcee9d4db17d5956.yaml
This file was deleted.
Oops, something went wrong.
25 changes: 13 additions & 12 deletions
25
releasenotes/notes/0.22/add-barrier-label-8e677979cb37461e.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
--- | ||
features: | ||
- | | ||
Added a ``label`` parameter to the :class:`.Barrier` which now allows | ||
a user to enter a label for the ``barrier`` directive and the label | ||
will be printed at the top of the ``barrier`` in the `mpl`, `latex`, | ||
and `text` circuit drawers. Printing of existing ``snapshot`` labels | ||
to the 3 circuit drawers was also added. | ||
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``. | ||
.. code-block:: python | ||
.. jupyter-execute:: | ||
from qiskit import QuantumCircuit | ||
from qiskit import QuantumCircuit | ||
circuit = QuantumCircuit(2) | ||
circuit.h(0) | ||
circuit.h(1) | ||
circuit.barrier(label="After H") | ||
circuit.draw('mpl') | ||
circuit = QuantumCircuit(2) | ||
circuit.h(0) | ||
circuit.h(1) | ||
circuit.barrier(label="After H") | ||
circuit.draw('mpl') |
5 changes: 3 additions & 2 deletions
5
releasenotes/notes/0.22/add-ccz-cs-and-csdg-gates-4ad05e323f1dec4d.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
features: | ||
- | | ||
Add new gates :class:`.CZZGate`, :class:`.CSGate`, and :class:`.CSdgGate`. | ||
Added their equivalences into the standard :class:`EquivalenceLibrary`. | ||
Add new gates :class:`.CCZGate`, :class:`.CSGate`, and :class:`.CSdgGate` | ||
to the standard gates in the Circuit Library | ||
(:mod:`qiskit.circuit.library`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 26 additions & 8 deletions
34
releasenotes/notes/0.22/add-gradients-with-primitives-561cf9cf75a7ccb8.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
--- | ||
features: | ||
- | | ||
New gradient Algorithms using the primitives have been added. They internally | ||
use the primitives to calculate the gradients. There are 4 types of | ||
gradient classes (Finite Difference, Parameter Shift, | ||
Linear Combination of Unitary, and SPSA) for a sampler and estimator. | ||
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 | ||
estimator = Estimator(...) | ||
gradient = ParamShiftEstimatorGradient(estimator) | ||
job = gradient.run(circuits, observables, parameters) | ||
gradients = job.result().gradients |
33 changes: 15 additions & 18 deletions
33
releasenotes/notes/0.22/add-grover-primitives-10f81efdba93703d.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
--- | ||
features: | ||
- | | ||
:class:`~.Grover` supports the primitives and can use :class:`~.BaseSampler` to | ||
calculate the results. Accordingly, ``quantum instance`` in :class:`~.Grover` | ||
is pending deprecation and will be deprecated in a future release. | ||
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 | ||
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) | ||
deprecations: | ||
- | | ||
Using a :class:`~.QuantumInstance` in :class:`~.Grover` is | ||
pending deprecation and will be deprecated in a future release. Instead, use | ||
a :class:`.BaseSampler` to calculate the results, see also the features of this release. | ||
sampler = Sampler() | ||
oracle = QuantumCircuit(2) | ||
oracle.cz(0, 1) | ||
problem = AmplificationProblem(oracle, is_good_state=["11"]) | ||
grover = Grover(sampler=sampler) | ||
result = grover.amplify(problem) |
20 changes: 11 additions & 9 deletions
20
releasenotes/notes/0.22/add-pulse-drawer-option-936b6d943de9a270.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
--- | ||
features: | ||
- | | ||
New pulse drawer option "formatter.control.fill_waveform" has been added to | ||
the style sheets. This option removes the face color of pulses in the drawer. | ||
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} | ||
) | ||
from qiskit.visualization.pulse_v2 import IQXStandard | ||
my_sched.draw(style=my_style) | ||
my_style = IQXStandard( | ||
**{"formatter.control.fill_waveform": False, "formatter.line_width.fill_waveform": 2} | ||
) | ||
This code allows a user to draw pulses only with lines. | ||
my_sched.draw(style=my_style) |
19 changes: 17 additions & 2 deletions
19
releasenotes/notes/0.22/add-reset-simplification-pass-82377d80dd0081fd.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
--- | ||
features: | ||
- | | ||
Added a new transpiler pass, :class:`~ResetAfterMeasureSimplification`, | ||
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. | ||
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') |
20 changes: 14 additions & 6 deletions
20
releasenotes/notes/0.22/add-reverse-linear-entanglement-nlocal-38581e4ffb7a7c68.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
--- | ||
features: | ||
- | | ||
Add a new entanglement method `entanglement="reverse_linear"` to :class:`~.NLocal` circuits. | ||
In the case of :class:`~.TwoLocal` circuits, if `entanglement_blocks="cx"` then | ||
`entanglement="reverse_linear"` actually provides the same n-qubit circuit as | ||
`entanglement="full"` but with only n-1 CX gates, instead of n(n-1)/2. | ||
For :class:`~.RealAmplitudes` and :class:`~.EfficientSU2` circuits, the default value | ||
has therefore been changed from `entanglement="full"` to `entanglement="reverse_linear"`. | ||
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. |
3 changes: 1 addition & 2 deletions
3
releasenotes/notes/0.22/add-sampler-error-check-38426fb186db44d4.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
--- | ||
upgrade: | ||
- | | ||
Added a validation check to :meth:`~qiskit.primitives.BaseSampler.run`. | ||
Added a validation check to :meth:`.BaseSampler.run`. | ||
It raises an error if there is no classical bit. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
releasenotes/notes/0.22/add-sparsepauliop-methods-00a7e6cc7055e1d0.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
features: | ||
- | | ||
Added a new method :meth:`.SparsePauliOp.argsort`, which | ||
returns the composition of permutations in the order of sorting | ||
by coefficient and sorting by Pauli. By using the ``weight`` | ||
keyword argument for the method the output can additionally be sorted | ||
by the number of non-identity terms in the Pauli, where the set of | ||
all Paulis of a given weight are still ordered lexicographically. | ||
- | | ||
Added a new method :meth:`.SparsePauliOp.sort`, which will first | ||
sort the coefficients using numpy's ``argsort()`` and then sort | ||
by Pauli, where the Pauli sort takes precedence. If the Pauli sort | ||
is the same, it will then be sorted by coefficient. By using the | ||
``weight`` keyword argument the output can additionally be sorted | ||
by the number of non-identity terms in the Pauli, where the set of | ||
all Paulis of a given weight are still ordered lexicographically. |
Oops, something went wrong.