|
1 | 1 | ---
|
2 | 2 | fixes:
|
3 | 3 | - |
|
4 |
| - Commutation relations of :class:`~.circuit.Instruction`\ s with float-only ``params`` |
5 |
| - were eagerly cached by the :class:`.CommutationChecker`, using the ``params`` as key to |
6 |
| - query the relation. This could lead to faulty results, if the instruction's definition |
7 |
| - depended on additional information that just the :attr:`~.circuit.Instruction.params` |
8 |
| - attribute, such as e.g. the case for :class:`.PauliEvolutionGate`. |
9 |
| - This behavior is now fixed, and the commutation checker only conservatively caches |
10 |
| - commutations for Qiskit-native standard gates. This can incur a performance cost if you were |
11 |
| - relying on your custom gates being cached, however, we cannot guarantee safe caching for |
12 |
| - custom gates, as they might rely on information beyond :attr:`~.circuit.Instruction.params`. |
| 4 | + Previously, the :class:`.CommutationChecker` eagerly cached the commutation relations of |
| 5 | + :class:`~.circuit.Instruction`\ s with float-only ``params`` as key to query the relation. |
| 6 | + This could lead to incorrect results if the instruction's definition |
| 7 | + depended on additional information beyond just the :attr:`~.circuit.Instruction.params` |
| 8 | + attribute, as, for example, in the case of :class:`.PauliEvolutionGate`. |
| 9 | + This behavior is now fixed, and the commutation checker eagerly caches |
| 10 | + commutations only for Qiskit-native standard gates. |
| 11 | + For custom gates, this change might incur a performance cost; however, guarantees correct |
| 12 | + results by avoiding unsafe caching. |
13 | 13 | - |
|
14 |
| - Fixed a bug in the :class:`.CommmutationChecker`, where checking commutation of instruction |
15 |
| - with non-numeric values in the :attr:`~.circuit.Instruction.params` attribute (such as the |
16 |
| - :class:`.PauliGate`) could raise an error. |
| 14 | + Fixed a bug in the :class:`.CommutationChecker`, where checking commutation relations of |
| 15 | + an instruction |
| 16 | + with non-numeric values in the :attr:`~.circuit.Instruction.params` attribute (as in the |
| 17 | + case of :class:`.PauliGate`) could raise an error. |
17 | 18 | Fixed `#13570 <https://github.com/Qiskit/qiskit/issues/13570>`__.
|
18 | 19 |
|
0 commit comments