The study of Degeneracies in Simple Quantum Systems

Two typical potentials, the LHO and the Potential well have energy depend on a "principal" quantum number, n. This dependence is, respectively, linear and quandratic.

Say in 2 dimensions, this gives

eLHO[n1_, n2_] := e0 (n1 + n2 + 1)

Do[Do[
        Print["(", n1, ",", n2, "): ", eLHO[n1, n2]], {n1, 0, 
          5}], {n2, 0, 5}]

Of interest is to reorganize this so that all states of the same energy are printed out together, and that the list is ordered with increasing energies.

This CAN be done, because all of the degeneracy of the LHO is due to a symmetry.

Part two.
Do the same for the 2-dimensional potential well, where the Energy depends quadratically:

ePW[n1_, n2_] := e0 (n1^2 + n2^2)

Do[Do[
        Print["(", n1, ",", n2, "): ", ePW[n1, n2]], {n1, 1, 
          7}], {n2, 1, 7}]

Now try to reorganize this printout so that the energies come out in groups of degenerate states, and preferably in an order of increasing energy.

This then would represent the "spectrum", in which two qualitative characteristics are important: (1) any degeneracy (or near-degeneracy, which defines conducting "bands"), and (2) relatively large "gaps" between the energies of two adjacent states.
When generalized to models with multiple wells, this will lead to the conductor/semiconductor and isolator behavior.

Run-Time Selection of Results

For printing out only select results, as you go, you can use:

?If

There were no "takers" on this idea...

Post-Processing of Lists

The alternate approach---here possible only because we are dealing with finite and not prohibitively large lists---is to (1) assemble the results into a list, and (2) re-order the list.

So, what's a list?

?List

OK, that's not very illuminative. However, it should be clear that the collection of components of a vector, a column-matrix or a row-matrix, to provide a few examples, form a list. Matrices can be thought of as lists of lists:

{Pauli1  =  {{0, 1}, {1, 0}}, Pauli2  =  {{0, -I}, {I, 0}}, 
      Pauli3  =  {{1, 0}, {0, -1}}}

Now, that's actually a list of three matrices, which were given names, in-line:

Pauli1

and which can also be displayed in the tradditional MatrxForm:

Pauli2 // MatrixForm

Moreover, matrices can be multiplied:

(Pauli1*Pauli2) // MatrixForm

just not as ordinary numbers:

(Pauli1 . Pauli2) // MatrixForm

Now, that's better.

Back to our problem then, we'll:
(1) assemble energies together with the quantum numbers, each such entry in the format of a mini-list itself: {(Subscript[n, 1]), (Subscript[n, 2]), E((Subscript[n, 1]), (Subscript[n, 2]))},
(2) assemble such results as a list of such mini-lists,
(3) reorder this list of mini-lists by the 3rd entry, the energy.

So first, let's define (we do not care for the unit energy to be written out explicitly, although this can be accomodated by modifying the last entry from "(n1^2+n2^2)" to "e0 (n1^2+n2^2)", say)

entry[n1_, n2_] := {n1, n2, (n1^2 + n2^2)}

so that, for example:

entry[1, 2]

Then, we need to reassemble the multiple outputs of

Do[Do[Print[entry[n1, n2]], {n1, 1, 3}], {n2, 1, 3}]

By the way, the same effect could have been obtained, instead of nesting two Do[ ... ] loops, with a single Do[ ... ] loop, but with two "iterating instructions":

Do[Print[entry[n1, n2]], {n1, 1, 3}, {n2, 1, 3}]

into a single list the elements of which are these mini-lists. To that end use

testlist = Table[entry[n1, n2], {n1, 1, 3}, {n2, 1, 3}]

OK. Now for sorting:

For sorting a finite list, you may try:

?Sort

But the first attempt:

Sort[testlist]

doesn't seem to do anything!

Reading up on Sort[ ... ], we try to specify a sorting pattern:

Sort[testlist, #1 > #2 &]

This should have ordered things in a decreasing order; indeed:

Sort[{2, 5, 8.3, Pi, 4, 6, 1, 0}, #1 > #2 &]

works.

A-ha! Ordinary, real numbers can be sorted, because they admit ordering. Complex numbers, for example, don't:

Sort[{I, 1 - I, Exp[I/3]}, #1 > #2 &]

Our \(TraditionalForm\`\(\*"""entry[n\_1, n\_2]\*"""\)\) produces a list, and Mathematica can't figure out how the ordering should be done. Well, we want to order by the 3rd element. So, we need a mechanism to specify elements of a list.

In traditional notation, this is done by subscripting: if M is a matrix, by (Subscript[M, 12]) we (usually) mean the 2nd element in the 1st row. Mathematica's notation for that would be:

entry[1, 2][[1]]

entry[1, 2]

entry[1, 2][[1, 2]]

Pauli1[[1]]

That is, post-pending a list with the symbol [[i]] picks out the i-th component of that list.

So:

Sort[{{1, 2}, {3, 6}, {4, 
          1}}, #1[[2]] < #2[[2]]  &]

orders the pairs by the increasing second element, whereas

Sort[{{1, 2}, {3, 6}, {4, 
          1}}, #1[[1]] > #2[[1]]  &]

orders 'em by the increasing first element.

So, we can use

states = Table[entry[n1, n2], {n1, 1, 2}, {n2, 1, 2}]

We can do this by hand:

states2 = {{1, 1, 2}, {1, 2, 5}, {2, 1, 5}, {2, 2, 8}}

Sort[states2, #1[[3]] < #2[[3]] &]

Flatten[states, 1]

?Flatten

Sort[
      Flatten[Table[entry[n1, n2], {n1, 1, 10}, {n2, 1, 10}], 
        1], #1[[3]] < #2[[3]] &]

and now it remains to read the list in order, and count any degeneracies, if such exist. (So, you are still not quite done... ☺)

sortedstates = 
      Sort[Flatten[Table[entry[n1, n2], {n1, 1, 10}, {n2, 1, 10}], 
          1], #1[[3]] < #2[[3]] &]

The above is now a sorted simple list of mini-lists, through which we can count:

Count[sortedstates, {___, ___, 50}]

Note the use of three underscores to denote "anything": that is, we are searching for mini-lists the first two entries of which are arbitrary, and the thrid entry (energy) of which is a given value. This can definitely produce a list of degeneracies:

energyList = 
      Table[{e, Count[sortedstates, {___, ___, e}]}, {e, 1, 200}]

ListPlot[energyList]

The above gives a graphical representation: for most values of energy 1 ≤ E ≤ 200, there's no such state; for many, there are two states, degenerate by the (Subscript[n, 1])⟷(Subscript[n, 2]) symmetry; then, there is a single case of triple degeneracy, (1,7), (7,1) and (5,5), and then there are two more cases with quadruple degeneracy, probably cases where \(TraditionalForm\`E\_\(n\_1, n\_2\) = \(E\_\(n\_2, n\_1\) = \(E\_\(\(n'\)\_1, \(n'\)\_2\) = E\_\(\(n'\)\_2, \(n'\)\_1\)\)\)\), that is two pairs.

We can do a little better by looking for explicit cases of interest:

Cases[sortedstates, {___, ___, 50}]

The triply-degenerate cases. And...

Do[Print[k, Cases[sortedstates, {___, ___, k}]], {k, 51, 
        100}]

There we go: the energy levels 65 and 85 are quadruply degenerate.

A Few similar studies

The study of a 3-dimensional square potential well, with E = (Subscript[E, 0])(((Subscript[n, 1])^2) + ((Subscript[n, 2])^2) + ((Subscript[n, 3])^2)) is another example where the degeneracies of the (energy) spectrum can be similarly studied.

Another type of generalization occurs in considering square-wells the widths of which in the different directions are different. Since the energy of a particle in a square well potential depends as (((width))^(-2)), the energy in such a case will depend as \(TraditionalForm\`E = \(ε\_0\)(\((n\_1\/L\_1)\)\^2 + \((n\_2\/L\_2)\)\^2 + \((n\_3\/L\_3)\)\^2)\) , where (Subscript[ε, 0]) has the dimensions of (energy)×(area).

In a third type of generalization, we consider a linear potential, for which (in 1 dimension), the energy depends as E = (Subscript[E, 0]) (n^(3/2)), so that the energy of a particle in a 3-dimensional linear potential with unequal widths has the energy dependence as \(TraditionalForm\`E = \(ε\_0\)(\((n\_1\/L\_1)\)\^\(3/2\) + \((n\_2\/L\_2)\)\^\(3/2\) + \((n\_3\/L\_3)\)\^\(3/2\))\) , where (Subscript[ε, 0]) is a suitable unit. (Working out the precise dependence in terms of m and ℏ, and also (Subscript[L, i])—I'm just guessing here—is a nice exercise in WKB analysis.)