paulie.application.average_pauli_weight.average_pauli_weight#

paulie.application.average_pauli_weight.average_pauli_weight(o)#

Calculates the average Pauli weight (influence) for an operator \(O\).

\[\begin{split}O &= \sum_{P \in \text{all Pauli strings}} c_P P \\ I(O) &= \sum_{P} |P| * c_{P}^{2}\end{split}\]

where \(|P|\) is the weight of the Pauli operator \(P\).

Parameters:

o (numpy.ndarray) – The operator \(O\) in matrix form.

Returns:

The average Pauli weight (influence) of the operator.

Return type:

float