C3

Class Methods

__init__(ket1, ket2)

check_for_resonances([required_overlap])

Check if states of the model space have strong resonances with states outside the model space.

copy()

Create a copy of the EffectiveSystemPair object (before it has been created).

get([unit])

Get the C3 coefficient of the pair interaction between the specified ket1 and ket2.

get_effective_basis()

Get the effective basis of the pair system.

get_effective_basisvectors()

Get the eigenvectors of the perturbative Hamiltonian.

get_effective_hamiltonian([return_order, unit])

Get the effective Hamiltonian of the pair system.

get_pair_energies([unit])

Get the pair energies of the ket tuples for infinite distance (i.e. no interaction).

set_angle([angle, unit])

Set the angle between the atoms in degrees.

set_delta_l(delta_l)

Set the delta_l value for single-atom basis.

set_delta_m(delta_m)

Set the delta_m value for single-atom basis.

set_delta_n(delta_n)

Set the delta_n value for single-atom basis.

set_diamagnetism_enabled([enable])

Enable or disable diamagnetism for the system.

set_distance(distance[, angle_degree, unit])

Set the distance between the atoms using the specified distance and angle.

set_distance_vector(distance[, unit])

Set the distance vector between the atoms.

set_electric_field(electric_field[, unit])

Set the electric field for the single-atom systems.

set_interaction_order(order)

Set the interaction order of the pair system.

set_magnetic_field(magnetic_field[, unit])

Set the magnetic field for the single-atom systems.

set_maximum_number_of_ket_pairs(number_of_kets)

Set the maximum number of ket pairs in the basis pair.

set_minimum_number_of_ket_pairs(number_of_kets)

Set the minimum number of ket pairs in the basis pair.

set_perturbation_order(order)

Set the perturbation order for the effective Hamiltonian.

Class Attributes and Properties

basis_atoms

The basis objects for the single-atom systems.

basis_pair

The basis pair object for the pair system.

diamagnetism_enabled

Whether diamagnetism is enabled for the single-atom systems.

distance_vector

The distance vector between the atoms in the pair system.

electric_field

The electric field for the single-atom systems.

interaction_order

The interaction order for the pair system.

ket_tuples

The tuples of kets, which form the model space for the effective Hamiltonian.

magnetic_field

The magnetic field for the single-atom systems.

model_inds

The indices of the corresponding KetPairs of the given ket_tuples in the basis of the pair system.

perturbation_order

The perturbation order for the effective Hamiltonian.

system_atoms

The system objects for the single-atom systems.

system_pair

The system pair object for the pair system.

class C3[source]

Class for calculating the C3 coefficient between two states.

Given two KetAtom objects ket1 and ket2, this class computes the C3 coefficient between |ket1, ket2> and |ket2, ket1>. This class also allows to set magnetic and electric fields similar to the SystemAtom class, as well as the angle between the two atoms like in the SystemPair class.

Examples

>>> import pairinteraction.real as pi
>>> from pairinteraction.perturbative import C3
>>> ket1 = pi.KetAtom("Rb", n=60, l=0, j=0.5, m=0.5)
>>> ket2 = pi.KetAtom("Rb", n=61, l=1, j=1.5, m=0.5)
>>> c3_obj = C3(ket1, ket2)
>>> c3 = c3_obj.get(unit="planck_constant * MHz * micrometer^3")
>>> print(f"{c3:.2f}")
-93.29
__init__(ket1, ket2)[source]
Parameters:
Return type:

None

property basis_atoms: tuple[BasisAtom[Any], BasisAtom[Any]]

The basis objects for the single-atom systems.

property basis_pair: BasisPair[Any, Any]

The basis pair object for the pair system.

check_for_resonances(required_overlap=0.9)

Check if states of the model space have strong resonances with states outside the model space.

Return type:

None

Parameters:

required_overlap (float)

copy()

Create a copy of the EffectiveSystemPair object (before it has been created).

Return type:

Self

Parameters:

self (Self)

property diamagnetism_enabled: bool

Whether diamagnetism is enabled for the single-atom systems.

property distance_vector: PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]

The distance vector between the atoms in the pair system.

property electric_field: PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]

The electric field for the single-atom systems.

get_effective_basis()

Get the effective basis of the pair system.

Return type:

BasisPair[Any, Any]

get_effective_basisvectors()

Get the eigenvectors of the perturbative Hamiltonian.

Return type:

csr_matrix

get_effective_hamiltonian(return_order=None, unit=None)

Get the effective Hamiltonian of the pair system.

Parameters:
  • return_order (Optional[int]) – The order of the perturbation to return. Default None, returns the sum up to the perturbation order set in the class.

  • unit (Optional[str]) – The unit in which to return the effective Hamiltonian. If None, returns a pint array.

Return type:

Union[ndarray[tuple[Any, ...], dtype[Any]], PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]]

Returns:

The effective Hamiltonian of the pair system in the given unit. If unit is None, returns a pint array, otherwise returns a numpy array.

get_pair_energies(unit=None)

Get the pair energies of the ket tuples for infinite distance (i.e. no interaction).

Parameters:

unit (Optional[str]) – The unit to which to convert the energies to. Default None will return a list of pint.Quantity.

Return type:

Union[list[float], list[PlainQuantity[float]]]

Returns:

The energies as list of float if a unit was given, otherwise as list of pint.Quantity.

property interaction_order: int

The interaction order for the pair system.

property ket_tuples: list[tuple[KetAtom, KetAtom] | Sequence[KetAtom]]

The tuples of kets, which form the model space for the effective Hamiltonian.

property magnetic_field: PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]

The magnetic field for the single-atom systems.

property model_inds: list[int]

The indices of the corresponding KetPairs of the given ket_tuples in the basis of the pair system.

property perturbation_order: int

The perturbation order for the effective Hamiltonian.

set_angle(angle=0, unit='degree')

Set the angle between the atoms in degrees.

Parameters:
  • angle (float) – The angle between the distance vector and the z-axis (by default in degrees). 90 degrees corresponds to the x-axis. Defaults to 0, which corresponds to the z-axis.

  • unit (Literal['degree', 'radian']) – The unit of the angle, either “degree” or “radian”, by default “degree”.

  • self (Self)

Return type:

Self

set_delta_l(delta_l)

Set the delta_l value for single-atom basis.

Return type:

Self

Parameters:
  • self (Self)

  • delta_l (int)

set_delta_m(delta_m)

Set the delta_m value for single-atom basis.

Return type:

Self

Parameters:
  • self (Self)

  • delta_m (int)

set_delta_n(delta_n)

Set the delta_n value for single-atom basis.

Return type:

Self

Parameters:
  • self (Self)

  • delta_n (int)

set_diamagnetism_enabled(enable=True)

Enable or disable diamagnetism for the system.

Parameters:
  • enable (bool) – Whether to enable or disable diamagnetism.

  • self (Self)

Return type:

Self

set_distance(distance, angle_degree=0, unit=None)

Set the distance between the atoms using the specified distance and angle.

Parameters:
  • distance (Union[float, PlainQuantity[float]]) – The distance to set between the atoms in the given unit.

  • angle_degree (float) – The angle between the distance vector and the z-axis in degrees. 90 degrees corresponds to the x-axis. Defaults to 0, which corresponds to the z-axis.

  • unit (Optional[str]) – The unit of the distance, e.g. “micrometer”. Default None expects a pint.Quantity.

  • self (Self)

Return type:

Self

set_distance_vector(distance, unit=None)

Set the distance vector between the atoms.

Parameters:
  • distance (Union[ndarray[tuple[Any, ...], dtype[Any]], Collection[float], PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]]) – The distance vector to set between the atoms in the given unit.

  • unit (Optional[str]) – The unit of the distance, e.g. “micrometer”. Default None expects a pint.Quantity.

  • self (Self)

Return type:

Self

set_electric_field(electric_field, unit=None)

Set the electric field for the single-atom systems.

Parameters:
  • electric_field (Union[PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]], ndarray[tuple[Any, ...], dtype[Any]], Collection[float]]) – The electric field to set for the systems.

  • unit (Optional[str]) – The unit of the electric field, e.g. “V/cm”. Default None expects a pint.Quantity.

  • self (Self)

Return type:

Self

set_interaction_order(order)

Set the interaction order of the pair system.

Parameters:
  • order (int) – The interaction order to set for the pair system. The order must be 3, 4, or 5.

  • self (Self)

Return type:

Self

set_magnetic_field(magnetic_field, unit=None)

Set the magnetic field for the single-atom systems.

Parameters:
  • magnetic_field (Union[PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]], ndarray[tuple[Any, ...], dtype[Any]], Collection[float]]) – The magnetic field to set for the systems.

  • unit (Optional[str]) – The unit of the magnetic field, e.g. “gauss”. Default None expects a pint.Quantity.

  • self (Self)

Return type:

Self

set_maximum_number_of_ket_pairs(number_of_kets)

Set the maximum number of ket pairs in the basis pair.

Parameters:
  • number_of_kets (int) – The maximum number of ket pairs to set in the basis pair.

  • self (Self)

Return type:

Self

set_minimum_number_of_ket_pairs(number_of_kets)

Set the minimum number of ket pairs in the basis pair.

Parameters:
  • number_of_kets (int) – The minimum number of ket pairs to set in the basis pair, by default we use 2000.

  • self (Self)

Return type:

Self

set_perturbation_order(order)

Set the perturbation order for the effective Hamiltonian.

Return type:

Self

Parameters:
  • self (Self)

  • order (int)

property system_atoms: tuple[SystemAtom[Any], SystemAtom[Any]]

The system objects for the single-atom systems.

property system_pair: SystemPair[Any]

The system pair object for the pair system.

get(unit=None)[source]

Get the C3 coefficient of the pair interaction between the specified ket1 and ket2.

Parameters:

unit (Optional[str]) – The unit in which to return the C3 coefficient. If None, returns a pint object.

Return type:

Union[float, PlainQuantity[float]]