def get_ordered_indices(N, k):
    """Return a list of tuples of indices i,j,k, and l, such that
    2*N > i > j > k > l.
    """
    idx_list = []
    # 2N because this sums over possible majoranas
    # num_fermions = N, num_majoranas = 2*N
    if k == 4:
        for i in range(2 * N):
            for j in range(i+1, 2*N):
                for k in range(j+1, 2*N):
                    for l in range(k+1, 2*N):
                        idx_list.append([i, j, k, l])
    if k == 2:
        for i in range(2 * N):
            for j in range(i+1, 2*N):
                idx_list.append([i, j])
    return idx_list