View source on GitHub |
The Restricted Hamiltonian is characterized by having identical alpha
Inherits From: Hamiltonian
fqe.restricted_hamiltonian.RestrictedHamiltonian(
tensors: Tuple[np.ndarray, ...],
e_0: complex = (0.0 + 0.0j)
) -> None
and beta terms and no alpha/beta mixing blocks. An example is non-relativistic molecular Hamiltonians in the RHF basis
Arguments | |
---|---|
tensors
|
Variable length tuple containg between one and four numpy.arrays of increasing rank. The tensors contain the n-body hamiltonian elements. Tensors up to the highest order must be included even if the lower terms are full of zeros. |
e_0
|
Scalar potential associated with the Hamiltonian. |
Methods
calc_diag_transform
calc_diag_transform() -> np.ndarray
Performs a unitary digaonlizing transformation of the one-body term and returns that transformation.
conserve_number
conserve_number() -> bool
Returns True if the Hamiltonian is number conserving, else False.
diag_values
diag_values() -> np.ndarray
Returns the diagonal values packed into a single dimension.
diagonal
diagonal() -> bool
Returns True if the Hamiltonian is diagonal, else False.
diagonal_coulomb
diagonal_coulomb() -> bool
Returns True if the Hamiltonian is diagonal coloumb, else False.
dim
dim() -> int
Returns the orbital dimension of the Hamiltonian arrays.
e_0
e_0()
Returns the scalar potential of the Hamiltonian.
iht
iht(
time: float
) -> Tuple[np.ndarray, ...]
Return the matrices of the Hamiltonian prepared for time evolution.
Args | |
---|---|
time
|
The time step. |
quadratic
quadratic() -> bool
Returns True if the Hamiltonian is quadratic, else False.
rank
rank()
Returns the rank of the largest tensor.
tensor
tensor(
rank: int
) -> np.ndarray
Returns a single nbody tensor based on its rank.
Args | |
---|---|
rank
|
Indexes the single nbody tensor to return. |
tensors
tensors() -> Tuple[np.ndarray, ...]
Returns all tensors in order of their rank.
transform
transform(
trans: np.ndarray
) -> np.ndarray
Tranform the one body term using the provided matrix.
Args | |
---|---|
trans
|
Unitary transformation. |
Returns | |
---|---|
Transformed one-body Hamiltonian as a numpy.ndarray. |