field.Field
field.Field(
label='',
index=0,
coupled_levels=None,
factors=None,
detuning=0.0,
detuning_positive=True,
counter_propagating=False,
factor_doppler_shift=None,
rabi_freq=1.0,
rabi_freq_t_func=None,
rabi_freq_t_args=None,
)Field object to address the OBAtom object, describing the atomic levels coupled, detuning and Rabi frequency function.
Attributes
| Name | Type | Description |
|---|---|---|
| label | string | a name for the field e.g. “probe”. |
| index | int | index of the field, to reference within an OBAtom. |
| coupled_levels | list | pairs of levels coupled by the field. e.g. [[0,1], [0,2]] |
| factors | list | List of strength factors for each pair in coupled levels. |
| detuning | float | detuning of the fields from resonance with the coupled_levels transitions. |
| detuning_positive | bool | is the detuning positive? |
| counter_propagating | bool | if True, this field travels in the opposite direction to the forward-propagating solver direction. Sets factor_doppler_shift = -1.0. Orthogonal to detuning_positive. |
| factor_doppler_shift | float | multiplier applied to the thermal detuning Delta for each velocity class. Default 1.0 (co-propagating). Set to -1.0 for a counter-propagating field, or to an arbitrary float for schemes where wavelength differences matter (e.g. a three-photon ladder where k-vector magnitudes differ). |
| rabi_freq | float | Rabi frequency of the field on the transition. |
| rabi_freq_t_func | func | Time-dependency of rabi_freq as function of time f(t, args) |
| rabi_freq_t_args | dict | arguments to be passed to rabi_freq_t_func. |
Methods
| Name | Description |
|---|---|
| get_json_dict | Return a dict representation of the Field object to be dumped to |
| lower_levels | Return the unique lower (ground) level indices coupled by this field. |
| to_json_str | Return a JSON string representation of the Field object. |
| upper_levels | Return the unique upper (excited) level indices coupled by this field. |
get_json_dict
field.Field.get_json_dict()Return a dict representation of the Field object to be dumped to JSON.
Note
For the rabi_freq_t_func attribute generated with build_rabi_freq_t_func, a suffix for the index will have been added. We remove that. e.g. e.g. ramp_onoff_0 -> ramp_onoff
lower_levels
field.Field.lower_levels()Return the unique lower (ground) level indices coupled by this field.
Returns
| Name | Type | Description |
|---|---|---|
| list[int] | Sorted list of unique indices c[0] from coupled_levels. |
to_json_str
field.Field.to_json_str()Return a JSON string representation of the Field object.
Returns
| Name | Type | Description |
|---|---|---|
| str | (string) JSON representation of the Field object. |
upper_levels
field.Field.upper_levels()Return the unique upper (excited) level indices coupled by this field.
Returns
| Name | Type | Description |
|---|---|---|
| list[int] | Sorted list of unique indices c[1] from coupled_levels. |