What is $\varepsilon_i$ in second quantization Hamitonian? I'm studying a solid state physics course  I have difficulties with  hamiltonian  defined $$\hat H = \sum_{i}\varepsilon_i   \hat c^\dagger \hat c =  \sum_{i} \varepsilon _i  \hat n_i .$$
I thought that the Hamiltonian is a construction for obtaining energy, but here it turns out that in order to set the Hamiltonian, I need to know the energies $\varepsilon_i$ . Is that so? Where can I get these energies? Are these energies obtained using the Schrödinger equation, such as the energy of an electron in a box $$\varepsilon _n=\frac{ℏ^2}{9mL^2}n^2~?$$
 A: In second quantized notation, single particle operators can be written as:
\begin{equation}
\hat{A}^{(1)} = \sum_{\alpha, \beta}\langle\alpha|\hat{A}| \beta\rangle c_{\alpha}^{\dagger} c_{\beta}
\end{equation}
where,
\begin{equation}
\langle\alpha|\hat{A}| \beta\rangle=\int \phi_{\alpha}^{*} \hat{A} \phi_{\beta}
\end{equation}
and $\phi_{\alpha}$, $\phi_{\beta}$ are single-particle wave functions. For a Hamiltonian with only single particle operators (a free particle for example), $\langle\alpha|\hat{H}| \beta\rangle = \epsilon_{\alpha\beta}$. Hence you get the second quantised version of the Hamiltonian as:
\begin{equation}
\hat{H}^{(1)} = \sum_{\alpha, \beta} \epsilon_{\alpha\beta}c_{\alpha}^{\dagger} c_{\beta}
\end{equation}
The particular form of $\epsilon_{\alpha\beta}$ depends on your system.
A: The form described above correspond in the second quantization of a one body hamiltonian. The variable $\varepsilon_i$ denotes the energy of the $i^{th}$ eigenstates while the operators $c_i$ and$c_i^\dagger$ are respectively the annihilation and creation operator of a particle in this state.
The point is that this form of a hamiltonian make it easy to compute the ground state of a system or the thermodynamic quantity associated.
It can in fact be understood more generally for a quadratic hamiltonian as a "diagoalisation" of the original hamiltonian.
For example if you consider a general hamiltonian in real space whose elements are $h_{ij}$, such as h is hermitian,
$$\hat{H}=\sum_{i,j}h_{ij}c_i^\dagger c_j$$
then, diagonalizing the matrix $h_{ij}$, you can recover the nicest form $$\hat{H}=\sum_{i}\varepsilon_id_i^\dagger d_i$$ where $\varepsilon_i$ are the eigenvalues of h and $d_i$ its eigenvectors.
For a more concrete example you can for example look into tight binding hamiltonian lessons such as http://www.physics.rutgers.edu/~eandrei/chengdu/reading/tight-binding.pdf .
