qib.operator.molecular_hamiltonian.MolecularHamiltonian

class qib.operator.molecular_hamiltonian.MolecularHamiltonian(field: Field, c: float, tkin, vint, symm: MolecularHamiltonianSymmetry)[source]

Bases: AbstractOperator

Molecular Hamiltonian in second quantization formulation, using physicists’ convention for the interaction term (note ordering of k and ell):

\[H = c + \sum_{i,j} t_{i,j} a^{\dagger}_i a_j + \frac{1}{2} \sum_{i,j,k,\ell} v_{i,j,k,\ell} a^{\dagger}_i a^{\dagger}_j a_{\ell} a_k\]

Methods

as_field_operator

Represent the Hamiltonian as FieldOperator.

as_matrix

Generate the (sparse) matrix representation of the Hamiltonian.

fields

List of fields the Hamiltonian acts on.

is_hermitian

Whether the Hamiltonian is Hermitian.

is_unitary

Whether the Hamiltonian is unitary.

Attributes

nsites

Number of underlying lattice sites.

num_orbitals

Number of orbitals (same as number of underlying lattice sites).

__init__(field: Field, c: float, tkin, vint, symm: MolecularHamiltonianSymmetry)[source]

Initialize the Hamiltonian by its kinetic and interaction term coefficients.

as_field_operator()[source]

Represent the Hamiltonian as FieldOperator.

as_matrix()[source]

Generate the (sparse) matrix representation of the Hamiltonian.

fields()[source]

List of fields the Hamiltonian acts on.

is_hermitian()[source]

Whether the Hamiltonian is Hermitian.

is_unitary()[source]

Whether the Hamiltonian is unitary.

property nsites: int

Number of underlying lattice sites.

property num_orbitals: int

Number of orbitals (same as number of underlying lattice sites).