isqham.lattice package

Submodules

isqham.lattice.fermion module

exception FermionHamiltonianError

Bases: Exception

class SpinfulHamiltonian

Bases: object

set a general Hamiltonian: \(H=H_0+H_1\) where

\(H_0=\sum_{ij}\sum_{\sigma\sigma'} c^\dagger_{i\sigma} c_{j\sigma'}\) and \(H_1=\sum_{ijkl}\sum_{\alpha\beta\gamma\delta} c^\dagger_{i\alpha} c^\dagger_{j\beta} c_{k\gamma}c_{l\delta}\)

This Hamiltonian is made of SpinlessHamiltonian with mapping spin-up (spin-down) into even (odd) site.

exportPauliOperator(encoding)
setCoulombU(i, U)

\(U n_{i\uparrow} n_{i\downarrow}\)

Parameters:
  • i (int) – site index

  • U (float) – U

Return type:

self

setCoulombV1(i, j, V)

\(V n_i n_j\), where \(n_i = n_{i\uparrow} + n_{i\downarrow}\)

Parameters:
  • i (int) – site index

  • j (int) – site index

  • V (float) – V

setHopping(i, j, tij)

\(t_{ij} \sum_{i,j,\sigma} c^+_{i\sigma} c_{j\sigma} + h.c.\)

Parameters:
  • i (int) – site index.

  • j (int) – site index.

  • tij (complex) – _description_

setOnSiteEnergy(i, m)

\(m \sum_{\sigma} c^+_{i\sigma}c_{i\sigma}\)

Parameters:
  • i (_type_) – site index

  • m (_type_) – energy

Return type:

self

class SpinlessHamiltonian

Bases: object

set a general Hamiltonian: \(H=\sum_{ij} c^\dagger_i c_j +\sum_{ijkl} c^\dagger_i c^\dagger_j c_k c_l\)

exportPauliOperator(encoding)
getCountN()

count total number of sites

setCoulomb(i, j, U)

\(U n_i n_j\)

Parameters:
  • i (int) – site index

  • j (int) – site index

  • U (float) – U

setHopping(i, j, tij)

\(t_{ij} c^+_i c_j + h.c.\)

Parameters:
  • i (int) – site index

  • j (int) – site index

  • tij (complex) – hopping energy

setOnSiteEnergy(i, m)

\(m * n_i\)

Parameters:
  • i (int) – site index

  • m (float) – onsite energy

set_CC(i, j, val)
term:

v C_i C_j + h.c.

Parameters:
  • i (int) – site index

  • j (int) – site index

  • val (complex) – coefficient

set_CdC(i, j, val)
term:

v C^+_i C_j + h.c.

Parameters:
  • i (int) – site index

  • j (int) – site index

  • val (complex) – coefficient

set_CdCCdC(i, j, k, l, val)
term:

v C^+_i C_j C^+_k C_l + h.c.

Parameters:
  • i (int) – site index

  • j (int) – site index

  • k (int) – site index

  • l (int) – site index

  • val (complex) – coefficient

set_CdCdCC(i, j, k, l, val)
term:

v C^+_i C^+_j C_k C_l + h.c.

Parameters:
  • i (int) – site index

  • j (int) – site index

  • k (int) – site index

  • l (int) – site index

  • val (complex) – coefficient

isqham.lattice.fermionLattice module

exception FermionLatticeError

Bases: Exception

class Gt_exact(i, j, U)

Bases: object

expt(t)
get(t)
class IntegerMesh

Bases: object

static get_all_inside_parallelepiped(a1, a2, a3)

reture all integer points inside a parallelepiped which has one vertex at the origin and arms defined by a1,a2,a3. For 2D case, set a3=[0,0,1]. And for 1D case also set a2=[0,1,0].

Parameters:
  • a1 (int) – arms of parallelepiped

  • a2 (int) – arms of parallelepiped

  • a3 (int) – arms of parallelepiped

static iterateAround(pos)
static posInList(pos, posList)
class PrimaryLattice_HubbardModel(basis)

Bases: PrimaryLattice_SpinlessHamiltonian

PrimaryLattice of Hubbard model. Contains t,mu,U

setCoulombU(orbit_i, U)

\(U n_{R_0 i} n_{R_0 j}\)

Parameters:
  • orbit_i (int) – orbit index

  • U (float) – U

setHopping(R, orbit_i, orbit_j, tij)
setInterV(R, orbit_i, orbit_j, V)

\(V n_i n_j = V ( n_{i\uparrow} + n_{i\downarrow} ) ( n_{j\uparrow} + n_{j\downarrow} )\) where orbit_i is in current cluster and orbit_j is R

Parameters:
  • R (int) – R_j

  • orbit_i (int) – index of site

  • orbit_j (int) – index of site

  • V (float) – strength

Returns:

_description_

Return type:

_type_

Yields:

_type_ – _description_

setOnSide(orbit_i, m)
setOrbitPosition(idx, pos)
class PrimaryLattice_SpinlessHamiltonian(basis)

Bases: object

Set Hamiltonian of a lattice model. This class: * use lest effort to define the toplogy of a lattice Hamiltonian. * contains only connection topology, need not position information. BUT, we contains position information here. This class is a basic one for spinless fermion system.

exportLocalHamiltonian()

return a cluster Hamiltonian, will ignore non-local part

Return type:

SpinlessHamiltonian

getInteraction()
getNumOfSpinlessOrbit()
getOrbitPosition(idx)
getPositionOnLattice(index)
getPrimaryBasis()
getTmatrix(nOrbit=None)

return hopping terms

setCdC(R, i, j, tij)

\(t_{R_i i, R_j j} c^\dagger_{R_i i} c_{R_j j} + h.c.\) By default, \({R_i}\) is [0]*d. So one need only to give \(R_j\) by R.

Parameters:
  • R (int) – list of int. represent index of primary cell.

  • i (int) – index of orbit in current ([0]*d) cell.

  • j (int) – index of orbit in Rj

  • tij (complex) – hopping strength

setCdCCdC(R, i1, i2, j1, j2, v)

\(v c^\dagger_{R_i i_1} c_{R_i i_2} c^\dagger_{R_j j_1} c_{R_j j_2} + h.c.\) By default, \({R_i}\) is [0]*d. So one need only to give \(R_j\) by R.

Parameters:
  • R (int) – list, \({R_j}\): [int]*d

  • i1 (int) – index of orbit in current ([0]*d) cell.

  • i2 (int) – index of orbit in current ([0]*d) cell.

  • j1 (int) – index of orbit in Rj

  • j2 (int) – index of orbit in Rj

  • v (complex) – energy value

setCdCdCC(R, i1, i2, j1, j2, v)

\(v c^\dagger_{R_i i_1} c^\dagger_{R_i i_2} c_{R_j j_1} c_{R_j j_2} + h.c.\) By default, \({R_i}\) is [0]*d. So one need only to give \(R_j\) by R.

Parameters:
  • R (int) – list, \({R_j}\): [int]*d

  • i1 (int) – index of orbit in current ([0]*d) cell.

  • i2 (int) – index of orbit in current ([0]*d) cell.

  • j1 (int) – index of orbit in Rj

  • j2 (int) – index of orbit in Rj

  • v (complex) – energy value

setOrbitPosition(idx, pos)
class SuperLatticeHamiltonian(priHam, superLatticeIndex)

Bases: object

Make super-lattice Hamiltonian by PrimaryHamiltonian 只能计算14类格子中的7类: 简单(x5),三角(x1)和六角(x1)。拓扑上等价于简单立方。

Parameters:

priHam (PrimaryLattice_SpinlessHamiltonian)

abstractT_from_primaryH()
getAbsPositionOfOrbit(pid, oid)

_summary_

Parameters:
  • pid (int) – index of primary cell

  • oid (int) – index of orbit in primary cell

Returns:

absolute position of a given orbit in real space

Return type:

Vector

getCLusterSize()

\(V_{lattic}/V_{cell}\)

getNumOrbitInCell()

Total numer of (spinless) orbits in a primary cell (or say basis cell)

Returns:

number of orbits

Return type:

int

getOrbitIndexInSuperCell(pid, oid)
Parameters:
  • pid (int) – index of primary-cell

  • oid (int) – index of orbit in primary-cell

Returns:

orbit index in super-cell.

Return type:

int

getTq(q, index=None)

\(T_q=\sum_{\Delta}e^{i \boldsymbol{q} \cdot \boldsymbol{\Delta} } t(\Delta)\), where \(\Delta=\boldsymbol{R}-\boldsymbol{0}\)

Parameters:
  • q (list[int]) – k vector

  • index (list[int] | None, optional) – _description_. Defaults to None.

get_ClusterH()
Return type:

SpinlessHamiltonian

getDirectHam(U)
getHam(latticeHam)
getLatticeHam(U)
getSupH(U)

isqham.lattice.utils module

class VariableTypeChecker(ErrorException)

Bases: object

batchVariableMatch1Type(srcVals, desType, funName=None)
matchTypeRaiseError(srcVal, desType, funName=None)

Module contents