I would like to solve the time-independent 2D Schrodinger equation for a non separable potential using exact diagonalization. I understand I need to rewrite the problem so that the wavefunction which is a 2xN matrix is a 1xN² matrix so that the problem reduces to the diagonalization of a N²xN² hamiltonian. My question is : how should I use the meshgrid and del2 functions to define the laplacian part of the hamiltonian, and how should I write the matrix potential (say I have a function V(x, y) for the potential, how do I get the matrix potential in the rewritten problem ? And finally, how do get the eigenstates and eigenenergies of the initial problem ?
Thanks a lot