In real space we write basis vector for spinless fermions in binary notation for example if there are M=4 sites in system and N=2 fermions then basis vectors will be: $0011, 0101, 0110, 1001, 1010, 1100$. 
Hamiltonian in numerical form ($H=-t\sum_{<j,j+1>}(c_j^\dagger c_{j+1}+h.c.)+U\sum_{<j,j+1>}n_jn_{j+1}$) can be written simply using bitwise operations of C/C++, Fortran or MATLAB. One can see hopping part of H is off-diagonal and interaction part is diagonal in real space.  
 
When we work in Fourier space Hamiltonain become 
$$\tilde{H}=\sum_k\epsilon_k\tilde{c_k^\dagger}\tilde{c_k} + \sum_k\tilde{U_k}\tilde{n_k}\tilde{n_{-k}}$$ with $\epsilon_k=-2t\cos{k}$ and $\tilde{U}_k=\frac{1}{L}\sum_j U(j) e^{-ik.j}$ as explained in this [pdf][1].    
  
----
What I can't understand is that how do we define our basis vector in fourier space?
 ----

**My understanding about it:**
  
What I have understood from this so for is that let we have a 1D line from $-\pi$ to $+\pi$ (first brillion zone) on which $k$ points are discreetly define. If we have M=4 and N=2 then set of $k$-points is $-\pi$, $-\frac{\pi}{2}$,$+\frac{\pi}{2}$, $+\pi$  
Now considering these 4 points as sites on which fermions can reside our basis vectors can be again given as they were given in real space i.e. $0011, 0101, 0110, 1001, 1010, 1100$.  
For simplicity I take limit $U=0$ and calculate Hamiltonian for both real and fourier space case.  
REAL SPACE:  
$$H_{R}=-t\begin{bmatrix}
0 & 1 & 0 & 0 & -1 & 0 \\
1 & 0& 1& 1& 0& -1\\
0 & 1& 0& 0& 1& 0\\
0 & 1& 0& 0& 1& 0\\
-1 & 0& 1& 1& 0& 1\\
0 & -1& 0& 0& 1& 0\\
\end{bmatrix}$$
Let t=1 then Eigenvalues=[-2, -2, -4.4e-16, 0, 2, 2] (using MATLAB function _eig()_)

FOURIER SPACE:  

$\tilde{c_k^{\dagger}}\tilde{c_k}=\tilde{n_k}=$ number operator in k-space. So our hamiltonian for U=0 should be diagonal  
$$H_{F}=-2t\begin{bmatrix}
\cos{(\pi/3)}+\cos{\pi} & 0 & 0 & 0 & 0 & 0 \\
0 & \cos{(-\pi/3)}+cos{\pi} & 0 & 0 & 0 & 0 \\
0 & 0 & \cos{(-\pi/3)}+\cos{(\pi/3)} & 0 & 0 & 0 \\
0 & 0 & 0 & \cos{(-\pi)}+\cos{\pi} & 0 & 0 \\
0 & 0 & 0 & 0 & \cos{(-\pi)}+\cos{(\pi/3)} & 0 \\
0 & 0 & 0 & 0 & 0 & \cos{-(\pi)}+\cos{(-\pi/3)} \\
\end{bmatrix}$$


$$=-t\begin{bmatrix}
1 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & -2 & 0 & 0 & 0 \\
0 & 0 & 0 & 4 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & 1 \\
\end{bmatrix}$$

for t=1 eigenvalues=[-2, 1, 1, 1, 1, 4].  
  
---
results are not matching, I consider there is any fault in my method of defining basis vectors in k-space. So, please guide be how to properly build basis vectors in k-space.

  [1]: http://www.lassp.cornell.edu/clh/Book-sample/1.1.pdf