GreenTensorFreeSpace
Class Methods
|
Create a Green tensor for two atoms in free space. |
|
|
|
|
|
Set the relative permittivity of the system. |
Class Attributes and Properties
- class GreenTensorFreeSpace[source]
Green tensor for two atoms in free space.
Examples
>>> from pairinteraction.green_tensor import GreenTensorFreeSpace >>> gt = GreenTensorFreeSpace([0, 0, 0], [10, 0, 0], unit="micrometer") >>> transition_energy = 2 # h * GHz >>> gt_dipole_dipole = gt.get(1, 1, transition_energy, "planck_constant * GHz") >>> print(f"{gt_dipole_dipole[0, 0]:.2f}") -4.79 / bohr
- __init__(pos1, pos2, unit=None, static_limit=False, interaction_order=3)[source]
Create a Green tensor for two atoms in free space.
- Parameters:
pos1 (
ndarray[tuple[Any,...],dtype[Any]] |Collection[float] |PlainQuantity[ndarray[tuple[Any,...],dtype[Any]]] |Collection[float|PlainQuantity[float]]) – Position of the first atom in the given unit.pos2 (
ndarray[tuple[Any,...],dtype[Any]] |Collection[float] |PlainQuantity[ndarray[tuple[Any,...],dtype[Any]]] |Collection[float|PlainQuantity[float]]) – Position of the second atom in the given unit.unit (
str|None) – The unit of the distance, e.g. “micrometer”. Default None expects a pint.Quantity.static_limit (
bool) – If True, the static limit is used. Default False.interaction_order (
int) – The order of interaction, e.g., 3 for dipole-dipole. Defaults to 3.
- Return type:
None
- set_relative_permittivity(epsilon)[source]
Set the relative permittivity of the system.
- Parameters:
epsilon (
complex|Callable[[PlainQuantity[float]],complex]) – The relative permittivity (dimensionless) of the free space. Default is 1.- Return type:
Self
- get(kappa1, kappa2, transition_energy, transition_energy_unit=None, unit=None, *, scaled=False)
- Overloads:
self, kappa1 (int), kappa2 (int), transition_energy (float | PintFloat), transition_energy_unit (str | None), unit (None), scaled (bool) → PintArray
self, kappa1 (int), kappa2 (int), transition_energy (float), transition_energy_unit (str), unit (str), scaled (bool) → NDArray
self, kappa1 (int), kappa2 (int), transition_energy (PintFloat), unit (str), scaled (bool) → NDArray
- Parameters:
kappa1 (int)
kappa2 (int)
transition_energy (float | PlainQuantity[float])
transition_energy_unit (str | None)
unit (str | None)
scaled (bool)
- Return type:
PlainQuantity[ndarray[tuple[Any, …], dtype[Any]]] | ndarray[tuple[Any, …], dtype[Any]]
Calculate the Green tensor in cartesian coordinates for the given ranks kappa1, kappa2 and frequency omega.
kappa = 1 corresponds to dipole operator with the cartesian basis: [x, y, z]
- Parameters:
kappa1 (
int) – The rank of the first multipole operator.kappa2 (
int) – The rank of the second multipole operator.transition_energy (
float|PlainQuantity[float]) – The transition energy at which to evaluate the Green tensor. Only needed if the Green tensor is frequency dependent.transition_energy_unit (
str|None) – The unit of the transition energy. Default None, which means that the transition energy must be given as pint object.unit (
str|None) – The unit to which to convert the result. Default None, which means that the result is returned as pint object.scaled (
bool) – If True, the Green tensor is returned with the prefactor for the interaction already included (the unit has to be adopted accordingly). Default False, which means that the bare Green tensor is returned.
- Returns:
The Green tensor as a 2D array in cartesian coordinates.
- Return type:
PlainQuantity[ndarray[tuple[Any, …], dtype[Any]]] | ndarray[tuple[Any, …], dtype[Any]]
- get_interpolator(transition_energies=None, transition_energies_unit=None, *, use_real)
- Overloads:
self, use_real (bool) → GreenTensorInterpolator
self, transition_energies (Collection[PintFloat] | PintArray), transition_energies_unit (None), use_real (bool) → GreenTensorInterpolator
self, transition_energies (Collection[float] | NDArray), transition_energies_unit (str), use_real (bool) → GreenTensorInterpolator
- Parameters:
transition_energies (Collection[PlainQuantity[float]] | PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]] | Collection[float] | ndarray[tuple[Any, ...], dtype[Any]] | None)
transition_energies_unit (str | None)
use_real (bool)
- Return type:
Get a GreenTensorInterpolator from this Green tensor.
The GreenTensorInterpolator can be used for the interaction of a SystemPair.
- Returns:
A GreenTensorInterpolator that interpolates the Green tensor at given frequency points.
- Parameters:
transition_energies (Collection[PlainQuantity[float]] | PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]] | Collection[float] | ndarray[tuple[Any, ...], dtype[Any]] | None)
transition_energies_unit (str | None)
use_real (bool)
- Return type:
- epsilon: complex | Callable[[PlainQuantity[float]], complex]