Solve the particle in a box problem using matrix mechanics?

In summary, the potential energy is zero inside the box (V=0 for 0<x<L) and goes to infinity at the walls of the box (V=∞ for x<0 or x>L). To solve this problem using the methods of matrix mechanics, one would need to find the eigenvalues and eigenvectors of the Hamiltonian Operator. However, this problem is not easily solved in matrix mechanics because it is not clear how to incorporate the boundary conditions, which is easy in the position representation (wave mechanics).
  • #36
mike1000 said:
If the discretization was fine enough, such that the numerical solution approached the analytic solution what would you say about the finite difference matrix? If the matrix used in the finite difference solution gave the same eigenvalues and the same eigenvectors as the analytic solution wouldn't the finite difference matrix equal the unknown, operator matrix?

I guess what I am asking if two matrices have the same eigenvalues and the same eigenvectors are they equivalent?
I do not say that anything is wrong with this numerical method, but it's not what's known as "matrix mechanics" a la Heisenberg, Born, and Jordan. They worked in the harmonic-oscillator basis, at least in the beginning, since Heisenberg addressed the harmonic-oscillator problem first in his famous "Helgoland paper".
 
  • Like
Likes DrClaude
Physics news on Phys.org
  • #37
hilbert2 said:
Here's an R-Code that forms the Hamiltonian matrix for the discretized square well problem and solves the eigenstate n=3 (the ground state is n=1), plotting the probability density as an output:

Code:
L <- 1                                               # Length of the domain
N <- 100                            # Number of discrete points
dx <- L/N
A = matrix(nrow = N, ncol = N)                # Hamiltonian matrix
n_state <- 3                        # Number of the eigenstate to be calculated

for(m in c(1:N))                    # Fill the Hamiltonian matrix with elements appropriate for an infinite square well problem
{
for(n in c(1:N))
{
A[m,n]=0
if(m == n) A[m,n] = 2/dx^2
if(m == n-1 || m == n+1) A[m,n]=-1/dx^2
}
}

v = eigen(A)                       # Solve the eigensystem
vec = v$vectors

soln = c(1:N)
xaxis = c(1:N)*L/N

for(m in c(1:N))
{
soln[m] = vec[m,n_state]               # Fill the vector "soln" with the wavefunction values
}

jpeg(file = "plot.jpg")                   # Plot the probability density
plot(xaxis,abs(soln)^2)
lines(xaxis,abs(soln)^2)
dev.off()

The plot that this code produces looks just like you'd expect from a square of a sine function.

View attachment 194507

Many thanks to Hilbert2 for posting this.

I have implemented his code in C# and extended it to two dimensions. I would like to post images of the results.

The first image shows the first 6 eigenstates for a particle in a two dimensional box.

_12HbKg-kJzyobKRPiNsnDUI3IRgmIbE441fx7nfwBK2ByBAul0EzZoYld5eOu6H-vyTUA4OABi7vsgLtCl=w939-h845-no.png


The second image shows the first 5 eigenstates for a two dimensional harmonic oscillator. Also shown is the potential function.

1Qcow-ZGHNe1fDR8coMTsBYC1_Fiq1fIo0m8fnNNZ3jZUfxIuYYHYkCl9sp4Pk2xZ0G2Ll_ETEPj6wU-Y7p=w939-h845-no.png


The C# program performs a eigenvalue decomposition of the finite difference matrix representation of the Schodinger Equation, in much the same way that Hilbert2 describes. All I did was extend it to two dimensions. The C# program writes out the eigenvectors to a file and then I used Excel to make two dimensional plots. There is not a doubt in my mind that I could extend this to three dimensions, however, my computer does not have enough horsepower to solve that problem.
 
Last edited:
  • Like
Likes hilbert2, vanhees71 and Mentz114
  • #38
Good work. Often when there's symmetry in the potential energy function, it's best to split the problem to two problems (x and y directions) to keep the number of grid points manageable.

If a 2D harmonic oscillator has the same spring constant for both x and y directions, the states ##\psi_m (x)\psi_n (y)## and ##\psi_m (y)\psi_n (x)## are degenerate so there's many ways to choose representative eigenstates from the eigensubspace spanned by those functions, but in those images it seems that the solver chooses them in a logical way.
 
  • #39
hilbert2 said:
Good work. Often when there's symmetry in the potential energy function, it's best to split the problem to two problems (x and y directions) to keep the number of grid points manageable.

If a 2D harmonic oscillator has the same spring constant for both x and y directions, the states ##\psi_m (x)\psi_n (y)## and ##\psi_m (y)\psi_n (x)## are degenerate so there's many ways to choose representative eigenstates from the eigensubspace spanned by those functions, but in those images it seems that the solver chooses them in a logical way.

I can change the spring constant in each direction.

If you would like a copy of the relevant code (the part where I create the matrix) I will be glad to give it to you.

I just finished redoing the code in C++. I did this to get access to a different linear algebra package. I can now convert to sparse matrix's. This allows me to use more grid points and it all runs a lot faster.
 
Last edited by a moderator:
  • Like
Likes vanhees71
  • #40
For anybody who is interested in the subject of "Matrix Mechanics" I recommend this book "heisenberg's quantum mechanics "

http://www.worldscientific.com/worldscibooks/10.1142/7702

which includes the derivation of the commutation and the equivalency between the Schrodinger and Heisenberg pictures in the free three first chapters.
 
  • #41
The particle-in-a-box problem from the pov of matrix mechanics seems to be discussed in section 7.5 of Razavy's 'Heisenberg's Quantum Mechanics' which cites this paper, it looks very non-trivial.
 
  • #42
ftr said:
For anybody who is interested in the subject of "Matrix Mechanics" I recommend this book "heisenberg's quantum mechanics "

http://www.worldscientific.com/worldscibooks/10.1142/7702

which includes the derivation of the commutation and the equivalency between the Schrodinger and Heisenberg pictures in the free three first chapters.
I don't know the book, but the title is utmost unjust. It should be titled: "Heisenberg's, Born's and Jordan's Quantum Mechanics" :-(.
 
Back
Top