is_identity

pyquil.paulis.is_identity(term)[source]

Tests to see if a PauliTerm or PauliSum is a scalar multiple of identity

Parameters:term (Union[PauliTerm, PauliSum]) – Either a PauliTerm or PauliSum
Returns:True if the PauliTerm or PauliSum is a scalar multiple of identity, False otherwise
Return type:bool