StatePair
Class Methods
|
Initialize a state object representing a ket in a given basis. |
|
|
Return the coefficients of the state as a 1d-array. |
|
Return the ket corresponding to the state (i.e. the ket with the maximal overlap). |
|
Return the index of the ket corresponding to the state (i.e. the ket with the maximal overlap). |
|
|
Return the ket at the given index. |
|
Label representing the state. |
|
|
|
Class Attributes and Properties
Return a list containing the kets of the basis. |
|
Return the norm of the state. |
|
Return the number of kets in the basis. |
- class StatePair[source]
Pair state of two atoms.
Currently StatePair objects don’t offer any additional functionality.
- __init__(ket, basis)[source]
Initialize a state object representing a ket in a given basis.
- Parameters:
ket (
KetPair) – The ket to represent in the state.basis (
Any) – The basis to which the state belongs.
- Return type:
None
- get_label(stop_after_num_kets=3, stop_after_accumulated_overlap=0.95, considered_num_kets=None)[source]
Label representing the state.
- Parameters:
stop_after_num_kets (
int) – Maximum number of kets to include in the label.stop_after_accumulated_overlap (
float) – Stop including kets in the label, if the accumulated overlap of the included kets exceeds this value.considered_num_kets (
int|None) – The number of kets to consider in the pair basis. Default None uses a heuristic to determine a suitable number of kets.
- Return type:
str- Returns:
The label of the ket in the given format.
- get_matrix_element(other, *args, **kwargs)[source]
- Return type:
Any- Parameters:
other (Any)
args (Any)
kwargs (Any)
- get_coefficients()
Return the coefficients of the state as a 1d-array.
The coefficients are stored in a numpy.array with shape (number_of_kets,).
The coefficients are normalized, i.e. the sum of the absolute values of the coefficients is equal to 1.
- Return type:
pairinteraction.units.NDArray
- get_corresponding_ket()
Return the ket corresponding to the state (i.e. the ket with the maximal overlap).
- Return type:
TypeVar(KetType, bound= KetBase)
- get_corresponding_ket_index()
Return the index of the ket corresponding to the state (i.e. the ket with the maximal overlap).
- Return type:
int
- get_ket(index)
Return the ket at the given index.
- Return type:
TypeVar(KetType, bound= KetBase)- Parameters:
index (int)
- property kets: list[KetType]
Return a list containing the kets of the basis.
- property norm: floating
Return the norm of the state.
- property number_of_kets: int
Return the number of kets in the basis.