C6

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 C6 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 C6[source]

Class for calculating the C6 coefficient for a two atom state |ket1, ket2>.

Given two KetAtom objects ket1 and ket2, this class computes the C6 coefficient for the pair state |ket1, ket2>. 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.

Note, that ket1 and ket2 must be either the same state or states of different species. If you want to calculate the C6 coefficient for two different states of the same species, we recommend using the EffectiveSystemPair class with the ket_tuples subspace [(ket1, ket2), (ket2, ket1)].

Examples

>>> import pairinteraction.real as pi
>>> from pairinteraction.perturbative import C6
>>> ket = pi.KetAtom("Rb", n=60, l=0, j=0.5, m=0.5)
>>> c6_obj = C6(ket, ket)
>>> c6 = c6_obj.get(unit="planck_constant * GHz * micrometer^6")
>>> print(f"{c6:.1f}")
138.9
__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 C6 coefficient of the pair interaction between the specified ket1 and ket2.

Parameters:

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

Return type:

Union[float, PlainQuantity[float]]