def METHOD_NAME(j, n):
    """
    Computes the flip set of the j-th orbital in n modes.
    Args:
        j (int) : the orbital index
        n (int) : the total number of modes
    Returns:
        numpy.ndarray: Array of mode indices
    """
    indices = np.array([])
    if n % 2 != 0:
        return indices
    if j < n / 2:
        indices = np.append(indices, METHOD_NAME(j, n / 2))
    elif n / 2 <= j < n - 1:
        indices = np.append(indices, METHOD_NAME(j - n / 2, n / 2) + n / 2)
    else:
        indices = np.append(
            np.append(indices, METHOD_NAME(j - n / 2, n / 2) + n / 2), n / 2 - 1
        )
    return indices