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

Method to calculate absolute transition frequency #29

Open
cjbe opened this issue Jul 23, 2020 · 7 comments
Open

Method to calculate absolute transition frequency #29

cjbe opened this issue Jul 23, 2020 · 7 comments
Labels
enhancement New feature or request

Comments

@cjbe
Copy link
Member

cjbe commented Jul 23, 2020

It would be useful to have a method that calculates the absolute transition frequency between any pair of states

@cjbe cjbe added the enhancement New feature or request label Jul 23, 2020
@hartytp
Copy link
Contributor

hartytp commented Jul 23, 2020

Out of curiosity, what's the use-case? Does the splitting of the magnetic/hyperfine subleves make a noticeable difference to the overall transition frequency?

Anyway, yes, that's a good idea. I don't like the ion.delta method. Maybe the way to go here is to have a method like ion.transition_frequency(lower_state, upper_state, absolute=True) (bikeshed names and default values) to replace the delta method.

@cjbe
Copy link
Member Author

cjbe commented Jul 23, 2020

This would allow a Stark shift solver to just sum over all levels, and one does not have to think (all levels being S-P1/2, S-P3/2, or D-P1/2, D-P3/2).

Similarly, a Raman matrix element calculation can just sum over all coupled levels, rather than require extra manual work, meaning it works for all ions and all wavelengths for free

@hartytp
Copy link
Contributor

hartytp commented Jul 23, 2020

So you want to do something like this calculation, summing over transitions: https://github.com/OxfordIonTrapGroup/ion_phys/blob/8a4fc96e531332391a871617ed102166d9b5323b/ion_phys/rate_equations.py#L76-L77 ?

The way I like to write code is to keep things as matricies which I can multiple. AFAICT the way you're suggesting you'd be iterating over pairs of states (since I assume get_frequency or whatever would return a number)? Or would you want something that actually returns an absolute energy matrix?

@hartytp
Copy link
Contributor

hartytp commented Jul 23, 2020

Following: #27 (comment) I think the best bet here is:

  • replace delta with get_energy(ind, absolute=True) and get_frequency(lower, upper, absolute=True) accessors.

@cjbe
Copy link
Member Author

cjbe commented Jul 23, 2020

So you want to do something like this calculation...

Yes, but in more complex situations, e.g. for a Raman coupling:
Omega = \sum_{all e} g1g2pol1(q1)*pol2(q2)*matrix_element(dn,e)*matrix_element(e,up) / (frequency(dn,up,e)-omega0)

@hartytp
Copy link
Contributor

hartytp commented Jul 24, 2020

Ok. Are you happy with my proposed solution? If so, it's quick to implement so I'll aim to do it soon...

@cjbe
Copy link
Member Author

cjbe commented Jul 24, 2020

Yes - LGTM
(nit pick: I feel a "relative" kwarg is better than "absolute", as it is not clear to me what the opposite of "absolute" is as an API user)

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

No branches or pull requests

2 participants