The following discussion of the quantum harmonic oscillator relies on the article Mathematical formulation of quantum mechanics.

In the one-dimensional harmonic oscillator problem, a particle of mass *m* is subject to a potential *V*(*x*) = (1/2)*m*ω^{2}* x*^{2}. The Hamiltonian of the particle is:

- .

- .

The probability densities of the energy eigenstates are shown below, beginning with the ground state (*n = 0*) at the bottom of the picture and increasing in energy toward the top of the picture. The horizontal axis corresponds to the position *x*, and brighter colors represent higher probability densities.

Note that the ground state probability density is concentrated at the origin. This means the particle spends most of its time at the bottom of the potential well, as we would expect for a state with little energy. As the energy increases, the probability density becomes concentrated at the "classical turning points", where the state's energy coincides with the potential energy. This is consistent with the classical harmonic oscillator, in which the particle spends most of its time (and is therefore most likely to be found) at the turning points, where it is the slowest. The correspondence principle is thus satisfied.

The power series solution, though straightforward, is rather tedious. The "ladder operator" method, due to Paul Dirac, allows us to extract the energy eigenvalues without directly solving the differential equation. Furthermore, it is readily generalizable to more complicated problems, notably in quantum field theory. Following this approach, we define the operator

The x and p operators obey the following identity, known as the canonical commutation relation:

- .

- .

- .

- .

- ,

Using the above identities, we can now show that the commutation relations of a and a^{†} with H are:

- .

- .

- .

Given any energy eigenstate, we can act on it with the lowering operator, a, to produce another eigenstate with ℏω less energy. By repeated application of the lowering operator, it seems that we can produce energy eigenstates down to *E* = -∞. However, this would contradict our earlier requirement that E ≥ (ℏω / 2). Therefore, there must be a ground-state energy eigenstate, which we label |0⟩ (not to be confused with the zero ket), such that

- .

- .

The one-dimensional harmonic oscillator is readily generalizable to *N* dimensions, where *N*=1,2,3,... . In one dimension, the position of the particle was specified by a single coordinate, *x*. In *N* dimensions, this is replaced by *N* position coordinates, which we label *x*_{1},...*x*_{N}. Corresponding to each position coordinate is a momentum; we label these *p*_{1},...*p*_{N}. The canonical commutation relations between these operators are

- .

- .

This observation makes the solution straightforward. In the ladder operator method, we define *N* sets of ladder operators,

- .

- .

As mentioned in the introduction, a system residing "near" the minimum of some potential may be treated as a harmonic oscillator. In this approximation, we Taylor expand the potential energy around the minimum and discard terms of third or higher order, resulting in an approximate quadratic potential. Once we have studied the system in this approximation, we may wish to investigate the corrections due to the discarded higher-order terms, particularly the third-order term.

The anharmonic oscillator Hamiltonian is the harmonic oscillator Hamiltonian with an additional *x*^{3} potential:

- .

- .

As in the previous section, we denote the positions of the masses by *x*_{1},*x*_{2},..., as measured from their equilibrium positions (i.e. *x*_{k} = 0 if particle *k* is at its equilibrium position.) In two or more dimensions, the *x*'s are are vector quantities. The Hamiltonian of the total system is

Remarkably, there exists a coordinate transformation to turn this problem into a set of independent harmonic oscillators, each of which corresponds to a particular collective distortion of the lattice. These distortions display some particle-like properties, and are called phonons. Phonons occur in the ionic lattices of many solids, and are extremely important for understanding many of the phenomena studied in solid state physics.