Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem using one-body Coulomb operator #4

Open
ChristianGjermestad opened this issue Jan 17, 2022 · 0 comments
Open

Problem using one-body Coulomb operator #4

ChristianGjermestad opened this issue Jan 17, 2022 · 0 comments

Comments

@ChristianGjermestad
Copy link

Hello,

I have an issue using the one-body Coulomb operator. This is the code I'm trying to run:

x, y, z = bk.get_default_variables(1,3)  #
a = 1; b = 1; c = 1
k = bk.ket(a*sp.exp(-(x-b)**2/2*c**2), name="k")
norm = (k.bra@k)**-0.5
knorm = k*norm

T = bk.get_kinetic_operator()
V = bk.onebody_coulomb_operator()

print(knorm.bra@(T*knorm))
print(knorm.bra@(V*knorm))

This yields the output:

0.25
<lambdifygenerated-9>:2: RuntimeWarning: divide by zero encountered in double_scalars
  return (Dummy_35**2)**(-0.5)*exp(-1/2*(Dummy_35 - 1)**2)
-inf

The code from the tutorial works:

n,l,m = 1,0,0
psi_0 = bk.basisbank.get_hydrogen_function(n,l,m)
print(psi_0.bra@(V*psi_0))

Is this a bug, or is there an obvious, quantum-mechical explanation for this that I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant