ohno / Antique.jl

Self-contained, well-tested, well-documented Analytical Solutions of Quantum Mechanical Equations.
https://ohno.github.io/Antique.jl/
MIT License
18 stars 3 forks source link

Pöschl-Teller potential #23

Closed lhapp27 closed 3 months ago

lhapp27 commented 4 months ago

I think it is interesting to add the Pöschl-Teller potential. It is mentioned in the list of analytical solutions. It has only one parameter which controls the number of bound states, whose wave function is given in terms of associated (or generalized) Legendre functions. The eigenvalues are also a simple function of that parameter.

ohno commented 4 months ago

Thank you for your contribution!

The potential $V(x)$ and eigen function $\psi_n(x)$ depend on characteristic length $x_0$, and eigen value $En$ depends on characteristic energy $E\mathrm{char} = \frac{\hbar^2}{2 m x_0^2}$. But this codes do not depend on $m$, $\hbar$ or something. Might the struct have 4 parameters: PoschlTeller(λ=1.0, x₀=1.0, m=1.0, ℏ=1.0) ? The characteristic length and the characteristic energy must be calculated in the functions like ω of HarmonicOscillator.

By the way, we should replace lambda with λ for consistency with other models.

lhapp27 commented 4 months ago

Thank you for your comment, but I'm not sure if I fully understand. Of course, I am happy to provide better information in the documentation about the fact that the results from the code are dimensionless, and how one can get a dimensionful Schrödinger equation with all dimensionful variables back from the dimensionless one(s). However, I feel that as long as I dont know the units from the input parameters, I cannot provide units for the output parameters, unless we introduce some kind of unit conversion.

As an example: for the Harmonic Oscillator I can provide dimensionless energy levels $n+1/2 = 0.5, 1.0, 1.5, \ldots$, which are then given in units of $\hbar \omega$ (I agree that it needs to be clearly stated/documented). If on the other hand, the factor $\hbar \omega$ is included in the output, I expect the output to not be pure numbers but have some units, e.g. $0.5\ \mathrm{J}$ or $1.5\ \mathrm{eV}$. Maybe I am missing something here, though.

I get the point about consistency and will replace lambda by λ.

ohno commented 3 months ago
Nondimensionalization is a difficult topic. In Antique.jl inputs and outputs are pure numbers. Units are omitted. (I think it is possible to perform calculations with units using Unitful.jl, but I have not tried it.) I have good example in hydrogen atom. Here are two examples for hydrogen atoms. Input Output
$1 E\mathrm{h} = 1 E\mathrm{h}$ $E{1s} = -0.5 E\mathrm{h}$
$1 E_\mathrm{h} = 27.211386245~988\mathrm{eV}$ $E_{1s} = -13.605693122994\mathrm{eV}$

These examples are calculated using Antique.jl as follows:

julia> H = HydrogenAtom(Eₕ=1.0)
julia> E(H)
-0.5

julia> H = HydrogenAtom(Eₕ=27.211386245988)
julia> E(H)
-13.605693122994

In a harmonic oscillator, the unit of energy is $\hbar\omega$ and it changes depending on ℏ, k and m. The case of Pöschl-Teller potential is more complicated. We have to reverse the equation before it was non-dimensionalized.

The "Reverse-Non-Dimensionalization" for enegy, potential and wavefunction are written as

E_n = E_\mathrm{char} E_n^* = - \frac{\hbar^2}{2 m x_0^2} \frac{\mu^2}{2},
V(x)
= E_\mathrm{char} V^*(x^*)
= - \frac{\hbar^2}{2 m x_0^2} \frac{\lambda(\lambda+1)}{2} \mathrm{sech}(x^*)^2,
\psi_n(x)
= \frac{1}{\sqrt{x_0}} \psi^*_n(x^*)
= \frac{1}{\sqrt{x_0}} P_\lambda^\mu(\tanh (x^*)) \sqrt{\mu \frac{\Gamma(\lambda-\mu+1)}{\Gamma(\lambda+\mu+1)}}.

Your original difinitions are without the asterisk. Therefore, the model is identified by the tuple of $\hbar$, $m$, $x0$ and $\lambda$. The unit of enegy is $E\mathrm{char}$ and it changes depending on $\hbar$, $m$, $x_0$.

The proof is below. Characteristic parameters are $E_\mathrm{char} = \frac{\hbar^2}{2 m x_0^2}$ and $x_0$. Non-dimentionalization of variables are written as

E^* = E / E_\mathrm{char},
x^* = x / x_0.

Non-dimentionalization of operators are written as

\mathrm{d}x = x_0 \mathrm{d}x^*,
\begin{aligned}
\frac{\mathrm{d}}{\mathrm{d} x}
=
\frac{\mathrm{d} x^*}{\mathrm{d} x}
\frac{\mathrm{d}}{\mathrm{d}  x^*}
=
\frac{1}{x_0}
\frac{\mathrm{d}}{\mathrm{d}  x^*},
\end{aligned}
\frac{\mathrm{d}^2}{\mathrm{d} x^2}
=
\frac{1}{x_0 ^2}
\frac{\mathrm{d}^2}{\mathrm{d} {x^*}^2}.

The kinetic energy operator and potential energy function are transformed to their original (non-dimentionalized) definitions using Schrödinger equation:

\begin{aligned}
\hat{H} \psi &= E \psi
\\
\left[
-\frac{\hbar^2}{2m} \frac{\mathrm{d}^2}{\mathrm{d} x^2} - E_\mathrm{char}\frac{\lambda(\lambda+1)}{2} \mathrm{sech}(x / x_0)^2 \right] \psi &=  E \psi
\\
\left[
-\frac{\hbar^2}{2m x_0^2} \frac{\mathrm{d}^2}{\mathrm{d} {x^*}^2} - E_\mathrm{char}\frac{\lambda(\lambda+1)}{2} \mathrm{sech}(x / x_0)^2 \right] \psi &=  E \psi
\\
\left[
-\frac{1}{E_\mathrm{char}} \frac{\hbar^2}{2m x_0^2} \frac{\mathrm{d}^2}{\mathrm{d} {x^*}^2} - \frac{E_\mathrm{char}}{E_\mathrm{char}} \frac{\lambda(\lambda+1)}{2} \mathrm{sech}(x / x_0)^2 \right] \psi &=  \frac{E}{E_\mathrm{char}} \psi
\\
\left[
-\frac{1}{2} \frac{\mathrm{d}^2}{\mathrm{d} {x^*}^2} - \frac{\lambda(\lambda+1)}{2} \mathrm{sech}(x^*)^2
\right] \psi &= E^* \psi
\end{aligned}

The wavefunction is non-dimentionalized using normalization condition:

\begin{aligned}
\int |\psi(x)|^2 \mathrm{d}x = 1
\\
\int |\psi(x)|^2 x_0 \mathrm{d}x^* = 1
\\
\int \left| \frac{1}{\sqrt{x_0}} \psi^*(x^*) \right|^2 x_0 \mathrm{d}x^* = 1
\\
\int |\psi^*(x^*)|^2 \mathrm{d}x^* = 1.
\end{aligned}