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

Hyperfine states with Cell #17

Open
john-guthrie opened this issue Dec 8, 2023 · 1 comment
Open

Hyperfine states with Cell #17

john-guthrie opened this issue Dec 8, 2023 · 1 comment

Comments

@john-guthrie
Copy link

I'm running into issues with using hyperfine states with Cell. I'm specifying the states using the notation [n, l, j, F, mF] as the documentation suggests, but I'm getting TypeErrors.

It looks like the list for each state is getting passed to the ARC function getRabiFrequency(), but the number of arguments being passed is incompatible. It also seems like the getRabiFrequency function expects arguments in the fine basis [n, l, j, mj]. It's not clear to me how or if Rydiqule handles conversion from the coupled hyperfine basis [n, l, j, F, mF] to the fine basis [n, l, j, mj], especially since the coupled hyperfine basis states are generally superpositions of the uncoupled basis states [n, l, j, mj, i, mi].

An error is not raised if I manually compute the hyperfine transition Rabi frequencies to input in the Cell couplings.

Example code:

import rydiqule as rq
import numpy as np

states = [[6, 0, 0.5, 4, 0], [6, 1, 1.5, 5, 0]]

probe = {'states': (0,1), 'beam_power': 1e-3, 'beam_waist': 1e-3, 'detuning': 0}

cell = rq.Cell('Cs', states[0], states[1], beam_area = np.pi*probe['beam_waist']**2)
cell.add_couplings(probe)

Error message:

  File ~\python scripts\testing\untitled2.py:16
    cell.add_couplings(probe)

  File ~\AppData\Local\miniconda3\envs\rydRelease11\lib\site-packages\rydiqule\sensor.py:366 in add_couplings
    self.add_coupling(states=states, **c_copy, **extra_kwargs)

  File ~\AppData\Local\miniconda3\envs\rydRelease11\lib\site-packages\rydiqule\cell.py:732 in add_coupling
    passed_rabi = np.array([[1e-6*self.atom.getRabiFrequency(*state1, *state2[:-1],

  File ~\AppData\Local\miniconda3\envs\rydRelease11\lib\site-packages\rydiqule\cell.py:732 in <listcomp>
    passed_rabi = np.array([[1e-6*self.atom.getRabiFrequency(*state1, *state2[:-1],

  File ~\AppData\Local\miniconda3\envs\rydRelease11\lib\site-packages\rydiqule\cell.py:732 in <listcomp>
    passed_rabi = np.array([[1e-6*self.atom.getRabiFrequency(*state1, *state2[:-1],

TypeError: getRabiFrequency() takes from 11 to 12 positional arguments but 13 were given
@dihm
Copy link
Contributor

dihm commented Dec 11, 2023

Thanks for the report John! As you've found out, hyperfine support in Cell is very much still in alpha. Even moving beyond this particular issue, I would be very suspicious of dephasing rate calculations. For now I recommend caution using hyperfine states in Cell.

While we are working towards full hyperfine support, but we are first hammering out some structural changes in Sensor before fully tackling Cell hyperfine support.

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

2 participants