nikolasibalic / ARC-Alkali-Rydberg-Calculator

Object-oriented Python library for computation of properties of highly-excited Rydbeg states of alkali and divalent atoms.
https://atomcalc.org
BSD 3-Clause "New" or "Revised" License
89 stars 76 forks source link

Basis state index in StarkMap .csv export eigenstates #99

Closed Vanimiaou closed 2 years ago

Vanimiaou commented 2 years ago

Hello,

I am writing because I have a mismatch index problem. For example, for Cesium atom with n1=29, l1=3, j1=3.5, and mj1=0.5, when I run the following calculation example

calc.defineBasis(n1, l1, j1, mj1, nmin, nmax, nmax-1, progressOutput=True, s=s)
calc.diagonalise(np.linspace(0,Emax,nEpoints), progressOutput=True)
# Return Polarizability of target state    
print("%.5f MHz cm^2 / V^2 (41F)" % calc.getPolarizability(showPlot=True, minStateContribution=0.9))
calc.exportData("{0}{1}.csv".format("Cs_n29_F_", mj1))
np.savetxt("{0}{1}.csv".format("States_Cs_n29_F_", mj1),calc.basisStates, delimiter=",",fmt="%.3f") 

the exportData() exporting 3 files ended with _eField, _energyLevels and _highlight, the last two files with each row corresponding to eigenstates for a single specified electric field. But the index of these rows does not match the exported basisStates(). For example the original state coupled index is 349 in the basisState but at electric field = 0, it matches with index 363 in the exporting files for highlight and energyLevels. Can I ask how can I get the correct ordering for this ?

Thank you very much!

nikolasibalic commented 2 years ago

Hello @Vanimiaou

Thank you for your question. States in _energyLevels are not ordered in any specific way relative to the basis state, because these are just eigen values (i.e. energy levels) obtained in diagonalization of the Stark Hamiltonian. Also, when you do such an export of data, you don't have exported full eigen state decomposition. I don't know if data that is saved there is enough for your needs: if you need to know for a given electric field what is full decomposition to basis states, use method the second method here. You have two options (depending on what you want to achieve)

I hope this helps!

Vanimiaou commented 2 years ago

Thank you very much for your help, I'll look into the reference you've sent

Vanimiaou commented 2 years ago

Can I ask another question, I have already use calc.mat1 and calc.mat2 and get the eigenvalues from it, I have seen in your source code you have sorted them in the diagonalization, what would this order be for? Sorry for bothering again, thank you very much

nikolasibalic commented 2 years ago

@Vanimiaou Sure. Can you point me to exact line when I do sorting? What I have checked now, I don't see any sorting. But maybe I forgot and there is something.

Vanimiaou commented 2 years ago

Thank you very much for your reply, I must have read it wrong, sorry for bothering !

nikolasibalic commented 2 years ago

No problems. If you have any questions, feel free to add them to Discussions section we have now.