I'm trying to solve a time-indipendent Schrödinger equation. This is the Hamiltonian:
$H=E_Cq^2-E_J\cos(2\pi\varphi)+\frac{E_L}{2}\varphi^2$
(assume $E_C=1$) where $q=-i\frac{d}{d\varphi}$ and:
$U(\varphi)=-E_J\cos(2\pi\varphi)+\frac{E_L}{2}\varphi^2$
is the potential energy and i putted $E_L=2$, $E_J=0.5$ to get this kind of potential:
I'm trying to use the code given by the User "xslittlegrass" (here the link: Find eigen energies of time-independent Schrödinger equation), where he uses an approximation of the operator $\frac{d^2}{dx^2}$ and, applyed to an harmonic oscillator, he gets correct eigenstate and eigenvalue.
TISE1D[U_Function, {xmin_, xmax_}, N0Grid_: 101,
BoundaryCondition_String: "zero"] := Module[
{Δx = (xmax - xmin)/(N0Grid - 1), Hmtx, Tmtx, Vmtx},
Tmtx = -(1/(2 (Δx)^2))
SparseArray[{{i_, i_} -> -2, {i_, j_} /; Abs[i - j] == 1 ->
1}, {N0Grid, N0Grid}];
Vmtx = DiagonalMatrix[U /@ Range[xmin, xmax, Δx]];
Hmtx = Tmtx + Vmtx;
If[BoundaryCondition == "periodic",
Hmtx[[1, -1]] = Hmtx[[-1, 1]] = -(1/(2 (Δx)^2));
];
Sort[Transpose@Eigensystem[Hmtx], (#1[[1]] < #2[[1]]) &]
]
Do you think this should work with my potential? I'm trying to use it, but I'm not sure it works fine in my case. Is there any other method to solve it?
Thank you!
