Quantum Harmonic Oscillator

I recently wrote a Python script for plotting wave functions for the Quantum Harmonic Oscillator. This is one of the few problems in quantum mechanics that has a “nice” solution which can be obtained exactly. In simple terms the quantum harmonic oscillator refers to a quantum particle that is confined by a potential whose strength is proportional to the square of the distance away from the equilibrium position (i.e. the position where there is no force from the potential acting on the particle). A concrete physical situation where this applies might be an electron that is in a uniform magnetic field. There are many other physical situations that can either be informed by or very well approximated by the harmonic oscillator model.

Below are some plots of the wavefunction for a particle in a harmonic oscillator potential. Here n denotes the “energy level” where n = 0 corresponds to the ground state of the system. The energy level takes on discrete (or “quantized” hence the name “quantum” mechanics) values. The energy of a particle at the n-th energy level is

qho energy spectrum

where ħ stands for Planck’s constant and ω stands for the natural angular frequency of the oscillator (this is related to the proportionality constant for the potential described in the first paragraph). Interestingly the lowest possible energy for a particle confined to this potential (set n = 0 in this equation) is not zero! This means it possesses so-called “zero point” energy which is something pretty weird that differs from potentials in the macroscopic world.

A wavefunction is a special mathematical object that encodes information about the dynamics of a quantum system. In general wavefunctions are not directly measurable, and many view them as a mathematical tool we use to represent quantum systems. The wavefunction can be used to compute the probability that, for example, the position of the particle will be within a particular range of values. So without any further adieu, here are the plots:

QHO n=0

This is the “ground state” wave function for the quantum harmonic oscillator. The shape of this plot is called a Gaussian. Note that these plots are done in so-called “natural units” (where c = ħ = 1) that simplify the calculations a bit.

QHO n=1

This is the first excited state wave function, note that it has two “bumps.”

QHO n=134

Just for fun, here is the 134th excited state. It’s quite pretty. Notice the larger bumps on either end. As n gets large, we expect the oscillations in the middle to sort of “wash out.” These two large bumps on the ends correspond to the classical turning points for the harmonic oscillator. From Wikipedia:

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.

Here is the Python source code to generate these plots. You will need Python 2.7, NumPy, and matplotlib for the script to run.




30 thoughts on “Quantum Harmonic Oscillator”

  1. I have been exploring for a little bit for any
    high-quality articles or blog posts in this kind of area .

    Exploring in Yahoo I eventually stumbled upon this site.
    Studying this information So i am happy to express that I have an incredibly just right uncanny feeling I
    found out just what I needed. I such a lot surely will make sure to do not disregard this web site and provides it a
    glance on a constant basis.

  2. each time i used to read smaller articles which
    also clear their motive, and that is also happening
    with this piece of writing which I am reading at this time.

  3. In fact, look around on varied forums and you’ll probably realise quite quickly
    that they have a really poor popularity for
    his or her assist service.

  4. I see you don’t monetize your site, i’v got idea how to earn some
    extra money using one simple method, just search in google for;
    money making ideas by Loocijano

  5. I am in fact delighted to read this web site posts which
    includes lots of helpful data, thanks for providing these information.

  6. Pretty part of content. I just stumbled upon your web site
    and in accession capital to assert that I get in fact enjoyed account your blog posts.
    Anyway I will be subscribing to your augment or even I success you get admission to
    constantly fast.

  7. Hello there! I could have sworn I’ve visited this
    website before but after looking at some of the posts
    I realized it’s new to me. Anyways, I’m certainly pleased I stumbled upon it and I’ll be book-marking it and checking back frequently!

  8. 臨海斎場でお葬式をしたいとお考えのあなたへ。

  9. 引越しを業者にお願いする場合、衣紋掛けにかかっているコートなどの衣類を事前に外して畳んだりしておく必要はありません。大家さんもそれを感じており、何度となく苦言をていしたようですが、「飼養していない」の一筋だそうです。



  10. This is the perfect web site for anybody who would like to find out about this
    topic. You know so much its almost hard to argue
    with you (not that I actually would want to…HaHa). You certainly put a brand new spin on a subject that has been written about for
    decades. Excellent stuff, just wonderful!

  11. Tbf, those shells & guns aren’t that "special" in that Every farmer there could make a huge collection if they want with all that they find while While cycling there, there was one farm which had 10-20 shells in front of the porch, waiting for the anti-mining company to pick them It’s part of the life there finding that kind of

Leave a Reply

Your email address will not be published.