Returns the maximum index of Pauli matrices in the Term.

def max_n(self):
        """Returns the maximum index of Pauli matrices in the Term."""
        return max(term.max_n() for term in self.terms if term.ops)