def separate_pauli(sigma):
    """Function
    Extract coefficient and pauli word from a single QubitOperator 'sigma'

    Args:
        sigma (QubitOperator):
    Returns:
        coef (complex): coefficient
        pauli (str): pauli word
    """
    tmp = str(sigma).replace("]", "").split("[")
    return complex(tmp[0]), tmp[1]