Encouraged by Dr. Wechsler I would add: a "Hamltonian" of a 1-dimensional harmonic oscillator is first of all: H = 1/2(p2+q2) in obvious notation. From here there is a passage to QM and a further passage to QFT: . 1st canonical commutator conditions: [p,q] = -i. 2nd introduce new variables: a = 2-1/2(q + ip), a+ = 2-1/2(q - ip). 3rd invert 2nd and substitute into H above --> H = 2-1/2(a+a + aa+), finally with 1st: [a,a+] = 1: H = (a+a + 1/2). 4th introduce Fock variables: a+ = x, a = d/dx; these act on the space of analytic functions in x, and one introduces a canonical orthonormal basis of monomials: |n) = n!-1/2xn.. 5th finally: H|n) = (n+1/2)|n).
An answer to a question should not be a mere reference but first of all an explanation.
The Hamiltonian of a system A described by the quantum harmonic oscillator (QHO) refers to a fixed type of particles, each one of the same energy, ħω. We don't have transitions from one type of particle to another, as in a reaction.
Thus, two eigenstates of the system A differ only by the number of particles, n, or in a more typical quantum language, by the number of "oscillators". The smallest number of particles is n = 0, vacuum, whose energy is considered ħω/2. Therefore, an eigenvalue of the Hamiltonian of A is equal to the energy of the number of particles in the corresponding eigenstate, nħω, plus the vacuum energy, ħω/2.
So, the Hamiltonian of the QHO is
Ĥ = (â†â +1/2)ħω ,
where â†â is the number operator, â†â |n> = n |n> .