I think that $H_1$ is the so called second quantized Hamiltonian, which lives in a multi-particle Hilbert space. While the other Hamiltonian, $H_2$, is a single-particle Hamiltonian, living in a single-particle Hilbert space.
If, as the question v4 says, the symbol $|m\rangle$ indicates a state of a particle localized to site $m$, then $H_2$ is indeed supposed to be viewed as a single particle Hamiltonian.
In that case, the Hamiltonians are not necessarily the same.
However, note that $H_1$ conserves the number of particles, so if you start with one particle, then practically speaking $H_1$ and $H_2$ are the same.
To what extent can one switch between the two Hamiltonians in the middle of a calculation? I believe that this often done every now and then, perhaps quite sloppily. What really happens as we switch between these formulations?
Often, that switch happens as follows:
- Start with a multi-particle hamiltonian in second quantized language.
- Identify non-interacting modes in the system.
- Treat each non-interacting mode separately as its own single-particle system where the energy level of this fake single particle actually corresponds to the number of quanta (Fock state) in that mode.
That's the only case I can think of where we regularly switch from second quantization to single-particle quantum mechanics.
In chat, OP asked what is "given up" by going from second quantization to single-particle.
in the case described by the bullet points, nothing is sacrificed.
We treat each mode separately because they're non-interacting.
However, suppose we just have a box which may or may not contain electrons.
In full generality, we should use second quantization and allow for an arbitrary number of particles.
However, if we know that there's only one (or more) electrons and we know that we're working with low enough energy that spontaneous electron creation will not happen, then we can use single particle (or two-particle or three-particle... based on how many electrons there are) quantum mechanics to describe the system.
We do this all the time when describing e.g. the electrons in a helium atom.
We know there are two electrons and we know there isn't going to be any particle creation/annihilation (unless we're at high enough energy).
Note that the energy to create a massive particle is $E = m c^2$ were $c$ is the speed of light.
It's because this energy cost is large that we know the number of electrons in a helium atom won't change under normal conditions.
On the other hand, if we're working with photons, which have zero mass, or we're working in a thermodynamic situation where we have a reservoir of particles, then the particle number isn't fixed and we can't restrict to a specific particle number.
If we interpret $|m\rangle$ to indicate a Fock state with one occupation on site $m$, and if we're working with Fermions, then the Hamiltonians are the same, but written in two different notations.
The rest of this post elaborates on the previous sentence.
Representing linear transformations (operators) as sums of bras and kets
Given a vector space and a basis $e \equiv \{|e_1\rangle, |e_2\rangle,\ldots\}$, we can write any linear transformation $T$ on that vector space as a sum
$$T = \sum_{ij} T_{ji} |e_j \rangle \langle e_i | $$
where $T_{ji}$ are literally the elements of the matrix representation of $T$ in the $e$ basis.
We can show that trivially:
$$ \langle e_j | T | e_i \rangle = \sum_{kl} T_{lk} \underbrace{\langle e_j | e_l \rangle}_{\delta_{jl}} \langle \underbrace{e_i | e_ k \rangle}_{\delta_{ik}} = T_{ji} \, .$$
In other words, in the $e$ basis, the $j^\text{th}$ component of $T|e_i\rangle$ is $T_{ji}$.
An easy way to remember this is to use the fact that $\sum_j |e_j\rangle \langle e_j| = \text{identity}$, so
$$T = \underbrace{\left( \sum_j |e_j \rangle \langle e_j| \right)}_\text{identity}
T
\underbrace{\left( \sum_i |e_i \rangle \langle e_i| \right)}_\text{identity}
= \sum_{ij} \langle e_j | T | e_i \rangle |e_j\rangle\langle e_i| = \sum_{ij} T_{ji} |e_j \rangle \langle e_i| \, .$$
Fermion creation/annihilation
In second quantization language, we represent quantum states etc. with creation annihilation operators $c_m$ and $c_m^\dagger$, as noted in the original post.
Those operators are of course just linear transformations and can be represented in the bra/ket way, just the same as the arbitrary transformation $T$ in the discussion above.
Physically, the operator $c_m$ removes one unit of excitation from the $m^\text{th}$ mode of the system, which in this case is a spatially localized mode, i.e. occupation of a lattice site.
The operator $c_m^\dagger c_m$ removes one excitation from the $m^\text{th}$ mode and then puts it back.
Suppose we work in a basis consisting of two elements for each lattice site: $\{|0\rangle, |1\rangle\}$ corresponding to zero or one occupation on the site (these are Fermions so we can't have more than one).
We can then write $c^\dagger c$ for a particular lattice site as
\begin{align}
c^\dagger c
&= \langle 0 | c^\dagger c | 0 \rangle |0 \rangle \langle 0 |
+ \langle 0 | c^\dagger c | 1 \rangle |0 \rangle \langle 1 |
+ \langle 1 | c^\dagger c | 0 \rangle |1 \rangle \langle 0 |
+ \langle 1 | c^\dagger c | 1 \rangle |1 \rangle \langle 1 | \\
&= \langle 1 | c^\dagger c | 1 \rangle |1 \rangle \langle 1 |
\end{align}
where in the second line we dropped terms that were zero.
If a term in the Hamiltonian is $t (c^\dagger c)$, then we can write it as
$t |1 \rangle \langle 1 |$.
All of that discussion was for a single mode.
If we now go to all modes (sites on the lattice) and rename each $|1\rangle$ ket for that mode as $|m\rangle$, we can see that $H_1$ and $H_2$ are exactly the same thing.