EffectiveSystemPair
Class Methods
|
|
|
Check if states of the model space have strong resonances with states outside the model space. |
|
Create a copy of the EffectiveSystemPair object (before it has been created). |
Get the effective basis of the pair system. |
|
Get the eigenvectors of the perturbative Hamiltonian. |
|
|
Get the effective Hamiltonian of the pair system. |
|
Get the pair energies of the ket tuples for infinite distance (i.e. no interaction). |
|
Set the angle between the atoms in degrees. |
|
Set the delta_l value for single-atom basis. |
|
Set the delta_m value for single-atom basis. |
|
Set the delta_n value for single-atom basis. |
|
Enable or disable diamagnetism for the system. |
|
Set the distance between the atoms using the specified distance and angle. |
|
Set the distance vector between the atoms. |
|
Set the electric field for the single-atom systems. |
|
Set the interaction order of the pair system. |
|
Set the magnetic field for the single-atom systems. |
|
Set the maximum number of ket pairs in the basis pair. |
|
Set the minimum number of ket pairs in the basis pair. |
|
Set the perturbation order for the effective Hamiltonian. |
Class Attributes and Properties
The basis objects for the single-atom systems. |
|
The basis pair object for the pair system. |
|
Whether diamagnetism is enabled for the single-atom systems. |
|
The distance vector between the atoms in the pair system. |
|
The electric field for the single-atom systems. |
|
The interaction order for the pair system. |
|
The tuples of kets, which form the model space for the effective Hamiltonian. |
|
The magnetic field for the single-atom systems. |
|
The indices of the corresponding KetPairs of the given ket_tuples in the basis of the pair system. |
|
The perturbation order for the effective Hamiltonian. |
|
The system objects for the single-atom systems. |
|
The system pair object for the pair system. |
- class EffectiveSystemPair[source]
Class for creating an effective SystemPair object and calculating the effective Hamiltonian.
Given a subspace spanned by tuples of KetAtom objects (ket_tuples), this class automatically generates appropriate BasisAtom, SystemAtom objects as well as a BasisPair and SystemPair object to calculate the effective Hamiltonian in the subspace via perturbation theory.
This class also allows to set magnetic and electric fields similar to the SystemAtom class, as well as the angle and distance between the two atoms like in the SystemPair class.
Examples
>>> import pairinteraction.real as pi >>> from pairinteraction.perturbative import EffectiveSystemPair >>> ket_atoms = { ... "+": pi.KetAtom("Rb", n=59, l=0, j=0.5, m=0.5), ... "0": pi.KetAtom("Rb", n=58, l=1, j=1.5, m=1.5), ... "-": pi.KetAtom("Rb", n=58, l=0, j=0.5, m=0.5), ... } >>> ket_tuples = [ ... (ket_atoms["+"], ket_atoms["-"]), ... (ket_atoms["0"], ket_atoms["0"]), ... (ket_atoms["-"], ket_atoms["+"]), ... ] >>> eff_system = EffectiveSystemPair(ket_tuples) >>> eff_system = eff_system.set_distance(10, angle_degree=45, unit="micrometer") >>> eff_h = eff_system.get_effective_hamiltonian(unit="MHz") >>> eff_h -= np.eye(3) * eff_system.get_pair_energies("MHz")[1] >>> print(np.round(eff_h, 0), "MHz") [[292. 3. 0.] [ 3. 0. 3.] [ 0. 3. 292.]] MHz
- copy()[source]
Create a copy of the EffectiveSystemPair object (before it has been created).
- Return type:
Self
- Parameters:
self (Self)
- property ket_tuples: list[tuple[KetAtom, KetAtom] | Sequence[KetAtom]]
The tuples of kets, which form the model space for the effective Hamiltonian.
- property perturbation_order: int
The perturbation order for the effective Hamiltonian.
- set_perturbation_order(order)[source]
Set the perturbation order for the effective Hamiltonian.
- Return type:
Self
- Parameters:
self (Self)
order (int)
- property basis_atoms: tuple[BasisAtom[Any], BasisAtom[Any]]
The basis objects for the single-atom systems.
- set_delta_n(delta_n)[source]
Set the delta_n value for single-atom basis.
- Return type:
Self
- Parameters:
self (Self)
delta_n (int)
- set_delta_l(delta_l)[source]
Set the delta_l value for single-atom basis.
- Return type:
Self
- Parameters:
self (Self)
delta_l (int)
- set_delta_m(delta_m)[source]
Set the delta_m value for single-atom basis.
- Return type:
Self
- Parameters:
self (Self)
delta_m (int)
- property system_atoms: tuple[SystemAtom[Any], SystemAtom[Any]]
The system objects for the single-atom systems.
- property electric_field: PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]
The electric field for the single-atom systems.
- set_electric_field(electric_field, unit=None)[source]
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
- property magnetic_field: PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]
The magnetic field for the single-atom systems.
- set_magnetic_field(magnetic_field, unit=None)[source]
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
- property diamagnetism_enabled: bool
Whether diamagnetism is enabled for the single-atom systems.
- set_diamagnetism_enabled(enable=True)[source]
Enable or disable diamagnetism for the system.
- Parameters:
enable (
bool
) – Whether to enable or disable diamagnetism.self (Self)
- Return type:
Self
- get_pair_energies(unit=None)[source]
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.
- set_minimum_number_of_ket_pairs(number_of_kets)[source]
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_maximum_number_of_ket_pairs(number_of_kets)[source]
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
- property system_pair: SystemPair[Any]
The system pair object for the pair system.
- property interaction_order: int
The interaction order for the pair system.
- set_interaction_order(order)[source]
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
- property distance_vector: PlainQuantity[ndarray[tuple[Any, ...], dtype[Any]]]
The distance vector between the atoms in the pair system.
- set_distance(distance, angle_degree=0, unit=None)[source]
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)[source]
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_angle(angle=0, unit='degree')[source]
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
- get_effective_hamiltonian(return_order=None, unit=None)[source]
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_effective_basisvectors()[source]
Get the eigenvectors of the perturbative Hamiltonian.
- Return type:
csr_matrix
- get_effective_basis()[source]
Get the effective basis of the pair system.
- Return type:
BasisPair
[Any
,Any
]
- property model_inds: list[int]
The indices of the corresponding KetPairs of the given ket_tuples in the basis of the pair system.