View source on GitHub |
One-body diagonal Hamiltonian class. Diagonal Hamiltonians are defined as
Inherits From: Hamiltonian
fqe.diagonal_hamiltonian.Diagonal(
hdiag: "Nparray",
e_0: complex = (0.0 + 0.0j)
) -> None
those that are diagonal in the Slater determinant space, namely,
.. math:: \langle I|\hat{H}|J\rangle = pI \delta{IJ}
where I and J are Slater determinants, and p is some phase. Generally such Hamiltonians can be written as
.. math:: \hat{H} = = E_0 + \sumr h{rr} a_r^\dagger a_r
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 whether or not the Hamiltonian is diagonal.
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
) -> "Diagonal"
Returns the matrices of the Hamiltonian prepared for time evolution.
Args | |
---|---|
time
|
The time step. |
quadratic
quadratic() -> bool
Returns whether or not the Hamiltonian is quadratic.
rank
rank() -> int
Returns the rank of the largest tensor.
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. |