-
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.
- Loading branch information
Showing
2 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
test/benchmarks/releasenotes/notes/conservative-commutation-checking-e1ca8501416119a1.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,17 @@ | ||
--- | ||
fixes: | ||
- | | ||
Commutation relations of :class:`~.circuit.Instruction`\ s with float-only ``params`` | ||
were eagerly cached by the :class:`.CommutationChecker`, using the ``params`` as key to | ||
query the relation. This could lead to faulty results, if the instruction's definition | ||
depended on additional information that just the :attr:`~.circuit.Instruction.params` | ||
attribute, such as e.g. the case for :class:`.PauliEvolutionGate`. | ||
This behavior is now fixed, and the commutation checker only conservatively caches | ||
commutations for Qiskit-native standard gates. This can incur a performance cost if you were | ||
relying on your custom gates being cached, however, we cannot guarantee safe caching for | ||
custom gates, as they might rely on information beyond :attr:`~.circuit.Instruction.params`. | ||
- | | ||
Fixed a bug in the :class:`.CommmutationChecker`, where checking commutation of instruction | ||
with non-numeric values in the :attr:`~.circuit.Instruction.params` attribute (such as the | ||
:class:`.PauliGate`) could raise an error. | ||
Fixed `#13570 <https://github.com/Qiskit/qiskit/issues/13570>`__. |
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