gen_excitations#

gen_excitations(root, light_names, parts, meths=None)[source]#

Generate excitation tree, filter it and retain only resonant pathways.

Parameters:
  • root (KetBra) – Initial rovibrational state.

  • light_names (List[str]) – Names of EM fields, length sets the number of excitations.

  • parts (List[str]) – Which sides of density matrix to excite at each step. If None, first excitation is ket-side and all the rest are from both sides.

  • meths (Sequence[Callable] | None) – Each callable in the list must take a KetBra argument and return a KetBra.

Returns:

Root of the excitation tree.

Return type:

KetBra

See also

multi_excite

Examples

>>> from molspecutils.molecule import DiatomState
>>> root = pw.KetBra(DiatomState(0, 1), DiatomState(0, 1))
>>> gen_excitations(root, ['omg1', 'omg2', 'omg3'], ['ket', 'both', 'both'], meths=[pw.only_interstates])