You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to replace all public API occurrences of PauliSumOp with SparsePauliOp.
in cases where the type is a function input, for the transition period we need to replace it with the union of the two and handle it accordingly internally
in cases where the type is an output we also need to make it the union. However, we cannot simply return whatever we want. I suggest that we add a setting to qiskit_nature.settings which can toggle between the two cases. In the next release, we still default it to return PauliSumOp but have it raise a DeprecationWarning that the default will change to SparsePauliOp. This would be similar to how we handled the dict_aux_operators transition.
The text was updated successfully, but these errors were encountered:
This change goes in parallel with a transition from the z2symmetries of opflow for PauliSumOp to the z2symmetries of quantum_info for SparsePauliOp Ideally, we would make the two transitions simultaneously.
Similarly, the qubit_converter heavily relies on the PauliSumOp but will be replaced by new mappers which will be based on SparsePauliOp.
Last thing, I wanted to mention that multiple tests use the == / assertEqual for operators which work for PauliSumOp but not for SparsePauliOp because of the Pauli's ordering:
Thanks, Anthony! @manoelmarques did indeed start looking into this and made the same observations. We put this on hold until the work on #967 is completed 👍
What should we add?
We need to replace all public API occurrences of
PauliSumOp
withSparsePauliOp
.in cases where the type is a function input, for the transition period we need to replace it with the union of the two and handle it accordingly internally
in cases where the type is an output we also need to make it the union. However, we cannot simply return whatever we want. I suggest that we add a setting to
qiskit_nature.settings
which can toggle between the two cases. In the next release, we still default it to returnPauliSumOp
but have it raise aDeprecationWarning
that the default will change toSparsePauliOp
. This would be similar to how we handled thedict_aux_operators
transition.The text was updated successfully, but these errors were encountered: