Occupation-based Hamiltonians#

Pariser-Parr-Pople(PPP) Hamiltonian model#

This model is used to describe molecules with π orbitals.

class HamPPP(connectivity: list | ndarray, alpha=-0.414, beta=-0.0533, u_onsite=None, gamma=None, charges=None, sym=1, atom_dictionary=None, bond_dictionary=None, orbital_overlap=None)#

Pariser-Parr-Pople Hamiltonian.

__init__(connectivity: list | ndarray, alpha=-0.414, beta=-0.0533, u_onsite=None, gamma=None, charges=None, sym=1, atom_dictionary=None, bond_dictionary=None, orbital_overlap=None)#

Initialize Pariser-Parr-Pople Hamiltonian.

Parameters:
  • connectivity (list, np.ndarray) – list of tuples that specifies sites and bonds between them or symmetric np.ndarray of shape (n_sites, n_sites) that specifies the connectivity between sites. For example, for a linear chain of 4 sites, the connectivity can be specified as [(C1, C2, 1), (C2, C3, 1), (C3, C4, 1)]

  • alpha (float) – specifies the site energy if all sites are equivalent. Default value is the 2p-pi orbital of Carbon

  • beta (float) – specifies the resonance energy, hopping term, if all bonds are equivalent. The default value is appropriate for a pi-bond between Carbon atoms

  • u_onsite (np.ndarray) – on-site Coulomb interaction; 1d np.ndarray

  • gamma (np.ndarray) – parameter that specifies long-range Coulomb interaction; 2d

  • charges (np.ndarray) – Charges on sites; 1d np.ndarray

  • sym (int) – symmetry of the Hamiltonian: int [1, 2, 4, 8]. Default is 1

Notes

The Hamiltonian is given by:

\[\begin{split}\begin{align} \hat{H}_{\mathrm{PPP}\mathrm{P}} &= \sum_{pq}h_{pq} a_{p}^{\dagger}a_{q} \\ &+ \sum_{p} U_{p} \hat{n}_{p \alpha} \hat{n}_{p\beta} \\ &+ \frac{1}{2}\sum_{p\neq q}\gamma_{pq}\left(\hat{n}_{p\alpha} + \hat{n}_{p \beta}-Q_{p}\right) \left(\hat{n}_{q \alpha}+\hat{n}_{q\beta}-Q_{q}\right) \end{align}\end{split}\]
generate_one_body_integral(basis: str, dense: bool)#

Generate one body integral in spatial or spin orbital basis.

Parameters:
  • basis (str) – [‘spatial’, ‘spin orbital’]

  • dense (bool) – dense or sparse matrix; default False

Return type:

scipy.sparse.csr_matrix or np.ndarray

generate_two_body_integral(basis: str, dense: bool, sym=1)#

Generate two body integral in spatial or spinorbital basis.

Parameters:
  • basis (str) – [‘spatial’, ‘spin orbital’]

  • dense (bool) – dense or sparse matrix; default False

  • sym (int) – symmetry – [2, 4, 8] default is 1

Return type:

scipy.sparse.csr_matrix or np.ndarray

generate_zero_body_integral()#

Generate zero body integral.

Return type:

float

Example Usage: The example shown below is a linear chain of 4 carbon atoms (butadiene).

import numpy as np
from moha import HamPPP

# Define connectivity as a list of tuples: (site1, site2, bond_type)
connectivity = [('C1', 'C2', 1), ('C2', 'C3', 1), ('C3', 'C4', 1)]
gamma = np.array([
        [1.92, 1.00, 0.60, 0.41],
        [1.00, 1.92, 0.91, 0.60],
        [0.60, 0.91, 1.92, 1.00],
        [0.41, 0.60, 1.00, 1.92]])
charges = np.array([1, 1, 1, 1])
ppp = HamPPP(connectivity=connectivity, gamma=gamma, charges=charges, u_onsite=np.array([1, 1, 1, 1]))
H = ppp.generate_one_body_integral(basis='spatial basis', dense=True)

print("One-body Integral Matrix of Pariser-Parr-Pople Hamiltonian model:\n", H)

Hubbard Hamiltonian model#

The Hubbard model is a simplified version of the PPP model with gamma being 0.

class HamHub(connectivity: list | ndarray, alpha=-0.414, beta=-0.0533, u_onsite=None, sym=1, atom_types=None, atom_dictionary=None, bond_dictionary=None, orbital_overlap=None, Bz=None, gamma=None)#

Hubbard Hamiltonian.

The Hubbard model corresponds to choosing $gamma_{pq} = 0$ It can be invoked by choosing gamma = 0 from PPP hamiltonian.

__init__(connectivity: list | ndarray, alpha=-0.414, beta=-0.0533, u_onsite=None, sym=1, atom_types=None, atom_dictionary=None, bond_dictionary=None, orbital_overlap=None, Bz=None, gamma=None)#

Hubbard Hamiltonian.

Parameters:
  • connectivity (list, np.ndarray) – list of tuples that specifies sites and bonds between them or symmetric np.ndarray of shape (n_sites, n_sites) that specifies the connectivity between sites. For example, for a linear chain of 4 sites, the connectivity can be specified as [(C1, C2, 1), (C2, C3, 1), (C3, C4, 1)]

  • alpha (float) – specifies the site energy if all sites are equivalent. Default value is the 2p-pi orbital of Carbon

  • beta (float) – specifies the resonance energy, hopping term, if all bonds are equivalent. The default value is appropriate for a pi-bond between Carbon atoms

  • u_onsite (np.ndarray) – on-site Coulomb interaction; 1d np.ndarray

  • sym (int) – symmetry of the Hamiltonian: int [1, 2, 4, 8]. Default is 1

Notes

The Hamiltonian is given by:

\[\hat{H}_{\mathrm{PPP}\mathrm{P}} = \sum_{pq}h_{pq} a_{p}^{\dagger}a_{q} + \sum_{p} U_{p} \hat{n}_{p \alpha} \hat{n}_{p\beta}\]

Example Usage:

import numpy as np
from moha import HamHub

connectivity = [('C1', 'C2', 1), ('C2', 'C3', 1), ('C3', 'C4', 1)]
hub = HamHub(connectivity=connectivity, u_onsite = np.array([1, 1, 1, 1]))
H = hub.generate_one_body_integral(basis='spatial basis', dense=True)

print("One-body Integral Matrix of Hubbard Hamiltonian model:\n", H)

Huckel Hamiltonian model#

The Huckel model is another simplified Hamiltonian model with U_onsite and gamma both being 0.

class HamHuck(connectivity: list | ndarray, alpha=-0.414, beta=-0.0533, sym=1, atom_dictionary=None, bond_dictionary=None)#

Huckel Hamiltonian.

It can be invoked by choosing u_onsite = None from Hubbard hamiltonian.

__init__(connectivity: list | ndarray, alpha=-0.414, beta=-0.0533, sym=1, atom_dictionary=None, bond_dictionary=None)#

Huckel hamiltonian.

Parameters:
  • connectivity (list, np.ndarray) – list of tuples that specifies sites and bonds between them or symmetric np.ndarray of shape (n_sites, n_sites) that specifies the connectivity between sites. For example, for a linear chain of 4 sites, the connectivity can be specified as [(C1, C2, 1), (C2, C3, 1), (C3, C4, 1)]

  • alpha (float) – specifies the site energy if all sites are equivalent. Default value is the 2p-pi orbital of Carbon

  • beta (float) – specifies the resonance energy, hopping term, if all bonds are equivalent. The default value is appropriate for a pi-bond between Carbon atoms

  • sym (int) – symmetry of the Hamiltonian: int [1, 2, 4, 8]. Default is 1

Notes

The Hamiltonian is given by:

\[\hat{H}_{\mathrm{PPP}\mathrm{P}} = \sum_{pq}h_{pq} a_{p}^{\dagger}a_{q}\]

Example Usage:

import numpy as np
from moha import HamHuck

connectivity = [('C1', 'C2', 1), ('C2', 'C3', 1), ('C3', 'C4', 1)]
huckel = HamHuck(connectivity=connectivity)
H = huckel.generate_one_body_integral(basis='spatial basis', dense=True)

print("One-body Integral Matrix of Huckel Hamiltonian model:\n", H)