Quantizing the EM field gives you the standard sum of all quantum harmonic oscillators as given by this hamiltonian:

$$ \hat{H} = \sum_k \hbar\omega_k( \hat{a}^\dagger_k \hat{a}_k + 1/2) $$

Conceptually it makes most sense when discussing a cavity, as each harmonic oscillator corresponds to a mode with a different number of excitations in it. However, I'm having trouble understanding this formulation when applying it to a free field. A free field is just a cavity with infinitely large boundaries, right? That would seem to imply that for each frequency, there is only one harmonic oscillator.

I have also heard from many sources, including colleagues, that you can see the field as composed of a collection of harmonic oscillators separated in space. However, I find that difficult to reconcile with the above equation. What is the best way to visually interpret this?

  • 13
    $\begingroup$ Best way to visualize quantum fields: Don't. $\endgroup$ – ACuriousMind Mar 4 '15 at 14:47
  • $\begingroup$ @mactud The harmonic oscillators in your formula don't need to be separated in space, but separated in other features, e.g. frequency of oscillation (see my answer). $\endgroup$ – Sofia Mar 6 '15 at 21:46
  • 3
    $\begingroup$ @ACuriousMind oh come on, man. You can think of it almost exactly like a vibrating string. $\endgroup$ – DanielSank Jun 26 '15 at 7:19
  • 2
    $\begingroup$ @ACuriousMind, if you can't visualise it, you don't understand it. Many are reluctant to visualise precisely because it brings into sharp relief absurdities or conceptual ambiguities and deficits. $\endgroup$ – Steve Feb 7 '18 at 9:00

Warning: long answer ahead. To see pictures, scroll down.

A free field is just a cavity with infinitely large boundaries, right?

Right. This is how it's constructed: take a finite cavity with periodic boundary conditions, and then let its size tend to infinity.

I have also heard from many sources, including colleagues, that you can see the field as composed of a collection of harmonic oscillators separated in space.

No, the oscillators here represent eigenmodes of the field, which live in the reciprocal space—the space of wave vectors.

That would seem to imply that for each frequency, there is only one harmonic oscillator.

Not quite: for each frequency there's an infinite number of wavevectors. And for each wave vector there is one harmonic oscillator.

What is the best way to visually interpret this?

It's easier to start from simpler fields, rather than electromagnetic: in particular, in a discrete and finite medium. A good example of such a medium is a lattice of point masses connected by springs. This medium can transmit waves, and the Schrödinger's equation for such a medium is exactly solvable.

A finite chain of point masses as a model of a scalar field


Consider several point particles of mass $m$ connected by Hookean springs. Let one end of this chain be attached by a spring to a wall (the second end remaining free), so that all the eigenmodes of this system were standing waves, rather than running waves (this will simplify visualization a bit).

The potential energy of this system will look like

$$V(x_1,x_2,\dots,x_N)=\frac{m\omega^2}2\left(x_1^2+\sum_{n=2}^N (x_n-x_{n-1})^2 + x_N^2\right),\tag1$$

where $N$ is number of particles, and $x_n$ is displacement of $n$th particle from its equilibrium position.

Let's denote the vector of all displacements as $\mathbf{x}$:

$$\mathbf{x}=\begin{pmatrix} x_1\\ x_2\\ \cdots\\ x_N \end{pmatrix}.\tag2$$

The classical equation of motion will then be



$$M=\begin{pmatrix} -2 & 1 & 0 & 0 & \cdots &\cdots& 0 \\ 1 & -2 & 1 & 0 & & & \vdots\\ 0 & 1 & -2 & 1 & & & \vdots\\ 0 & 0 & 1 & -2 & & & \vdots\\ \vdots & & & & \ddots & & \vdots\\ \vdots & & & & & -2 & 1 \\ 0 &\dots&\dots&\dots& \dots & 1 & -1 \\ \end{pmatrix}\tag4$$

Notice how this matrix resembles the 1D Laplacian matrix from finite differences method. In fact, in the limit of continuous medium we'll indeed get a wave equation from $(3)$—which is isomorphic to the Klein-Gordon equation for a massless field! Due to our chosen configuration with one end being attached to a wall, and another being free, the continuous equation would have homogeneous Dirichlet boundary on one side and Neumann boundary on the other.


$$\mathbf{x}=\mathbf A e^{i\Omega_k t},\; k\in\{1,2,\dots,N\},\tag5$$

we get the equations for eigenmodes of oscillation:


The eigenvectors $\mathbf{\xi} _ n$ of the matrix $M$ define the axes of the hyper-ellipsoids described by $V=\mathrm{const}$. Expressed in coordinates along these axes, $V$ becomes a sum of independent oscillators—eigenmodes of the collective motion of all the particles. Namely, in this basis we'll have displacements $\mu_k$ of the modes, via

$$\mu_k=\mathbf x\tran\mathbf{\xi}_k,\tag7$$

and $V$ will get the following form:

$$V=\frac m2 \sum_{k=1}^N \Omega_k^2\mu_k^2.\tag8$$

Kinetic energy is invariant with respect to rotations in configuration space, so we don't worry about it: it'll be separable in any of these coordinates.

Here're the first 3 normal modes for the case $N=50$:

Quantum version of the scalar field model

Equation $(8)$ makes it very easy to solve the quantum counterpart of the problem. Namely, the Schrödinger's equation for the whole system of connected particles becomes simply a system of $N$ independent equations, one for each eigenmode.

The solution of the Schrödinger's equation,

$$-\frac{\hbar^2}{2m}\sum_{k=1}^N\partial_{x_k}^2\psi+V\psi=E\psi, \tag9$$

is the product of the well-known Hermite polynomials times Gaussians: for each mode $k$ we have

$$\psi_k(\mu_k)=\frac1{\sqrt{2^n n!}}\left(\frac{m\Omega_k}{\pi\hbar}\right)^{1/4}\exp\left(-\frac{m\Omega_k \mu_k^2}{2\hbar}\right)H_n\left(\mu_k\sqrt{\frac{m\Omega_k}{\hbar}}\right), \tag{10}$$

and the total wavefunction of the system is

$$\Psi(\mathbf{x})=\prod_{k=1}^N \psi_k(\mu_k). \tag{11}$$


One of the ways a quantum state can be visualized is by showing probability densities. Each mode, being a simple harmonic oscillator, will have the well-known probability distributions of the "displacement" of the mode. Visualization is trivial in these coordinates. But eigenmodes aren't something easy to intuit, so visualization in terms of them has little value.

What we'd rather have is probability densities of displacement of the particles in the chain. This is something for which we have classical intuition and also for which we have (assuming some experience in QM) intuition for the $N=1$ case, i.e. single particle.

Now, to get a probability density of displacement of a single particle in the chain we have to integrate out all particle coordinates except for ones of the particle $n$ we're interested in:

$$\rho(x_n)=\int\limits_{\mathbb{R}^{N-1}} |\Psi(\mathbf{x})|\,\mathrm{d}x_{n_1}\mathrm{d}x_{n_2}\cdots\mathrm{d}x_{n_{N-1}},\tag{12}$$

where $n_i\ne n$.

In $N\le3$ case this integration is reasonably easily doable numerically. Even in $N=4$ it's not too long to compute this integral for many points in $x_n$ for each of the particles. But the larger the number of particles, the harder this work becomes. In ref. 1 the authors claim to have used Monte-Carlo integration to obtain their probability densities. As I've tried this on my PC (using Wolfram Mathematica's NIntegrate on Intel Core i7⁠-⁠4765T), this direct integration approach appeared to be uselessly slow for $N=11$ even for a single value of $x_1$.

So, we need a better way to compute $(12)$. Fortunately, the wavefunction is separable in the mode coordinates $\mu_k$, so we can, instead of sampling lots of tiny probability densities $|\Psi|$ to get $\rho$, use inverse transform sampling to generate correctly-distributed points in $\mu$-space, transform the $\{\mu_k\}_k$ generated to $\{x_n\}_n$ and make $N$ histograms of $x_n$ values.

To implement inverse transform sampling, we need the following ingredients:

  • CDF of the harmonic oscillator. This one is just an integral of gaussian-times-polynomial. For each excitation level $k$ there's a closed-form expression in terms of the $\operatorname{erf}$ function. If we express the wavefunction of a harmonic oscillator in terms of $s=x\sqrt\Omega$, then this integral doesn't depend on $\Omega$.
  • Inverse function of the CDF. For the purposes of visualization it's sufficient to generate a table of values of the CDF for values of $s$ where the CDF is very small to where the CDF is very close to 1, and linearly interpolate between the pairs $(\mathrm{cdf}, s)$.

$n$-phonon states

One way of visualizing a field state is by showing probability density of displacement of its particles, like it's done in ref. 1. A bit different way, similar to that used in ref. 2, is to separately take the positive and negative parts of the wavefunction, and show the "partial probabilities" of both parts e.g. in different color channels.

The following images will display the state of a 50-particle chain in both ways: gray is total probability density, red positive part, blue negative. Horizontal axis denotes the particle in the chain, while vertical axis is the displacement of the particle.

(image repeated
for convenience)
1 phonon 5 phonons 10 phonons
mode 1
mode 3
mode 10
1 phonon in mode 1,
4 phonons in mode 3
10 phonons in mode 1,
1 phonon in mode 2
10 phonons in mode 1,
1 phonon in mode 9

One other way of visualization of stationary states is by simulating repeated measurements of the field configuration. In this case we'll see the most probable field configurations directly. This is similar to the approach in ref. 2, but instead of showing the configuration with opacity weighted by probability, we sample the configurations with its probability. Below is the visualization of the state with 15 phonons in mode 3.

Coherent states

From the previous section showing $n$-phonon states we might have concluded that for a quantum field, what's quantized is the field amplitude. This is partially right: each eigenstate has a global maximum of the probability density at a particular field amplitude, and adding phonons increases this maximum amplitude. It's similar to the amplitude of the simple harmonic oscillator, whose highest maxima also jump farther from equilibrium position as you excite it to higher energy levels.

But in fact, the most classical-like states, called coherent states, can change their amplitudes continuously. This is because their maximum is defined by the distribution of weights of the eigenstates in the superposition. This distribution can change its expected value smoothly, and so will the maximum of the probability density of displacement.

Coherent states of a field can be visualized just as easily as eigenstates, because the superposition here is taken over a single mode, which retains separability of the wavefunction. Namely, for a coherent state of $k$th mode with mean phonon number $\langle n\rangle=|\alpha|^2$, we have

$$\psi_k^{(\alpha)}(\mu_k)=\exp\left(-\frac{\alpha^2}2\right)\sum\limits_{n=0}^\infty \frac{\alpha^n}{\sqrt{n!}}\psi_n(\mu_n).\tag{13}$$

For ease of sampling though, we want a simpler expression, which can be found using the fact that a coherent state is an eigenstate of the annihilation operator. Solving corresponding differential equation, making sure the solution also solves Schrödinger's equation (by adding the necessary time-dependent phase) and normalizing will yield

$$\psi_k^{(\alpha)}(\mu_k)=\left(\frac{m\Omega_k}{\pi\hbar}\right)^{1/4}\exp\left(-\frac{m\Omega_k}{2\hbar} \left(x-\alpha\sqrt{\frac{2\hbar}{m\Omega_k}}\cos(\Omega_k t)\right)^2\right)\times\\ \times\exp\left(-i\left(\alpha x\sqrt{\frac{2m\Omega_k}\hbar}\sin(\Omega_k t)+\frac{\Omega_k t}2-\frac{\alpha^2}2\sin(2\Omega_k t)\right)\right).\tag{14}$$

Coherent states' evolution in time is non-trivial: their probability densities change. This makes the phase also evolve non-trivially, so we can't usefully show signs of the wavefunction as in ref. 2. So we'll only show probability densities now. Below are some animations of coherent states with different values of mean phonon number $\langle n\rangle$ and for different modes (frequencies are not to scale, so animations go at the same rate).

$\langle n\rangle=0$ $\langle n\rangle=0.5$ $\langle n\rangle=1.0$ $\langle n\rangle=5.0$ $\langle n\rangle=10.0$
mode 1
mode 3
mode 10


  1. Scott C. Johnson, Thomas D. Gutierrez, "Visualizing the phonon wave function", 2002 Am. J. Phys. 70(3). DOI: 10.1119/1.1446858.

  2. Helmut Linde, "A new way of visualising quantum fields", 2018 Eur. J. Phys. 39 035401. DOI: 10.1088/1361-6404/aaa032.

  • $\begingroup$ I am far from being able to understand the math or concepts here, but this answer seems incredibly detailed and made with lots of effort. Great job! $\endgroup$ – Jonas Apr 19 at 21:32
  • 2
    $\begingroup$ This answer is beautiful. $\endgroup$ – Andrew Apr 20 at 1:34

What oscillates in the e.m. field is not the amplitude of some chord, but the electric field vector and the magnetic field vector. For visualizing your formula, see first of all the animated graph in this site. You see there an e.m. field propagating, and the electric and magnetic field oscillating in time between a maximally positive amplitude to a maximally negative amplitude. The oscillations have a certain frequency.

Now, imagine yourself another such field, oscillating with a different frequency, superimposed on the field in the animated picture. And then, one more field, with another frequency, and one more field, etc. The total oscillation will be wild, but there will be oscillation.

This is as far as visualizing the oscillations. However, your formula does not describe the electric and magnetic field of each oscillator. Each term in the summation represents something else, the energy of the respective oscillator. To make an association with something that you know, then, if you heard of the photoelectric effect, then you know that from a certain type of atom, an electron can be kicked out by bombarding the atom with photons of a given frequency. The frequency is proportional with the photon energy. Well your formula says that the e.m. field energy is the sum of the energies of all the single-frequency e.m. fields components.


However, I'm having trouble understanding this formulation when applying it to a free field. A free field is just a cavity with infinitely large boundaries, right? That would seem to imply that for each frequency, there is only one harmonic oscillator.

A free field is a field that obeys homogeneous Maxwell equations (with charge and current density vanishing).

The sum over modes in your formula makes sense only for field in finite region. For whole space, the boundary conditions are different and one is lead to an integral rather than sum.

However, with such an integral over whole space there are problems, especially for thermal radiation (the integral would be divergent).


Visualizing such a Quantum field is indeed possible, it is described in the article "A new way of visualizing Quantum fields", which you can find here:


Best regards Helmut

  • $\begingroup$ Proper visualisation involves what on paper is called animation. That is, things have to move or change, or be capable of moving or changing. It is unfortunate that that paper gives little indication of how anything depicted moves. $\endgroup$ – Steve Feb 7 '18 at 9:07
  • $\begingroup$ Most of the charts in the paper visualize energy eigenstates which are essentially time-independent, so they don't really 'move' (except for a trivial rotation through the complex plane). The only exception are the states with one or two localized particles, respectively, which would evolve quickly into a more spread-out oscillation pattern as indicated in the caption to figure 6. $\endgroup$ – Helmut Feb 12 '18 at 7:38
  • $\begingroup$ Indeed. On a positive note however, I agree that good visualisation is what is needed in physics - the inability to paint an integrated picture of something, is normally a sign that the concepts being employed are in bad order, and more work of this kind ought to be done on creating convincing visualisations. I wasn't responsible for the downvote and that person appears to have left no remarks, so to counter that I've upvoted you (back to zero!). $\endgroup$ – Steve Feb 12 '18 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.