paulie.application.average_pauli_weight.get_pauli_weights#
- paulie.application.average_pauli_weight.get_pauli_weights(num_qubits, identity_pos=0)#
Generates the weight \(|P|\) for each of the \(4^{\text{number qubits}}\) Pauli operators.
The weight is the number of non-identity terms in the Pauli string. The ordering corresponds to the output of
matrix_decomposition(), default is ‘I’ at position 0.- Parameters:
- Returns:
The weights for each of the \(4^{\text{number qubits}}\) Pauli operators.
- Return type: