Git Product home page Git Product logo

Comments (5)

deejaybee11 avatar deejaybee11 commented on September 24, 2024 1

It appears I made a mistake with the lowest basis level of the ground state. Having the basis start at n=1 caused this extra feature to occur. Changing it to start at atom.groundStateN has fixed the issue.

My apologies for the inconvenience with this and thank you again for your time.

from arc-alkali-rydberg-calculator.

deejaybee11 avatar deejaybee11 commented on September 24, 2024

Figure_1
As an example, this figure shows the polarizability of the ground state of Rb87 in red (5s1/2) and a rydberg state in blue as a function of wavelength. The lack of detail on the blue asymptotes is purely due to the lack of points in the calculation.

As you can see the ground state has a distinct feature around 1000 nm, which doesn't correspond to any real transitions of Rubidium.

from arc-alkali-rydberg-calculator.

nikolasibalic avatar nikolasibalic commented on September 24, 2024

Thank you for your message @deejaybee11

Could you please share your code, as I cannot reproduce this issue?
Also please ensure that you have latest ARC version (3.0.11).

This is what I get with a test code:

from arc import *

atom = Rubidium87()
n = 23
calc = DynamicPolarizability(atom, n, 1, 0.5)
calc.defineBasis(atom.groundStateN, n+15)
calc.getPolarizability(1100e-9,units="a.u.")

calcGroundState = DynamicPolarizability(atom, 5, 0, 0.5)
calcGroundState.defineBasis(atom.groundStateN, 25)

wavelengthList = np.linspace(600, 1400,1000) * 1e-9  # m
print("now rydberg state")
ax = calc.plotPolarizability(wavelengthList, debugOutput=True, units="au")
print("now ground state")
calcGroundState.plotPolarizability(wavelengthList, debugOutput=True, units="au", addToPlotAxis=ax, line="r--")

import matplotlib.lines as mlines

ax.set_ylim(-4000,4000)

plt.legend(handles=[mlines.Line2D([], [], color="b", linestyle="-",
                          label=(r'$\alpha[%s]$' % printStateStringLatex(n,1,0.5))),
            mlines.Line2D([], [], color='r', linestyle='--',
                          label=(r'$\alpha[%s]$' % printStateStringLatex(5,0,0.5)))],
          loc='lower right')
plt.show()
now rydberg state
now ground state
Resonance: 780.98 nm 5 2P 3/2
Resonance: 795.40 nm 5 2P 1/2

test

from arc-alkali-rydberg-calculator.

deejaybee11 avatar deejaybee11 commented on September 24, 2024

Thank you very much for such a quick response. My code is a bit messy, hopefully it is understandable enough. I realize I may be including too many states in the ground state basis when compared to your snippet there. I forgot to note my code includes the tensor polarizability but I don't see that causing the issue.

atom = arc.Rubidium()
npts = 1000
lmbda = np.linspace(600e-9, 1600e-9, npts)
groundState = arc.DynamicPolarizability(atom, 5, 0, 0.5)
groundState.defineBasis(1, 70)
for i in range(nmin, nmax):
    
    excitedState = arc.DynamicPolarizability(atom, i, 0, 0.5)
    excitedState.defineBasis(1, 80)
    
    z = []
    z2 = []
    for j in range(0, len(lmbda)):
        
        if (i==0):
            z.append(groundState.getPolarizability(lmbda[j], mj=1/2, accountForStateLifetime=True, units='au'))
        z2.append(excitedState.getPolarizability(lmbda[j], mj=1/2, accountForStateLifetime=True, units='au'))


gnd = np.load("ground.npy", allow_pickle=True)
for i in range(nmin,nmax):
    
    plt.figure()
    exc = np.load(str(i)+"exc.npy", allow_pickle=True)
    plt.plot(lmbda, gnd[:,0]+gnd[:,2], 'r--')
    plt.plot(lmbda, exc[:,0]+exc[:,2], 'b-')
    plt.ylim(-4000,4000)

Results in the following plot
image

Thank you very much again.

from arc-alkali-rydberg-calculator.

nikolasibalic avatar nikolasibalic commented on September 24, 2024

Great, thank you for resolving this issue.

I will add in the future some fence in the code to prevent addition of non-physical states when lower n range is not specified correctly. This should prevent and notify user in the future of similar input-range mistakes.

from arc-alkali-rydberg-calculator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.