def METHOD_NAME(n, n_wires):
    r"""Convert an integer into a binary integer list
    Args:
        n (int): Basis state as integer
        n_wires (int): Numer of wires to transform the basis state
    Raises:
        ValueError: "cannot encode n with n wires "
    Returns:
        (array[int]): integer binary array
    """
    if n >= 2**n_wires:
        raise ValueError(f"cannot encode {n} with {n_wires} wires ")
    b_str = f"{n:b}".zfill(n_wires)
    bin_list = [int(i) for i in b_str]
    return bin_list