rydiqule.atom_utils.expand_single_qnum¶
- rydiqule.atom_utils.expand_single_qnum(qstate: A_QState, I: float | None = None, wildcard: str = 'all') List[A_QState] [source]¶
Generates a list of all valid states given a particular quantum number to be expanded.
For a given
A_Qstate
spec with one or more tuple elements specified as either a list or the “all” string, returns a list of all valid state specifcations matching that state specification with the first list or string element only expanded. If multiple elemens of the statespec are specified with a list or string, only the first one is expanded. This function is intended as a helper function for a single quantum number, and is not designed to be used at the top-levelThe the case that the element to be expanded is a list, the list returned will have a single state specification corresponding to each element of that list, and allowed quantum number rules will not be enforced. In the case that the element to be expaned is the “all” string, all valid values of that particular quantum number will be used. Note that only the
m_j
,f
, andm_f
quantum numbers can be expanded in this way.- Parameters:
qstate (A_QState) – NamedTuple with fields
(n, l, j, m_j, f, m_f)
representng the quantum numbers of the state. Each, element must be either a float, list of floats, or the “all” string. Onlym_j
,f
, andm_f
may be specified with a “all”.I (float, optional) – The nuclear spin of the rydberg atom. Only used for calculations of valid
f
quantum numbers, defaults to 0.0
- Returns:
List of all possible quantum states matching the provided specification. Only the first list-like quantum number will be expanded.
- Return type:
List of A_QState
- Raises:
RydiquleError – If there is a string specification besides “all” in the provided state
Examples
A simple m_j expansion of the D1 states for Rubidium
>>> D1_g = A_QState(5,0,0.5, m_j="all") >>> D1_e = A_QState(5,1,0.5, m_j="all") >>> print(rq.atom_utils.expand_single_qnum(D1_g)) [(n=5, l=0, j=0.5, m_j=-0.5), (n=5, l=0, j=0.5, m_j=0.5)] >>> print(rq.atom_utils.expand_single_qnum(D1_e)) [(n=5, l=1, j=0.5, m_j=-0.5), (n=5, l=1, j=0.5, m_j=0.5)]
We can also expand into nuclear spin-coupled (f) states. Note that in this case we must provide the nuclear spin I to use this function on its own (in this case I=7/2 for Rb87)
>>> D1_g = A_QState(5,0,0.5, f="all") >>> D1_e = A_QState(5,1,0.5, f="all") >>> print(rq.atom_utils.expand_single_qnum(D1_g, I=7/2)) [(n=5, l=0, j=0.5, f=3.0), (n=5, l=0, j=0.5, f=4.0)] >>> print(rq.atom_utils.expand_single_qnum(D1_e, I=7/2)) [(n=5, l=1, j=0.5, f=3.0), (n=5, l=1, j=0.5, f=4.0)]
While we can provide the “all” flag to expand to all states, we may want to use a specific subset of states if, for example, selection rules limit the states at play. In this case, one can pass a list for a given quantum number.
>>> state = A_QState(5, 2 ,2.5, m_j=[-2.5, -1.5, -0.5]) >>> print(rq.atom_utils.expand_single_qnum(state)) [(n=5, l=2, j=2.5, m_j=-2.5), (n=5, l=2, j=2.5, m_j=-1.5), (n=5, l=2, j=2.5, m_j=-0.5)]