_________________________________________________
WHAT DO YOU COMPUTE IN QUANTUM MECHANICS CLASS?
Dylan Holmes
_________________________________________________
2022/July/13
Table of Contents
_________________
1. What is quantum mechanics class for?
2. The computational approach reveals some bugs
.. 1. Bug #1: The basic problems immediately cheat the basic rules
.. 2. Bug #2: Nonphysical, implicit, and inconsistent boundary conditions
.. 3. Bug #3: /Ad hoc/ Hamiltonians with one-off solutions
.. 4. Bug #4: The math supplies nouns, not verbs
3. So what can you compute?
.. 1. Algebraic methods make discrete problems painless.
.. 2. Numerical methods let you solve big, realistic problems.
4. Contributions
If you're like me, you learn by playing. A computer can help you play:
the right software library gives you simple pieces you can
experimentally combine, as well as tools to show visually what's
happening and tools for constructing your own components. The
computer's precision and horsepower are stars of the show: A software
library is a precise expression of a way of thinking, an endlessly
patient expert you can interrogate until your curiosity is
satisfied. Computational horsepower allows you to abstract away from the
mechanics of /how/ to calculate: you are free to focus on /what/ to
calculate---you don't get bogged down with solving huge sums, fixing
typos, looking up integrals, expanding algebraic expressions, etc.
I've loved using the computer as a conceptual playground. I thought I'd
try my hand at making a software library for learning quantum
mechanics---the way that SICM [1] did for classical mechanics. To start,
I looked over a few textbooks to get a feel for the standard curriculum
(Shankar, Sakurai, Griffiths, and others). What follows is a description
of the tools I built, and the insights I got about the structure of
quantum mechanics.
1 What is quantum mechanics class for?
======================================
In my view, the main /computational/ purpose in a quantum class is to
take a physical quantum-mechanical situation, convert it into a
differential equation, and solve it, describing the resulting
solutions. You learn qualitatively by exercising this computational
capability. In this way, quantum class is just like the other dynamics
classes (mechanics, electromagnetics, thermodynamics), but
distinguished by its own specialized set of physical laws.
In order to support this computational ability, you need three sorts
of knowledge:
1. Mathematical machinery: definitions, proofs, and manipulations of
concepts like eigenvectors and Hilbert space.
2. Folklore: how quantum phenomena work (superposition, uncertainty,
quantization) and the experiments that led up to the theory.
3. Formalism: How to model the real world using mathematical
machinery, i.e. the correspondence between human-level concepts
(observables, measured values) and their mathematical
representations (Hermitian operators, eigenstates).
With these tools in hand, you're ready for the main course. This
involves solving some of the very few quantum mechanics problems that
have closed-form solutions (free particle, particle in a box, quantum
harmonic oscillator, hydrogen atom, etc.)
This is the canonical quantum mechanics course, in a nutshell. From a
computational perspective, it has some interesting bugs---perhaps
we'll be able to teach more effectively when we look for ways to
address them.
2 The computational approach reveals some bugs
==============================================
2.1 Bug #1: The basic problems immediately cheat the basic rules
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is a stylized conversation between a teacher and student:
- Teacher: Here's our mathematical model: When you measure something,
the quantity you're measuring is a "Hermitian operator" and the
result is an "eigenstate".
- Student: Ok.
- Teacher: Some states are physically illegal. In order to be legal, a
state must be a square-integrable function. This means that the
square of the function must integrate to 1. This corresponds to
requiring a certain probability to add up to 100%.
- Student: Ok.
- Teacher: A big part of this course centers on two fundamental
observables: position and momentum. You can build many important
dynamics operators out of them.
- Student: Ok.
- Teacher: All position eigenstates are nonphysical. All momentum
eigenstates are nonphysical. Specifically---
Position eigenstates are nonphysical because, although they are
square integrable, they aren't functions: they're function-like
abstractions that are zero everywhere except at an infinitely tall,
infinitely narrow spike. They exist only within the scope of an
integral.
Momentum eigenstates are nonphysical in free space because they're
sine waves, which means they oscillate back and forth forever so
they aren't square-integrable.
- Student: ?????
I think the lesson here is that while position and momentum are indeed
physically fundamental, and while the free-particle physical situation
is the simplest /as a differential equation with trivial boundary
conditions/, this is a buggy first problem to show a student because
it is riddled with exceptions. It has the nasty property of
undermining the folklore, the formalism, /and/ the mathematics all at
once.
For example, even a pure mathematician who ignores the physical
implications of the setup will balk at the formalism itself because
these eigenfunctions don't belong to the Hilbert space of
physically-realizable solutions (you need the more expansive concept
of a "rigged Hilbert space" to accomodate them, but even if you can
rigorously define a space in which these solutions live, you've still
reneged on the "physically realizable" premise [2] ).
A few fixes come to mind. Focusing on finite eigenproblems first (as
Sakurai does) might help---start with spin and postpone linear
position and momentum until later. And I think starting with /some/
boundary conditions (as in particle in a box) might have some
advantages over starting with the boundaryless free particle
setup---sometimes seeing /more/ of the machinery may help. Finally, if
you can numerically solve the Schrodinger equation, then you can
experiment with objects that are more realistic despite being harder
to manipuate by hand. These include wave packets in place of of
infinitely sharp wavefunctions, and large-but-finite potentials in
place of infinite potential walls.
2.2 Bug #2: Nonphysical, implicit, and inconsistent boundary conditions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I once missed a problem on a quantum mechanics exam because I failed
to account for the boundary conditions that would make the solutions
physically realizable. It was not even a mistake---just an error. That
is, I didn't even realize that it was desireable to have smooth (or
as-smooth-as-possible) solutions that went to zero wherever the
potential was "infinite".
To the extent that this is more than just personal deficiency, I think
the problem is first that boundary conditions are hard to
see. Possibly this is an artifact of our notation. We treat "boundary
conditions" as a sort of tacked-on auxiliary condition to differential
equations generally, when really they are as important as the
equations themselves; they are the zeroth-order component of the
differential system. This auxiliary nature is reflected in the fact
that while differential equations are represented by, well, equations,
we don't have a unified way to represent the many sorts of boundary
conditions such as square-integrability, varying levels of smoothness,
or vanishing in particular areas.
Consider that we talk about "the" momentum operator, when really every
physical setup has its own momentum operator, defined solely on the
physically realizable functions. These various momentum operators
share the same basic functional form (a derivative), but carry along
domain restrictions based on whatever the physical constraints
(boundary conditions) of the problem are. As a concrete example, the
free particle has different momentum eigenstates than the particle in
a box. This is just like how the squaring function on integers,
rationals, reals, and real-valued functions represents the "squaring
function" on different domains. We elide that difference, confusingly,
when we let boundary conditions fade into the background.
The second problem is that boundary conditions enforce "physical
realizability", but in class the notion of physical realizability is a
sort of moving target. As I pointed out in the previous section, we
require square integrability---except when it comes to momentum
eigenstates. We also require functions to be smooth---except in
problems where they can't be because the potential has a discontinuous
kink, in which case we require them to simply be as smooth as
possible---say, continuous with a continuous first derivative. It is
confusing to have a changing standard of what constitutes "as physical
as possible". Part of the issue is that the quantum mechanics problems
you typically see in class are genuinely unphysical, with different
sorts of infinities, kinks, or singularities. Their solutions inherit
these unphysicalities.
Even without changing the curriculum itself, I think you can improve
the situation by /foregrounding/ boundary conditions. I suspect that
students will be better equipped in a course that highlights the role
of boundary conditions, acknowledges that unphysical problems have
different and less-physical boundary conditions, and that emphasizes
the process of finding, enumerating, and enforcing boundary
conditions. Boundary conditions ought to be first-class objects.
But at a broader level, I think it may be useful to rethink which
problems we approach, choosing to prefer those that are
singularity-free.
2.3 Bug #3: /Ad hoc/ Hamiltonians with one-off solutions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Knowledge is most useful when it is compositional: when learning
something new enables you to do combinatorially many new things. One
of my goals in building a computational system has been to expose the
compositional parts of quantum mechanics.
Working through the curriculum of basic Hamiltonian problems, I noted
that each new Hamiltonian came with its own method of solution and its
own dribble of exceptions. For example:
- Free particle: Solutions violate the physicality agreement.
- Particle in a box: Infinite potential wells alter the boundary
conditions.
- Quantum harmonic oscillator: Solutions are produced "out of a hat"
using the method of creation and anihilation operators. This method
is used exactly once in this class, for this specific problem.
- Hydrogen atom: Solutions are Legendre polynomials, which are again
produced by sleight of hand and never reused.
If the purpose of quantum mechanics class were simply to /catalogue/
the important scenarios and the one-off methods for solving them, this
would be a sufficient exploration. But on the other hand, if
understanding comes from play, it would be useful to spin up /new/
scenarios and solve them.
Unfortunately, the standard curriculum deals essentially with
scenarios that have closed-form solutions. This means that we are
confined to the shallow end of the space of problems---almost any new
problem we could invent will take us beyond what we are equipped to
handle.
If we're going to explore quantum mechanics and not just catalogue it,
we must be able to experiment with problems of our own making. For
this reason, I think one of the most useful things a quantum mechanics
software library could provide would be a robust system for describing
and numerically solving quantum mechanics problems, characterizing
their solutions.
2.4 Bug #4: The math supplies nouns, not verbs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quantum mechanics is supported by a heavyweight arsenal of
mathematics. The way the system changes in time is govered by a
differential equation, so we've brought in the theory of differential
equations. The equation is linear, so we've got linear algebra,
eigenspectra, and all that. We're dealing with complex numbers, hence
complex analysis. The physical states are represented by integrable
functions, so we've got functional analysis, [rigged] Hilbert spaces,
integral inner products, and more.
For all this machinery, I see very little to compute. In other words,
I find that the math is useful for providing a vocabulary and for
proving certain properties (such as that Hermitian operators have
all-real eigenvalues), but that it does not provide either things to
build or new things to try. For example, it is one thing to /know/
that the spectrum of a linear operator may have point, continuous, and
residual components---but this knowledge isn't particularly
/actionable/. It isn't /algorithmic/. Another way to put it is that
the mathematics supplies nouns (definitions, proofs) but not verbs
(algorithms, procedures, recipes, compositional structures).
I mentioned earlier that position and momentum eigenstates are
nonphysical, and you have to do some extra mathematical work (via
rigged Hilbert spaces) in order to make the mathematics even make
sense. However, again this conceptual work salvages only the
mathematical rigor; it doesn't provide any recipe for solving real
quantum problems.
In my view, the computational approach reveals that while much of the
mathematics is useful to the mathematician who wants to prove a solid
foundation, it is mostly not useful to the programmer whose goal is to
build and experiment with new systems, except insofar as the
mathematics provides a particular vocabulary and certain identities
(such as bra-ket identities) that the software library can use under
the hood. Details follow in the next section.
3 So what can you compute?
==========================
Having diagnosed some of the problems and shortcomings of the quantum
mechanics curriculum, let's talk about what we /can/ compute. This'll
show the faint outlines of what a computationally-backed exploratory
quantum course might look like.
3.1 Algebraic methods make discrete problems painless.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The operator commutator [A,B] plays an important role in quantum
mechanics, and there are several identities that allow you to convert
a compound commutator such as [ABCD, EFGH] into a polynomial of basic
comutators likes [A,B]. The identities provide a recipe for recursive
decomposition so you never have to struggle through computing, say,
[X^2P, P^2X] by hand ever again.
For similar reasons, it is useful to have methods to define discrete
operators /symbolically/. You can, for example, define a spin-like
operator S_z with two eigenstates called "+" and "-". You can supply
information that describes how the eigenvectors of two operators
relate, e.g. by defining the commutator relation between the two
operators. With sufficient info, you can take an arbitrary vector in
one eigenbasis and automatically compute its symbolic coefficients in
another eigenbasis.
I built several different prototypes of this symbolic discrete
operator approach. One design decision I faced was whether the
eigenvectors should be local data structures, known only to their
defining operator, or whether they should be part of some global
knowledge base. After experimenting, I found it useful to have
eigenvectors exist in a global knowledge base. This makes it easier to
describe how eigenvectors relate to multiple operators, e.g. being an
eigenvector of two operators. This system uses named operators,
e.g. saying "let |+1> be an eigenvector of the operator named 'Sz'
with eigenvalue +1". Looking up named operators in a global database
is a bit ugly, but it exposes the right material.
I suspect that, by extending this approach, you could set up discrete
scenarios such as schrodinger's cat, the double-slit experiment,
quantum bomb detectors, and so on. You could show how superposition
and observation work on a finite state space---the pedagogical
question is what exactly you'd like the output to be, having set up
the experiment. This'd be a good future extension.
3.2 Numerical methods let you solve big, realistic problems.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A major blocker to setting up and playing with Hamiltonians is that
most of them don't admit simple closed form solutions, which means
most perturbations of the problems you study in class can't be solved
using the methods learned in class.
To address this problem, I suggest modifying the curriculum to lean
heavily on numerical integration techniques. You supply the
Hamiltonian, however convoluted, and you receive a set of
heuristically calculated eigenstates.
The so-called /shooting method/ accomplishes this numerical
integration: given an arbitrary starting wavefunction, the algorithm
alters the initial parameters of the wavefunction and numerically
computes the rest of the wave. If it is basically a standing wave and
it satisfies the supplied boundary conditions, it is an energy
eigenstate---a solution to our differential equation. The wave (and
its corresponding energy value) is returned.
Numerical methods are an essential exploratory tool. If you can use a
software routine to solve analyticaly-intractable situations, you can
play a lot more freely.
So far I've implemented the shooting method, with nice results. I'm
excited about a few extensions of this method, though I haven't
attempted them yet:
1. With a slight modification, you could produce not only graphical
pictures of energy eigenstates, but animations of arbitrary
waveforms evolving in time.
2. I suspect it may also be possible to decompose an arbitrary
waveform (that satisfies the boundary conditions) into its energy
eigencomponents, even if those components were determined
numerically.
3. Imagine being able to, as a newcomer to quantum mechanics,
manipulate a multi-electron atom or a multi-atom molecule. Suddenly
you've unlocked the field of chemistry.
With the right supporting tools, I think playing with chemistry and
various approximations to molecules would be a great way to learn
basic quantum mechanics.
4 Contributions
===============
If we're going to understand subjects deeply, we must be able to play
within them. We need a way to devise our own complex systems from
basic pieces, as well as supply our own basic pieces. For this, it
helps to have a computer---a tailor-made software library to abstract
away from busywork and provide a precise, interrogable expression of
expertise. I proposed building such a library for an intro quantum
mechanics class.
I suggested that the computational purpose of the basic quantum
mechanics class is to enable you to convert a physical quantum
scenario into a differential equation, then solve that differential
equation. Much of the rest of the class provides supporting
information via mathematical machinery, formalism, and folklore.
But if play is about combinatorial systems, then the current
curriculum falls short: if you focus only on physical problems that
have analytic solutions, then you run into a number of
obstacles. First, while the solutions are simple in some ways, they
are very odd beasts in other ways; they are riddled with singularities
and inconsistencies---discontinuities, unintegrable functions,
infinite potentials. Second, the solution methods aren't
cumulative---each new problem requires its own method, conjuring
Legendre polynomials and creation/anihilation operators from
vacuum. Third, you can't play with these problems because most
variations aren't solvable using the closed-form methods you learn in
class.
Instead, I suggest building a quantum course around numerical
explorations. Demote those neat closed-form solutions; instead focus
on building and solving and qualitatively understanding a great
variety of problems. Isn't that much of what "real" quantum mechanics
is like, anyways? You close the gap between classroom and practice.
Some of the computationally hairy problems are actually easier to
conceptualize, provided you don't need to do all the calculations by
hand. You can ditch unphysical artifacts (infinite potential wells,
dirac delta functions) in favor of wave packets and deep wells. And
you can approach larger problems, such as multi-electron atoms or even
molecular chemistry.
Imagine being able to understand quantum mechanics by working through
the qualitative features of problems /you/ design, with the software
helping you to compute easier and see further.
Footnotes
_________
[1] /The Structure and Interpretation of Classical Mechanics/,
[2] For a good introduction to rigged Hilbert spaces, I recommend the
following papers by author R. de la Madrid:
,