View source on GitHub |
One of the fundamental data structures in the fqe
fqe.fqe_data_set.FqeDataSet(
nele: int,
norb: int,
data: Dict[Tuple[int, int], 'FqeData']
) -> None
Methods
apply
apply(
array: Tuple[numpy.ndarray, ...]
) -> "FqeDataSet"
Applies an operator specified by the tuple of numpy arrays. The result will be returned as a FqeDataSet object. self is unchanged.
apply_individual_nbody
apply_individual_nbody(
coeff: complex,
daga: List[int],
undaga: List[int],
dagb: List[int],
undagb: List[int]
) -> "FqeDataSet"
Apply function with an individual operator represented in arrays, which can handle spin-nonconserving operators and returns the result
apply_inplace
apply_inplace(
array: Tuple[numpy.ndarray, ...]
) -> None
Applies an operator specified by the tuple of numpy arrays. The result will be kept in-place.
apply_inplace_individual_nbody
apply_inplace_individual_nbody(
coeff: complex,
daga: List[int],
undaga: List[int],
dagb: List[int],
undagb: List[int]
) -> None
Apply function with an individual operator represented in arrays, which can handle spin-nonconserving operators
ax_plus_y
ax_plus_y(
factor: complex,
other: "FqeDataSet"
) -> None
Performs :math:y = ax + y
with :math:y
being self.
The result will be kept inplace.
calculate_coeff_with_dvec
calculate_coeff_with_dvec(
dvec: Dict[Tuple[int, int], numpy.ndarray]
) -> Dict[Tuple[int, int], numpy.ndarray]
Generate
.. math:: C_I = \sum_J \langle I|a^\dagger_i aj|J \rangle D^J{ij}
calculate_dvec
calculate_dvec() -> Dict[Tuple[int, int], numpy.ndarray]
Generate, using self.coeff as C_I,
.. math:: D^{J}_{ij} = \sum_I \langle J|a^\dagger_i a_j|I \rangle C_I
calculate_dvec_fixed_j
calculate_dvec_fixed_j(
jorb: int
) -> Dict[Tuple[int, int], numpy.ndarray]
Generate, using self.coeff as C_I, for fixed j
.. math:: D^{J}_{ij} = \sum_I \langle J|a^\dagger_i a_j|I \rangle C_I
calculate_dvec_with_coeff
calculate_dvec_with_coeff(
data: Dict[Tuple[int, int], 'FqeData']
) -> Dict[Tuple[int, int], numpy.ndarray]
Generate
.. math:: D^{J}_{ij} = \sum_I \langle J|a^\dagger_i a_j|I \rangle C_I
calculate_dvec_with_coeff_fixed_j
calculate_dvec_with_coeff_fixed_j(
data: Dict[Tuple[int, int], 'FqeData'],
jorb: int
) -> Dict[Tuple[int, int], numpy.ndarray]
Generate, for fixed j,
.. math:: D^{J}_{ij} = \sum_I \langle J|a^\dagger_i a_j|I \rangle C_I
calculate_evec
calculate_evec(
dvec: Dict[Tuple[int, int], numpy.ndarray]
) -> Dict[Tuple[int, int], numpy.ndarray]
Generate
.. math:: E^{J}_{klij} = \sum_I \langle J|a^\dagger_k al|I \rangle D^I{ij}
evolve_inplace_individual_nbody
evolve_inplace_individual_nbody(
time: float,
coeff: complex,
daga: List[int],
undaga: List[int],
dagb: List[int],
undagb: List[int]
) -> None
This code time-evolves a wave function with an individual n-body generator
which is spin-nonconserving. It is assumed that :math:T^2 = 0
.
Using :math:TT = 0
and :math:TT^\dagger
is diagonal in the determinant
space, one could evaluate as
.. math:: \exp(-i(T+T^\dagger)t) &= 1 + i(T+T^\dagger)t - \frac{1}{2}(TT^\dagger + T^\dagger T)t^2
- i\frac{1}{6}(TT^\dagger T + T^\dagger TT^\dagger)t^3 + \cdots \\
&= -1 + \cos(t\sqrt{TT^\dagger}) + \cos(t\sqrt{T^\dagger T})
- iT\frac{\sin(t\sqrt{T^\dagger T})}{\sqrt{T^\dagger T} }
- iT^\dagger\frac{\sin(t\sqrt{TT^\dagger})}{\sqrt{TT^\dagger} }
fill
fill(
value: complex
) -> None
Fills all of the data to the value specified
rdm1
rdm1(
bra: Optional['FqeDataSet'] = None
) -> Tuple[numpy.ndarray]
Computes 1-particle RDMs. When bra is specified, it computes a transition RDM
rdm12
rdm12(
bra: Optional['FqeDataSet'] = None
) -> Tuple[numpy.ndarray, numpy.ndarray]
Computes 1- and 2-particle RDMs. When bra is specified, it computes a transition RDMs
rdm123
rdm123(
bra: Optional['FqeDataSet'] = None,
dvec: numpy.ndarray = None,
dvec2: numpy.ndarray = None,
evec2: numpy.ndarray = None
) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]
Computes 1-, 2-, and 3-particle RDMs. When bra is specified, it computes a transition RDMs
rdm1234
rdm1234(
bra: Optional['FqeDataSet'] = None
) -> Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray, numpy.ndarray]
Computes 1-, 2-, 3-, and 4-particle RDMs. When bra is specified, it computes a transition RDMs
scale
scale(
factor: complex
) -> None
Scales all of the data by the factor specified