GreenTensorCavity
Class Methods
|
Create a Green tensor for two atoms inside a planar cavity formed by two infinite surfaces. |
|
|
|
|
|
Set the relative permittivities of the system. |
Class Attributes and Properties
- class GreenTensorCavity[source]
Green tensor for two atoms in a cavity (between two infinite planar surfaces).
Examples
>>> from pairinteraction.green_tensor import GreenTensorCavity >>> gt = GreenTensorCavity([0, 0, 0], [10, 0, 0], z1=-5, z2=5, 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}") -3.84 / bohr
- __init__(pos1, pos2, z1, z2, unit=None, static_limit=False, interaction_order=3)[source]
Create a Green tensor for two atoms inside a planar cavity formed by two infinite surfaces.
The two surfaces of the cavity are assumed to be infinite in the x-y plane. If not specified otherwise (see set_relative_permittivities), the surfaces are treated as perfect mirrors.
- 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.z1 (
float|PlainQuantity[float]) – The z-position of the first surface in the given unit.z2 (
float|PlainQuantity[float]) – The z-position of the second surface 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
- surface1_epsilon: complex | Callable[[PlainQuantity[float]], complex]
- surface2_epsilon: complex | Callable[[PlainQuantity[float]], complex]
- set_relative_permittivities(epsilon, epsilon1, epsilon2)[source]
Set the relative permittivities of the system.
- Parameters:
epsilon (
complex|Callable[[PlainQuantity[float]],complex]) – The relative permittivity (dimensionless) of the medium inside the cavity.epsilon1 (
complex|Callable[[PlainQuantity[float]],complex]) – The relative permittivity (dimensionless) of the first surface.epsilon2 (
complex|Callable[[PlainQuantity[float]],complex]) – The relative permittivity (dimensionless) of the second surface.
- 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]