@staticmethod
def quat_to_tuple(r):
    """Convert an element in the quaternion algebra to a quadruple"""
    if type(r) == type(1):
        return r, 0, 0, 0
    else:
        return r[0], r[1], r[2], r[3]
