qml.pauli.are_pauli_words_qwc¶
- are_pauli_words_qwc(lst_pauli_words)[source]¶
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.
- Parameters
lst_pauli_words (list[Observable]) – List of observables (assumed to be valid Pauli words).
- Returns
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
(bool)
code/api/pennylane.pauli.are_pauli_words_qwc
Download Python script
Download Notebook
View on GitHub