Add a method to QubitSparsePauliList to get a sublist that anti-commutes with a given QubitSparsePauli
Author: DanPuzzuoliCreated Mar 26, 2026Updated Sep 29, 2026
Labelstype: feature requestmod: quantum info
What should we add?
The proposal is a QubitSparsePauliList method with signature (open to discussion on name):
anticommuting_subset(self, pauli: QubitSparsePauli) -> QubitSparsePauliListThis method should return a sub-list of the QubitSparsePauliList with the elements that commute with pauli filtered out.
It's already possible to construct this list using the QubitSparsePauli.commutes method, but it would be good to have this list construction all in rust, as it is a time consuming computation when QubitSparsePauliList is long.
Source: Qiskit/qiskit