Given a list of observables assumed to be valid Pauli observables, determine if they are pairwise qubit-wise commuting.

This implementation has time complexity ~ O(m * n) for m Pauli words and n wires, where n is the number of distinct wire labels used to represent the Pauli words.


lst_pauli_words (list[Observable]) – List of observables (assumed to be valid Pauli words).


True if they are all qubit-wise commuting, false otherwise. If any of the provided observables are not valid Pauli words, false is returned.

Return type