We're celebrating World Quantum Day 2022! Join us

fqe.sparse_hamiltonian.SparseHamiltonian

The Sparse Hamiltonian is characterized by having only one or a few

Inherits From: Hamiltonian

elements which are non-zero. This can provide advantages for certain operations where single element access is preferred.

operators Operator with a coefficient in the FermionOperator format.
conserve_spin Whether or not to conserve the Sz symmetry.
e_0 Scalar part of the Hamiltonian.

Methods

calc_diag_transform

View source

Performs a unitary digaonlizing transformation of the one-body term and returns that transformation.

conserve_number

View source

Returns True if the Hamiltonian is number conserving, else False.

diag_values

View source

Returns the diagonal values packed into a single dimension.

diagonal

View source

Returns True if the Hamiltonian is diagonal, else False.

diagonal_coulomb

View source

Returns True if the Hamiltonian is diagonal coloumb, else False.

dim

View source

Dim is the orbital dimension of the Hamiltonian arrays. This function should not be used with SparseHamiltonian

e_0

View source

Returns the scalar potential of the Hamiltonian.

iht

View source

Return the matrices of the Hamiltonian prepared for time evolution.

Args
time The time step.

is_individual

View source

Returns if this Hamiltonian consists of an individual operator plus its Hermitian conjugate.

nterms

View source

Returns the number of non-zero elements in the Hamiltonian.

quadratic

View source

Returns True if the Hamiltonian is quadratic, else False.

rank

View source

Returns the rank of the largest tensor.

tensors

View source

Returns all tensors in order of their rank.

terms

View source

Returns the operators that comprise the SparseHamiltonian.

terms_hamiltonian

View source

Returns a list of all SparseHamiltonian operator terms.

transform

View source

Tranform the one body term using the provided matrix.

Args
trans Unitary transformation.

Returns
Transformed one-body Hamiltonian as a numpy.ndarray.