isqham.greenfunction package

Submodules

isqham.greenfunction.LatticeGreen module

exception LattGreenFuncError

Bases: Exception

class LatticeGreenFunction(GZ, supH)

Bases: object

Parameters:
getDensityOfState(kPoints, OmegaPoints, eta, kMesh, index=None)
return a 2D Matrix.

horizontal: k points vertical: \(\omega\) points. max at top, min at bottom

Parameters:
  • kPoints (list[Vector]) – representative points

  • OmegaPoints (list[float]) – list of \(\omega\)

  • eta (float) – artificial broadening

  • kMesh (list | int) – How many sampling point between each two k-points. If input int, used for all. If input list, length must match kPoints to represent each mesh, that is len(kMesh)=len(kPoints)-1.

  • index (list[int])

Returns:

2D array, can be used for plot directly

Return type:

Matrix

getDensityOfState_batchK(kPoints, OmegaPoints, eta, index=None)
return a 2D Matrix.

horizontal: k points vertical: \(\omega\) points. max at top, min at bottom

Parameters:
  • kPoints (list[Vector]) – k-points

  • OmegaPoints (list[float]) – list of \(\omega\)

  • eta (float) – artificial broadening

  • index (list[int])

Returns:

2D array, can be used for plot directly

Return type:

Matrix

getGkList(k, zList=None, GcList=None, index=None)

\(g(\boldsymbol{k},\omega) = \frac{1}{L} \sum_{ij} e^{-i \boldsymbol{k}\cdot \boldsymbol{k}( \boldsymbol{x}_i - \boldsymbol{x}_j )} G_{ij}(\boldsymbol{k},\omega)\) where

\(L\) is the size of the cluster

Parameters:
  • k (Vector) – position in k-space

  • zList (list[complex] | None, optional) – defines \(\omega+i\eta\). Defaults to None.

  • GcList (list[Matrix] | None, optional) – Matrix of Green’s function of the reference cluster. It is a list because of different omega.

  • index (list[int] | None, optional) – The calculation can only include part of orbitals. \(index\) defines the set of orbits of consideration.

Returns:

Green’s function in 1st Brillouin zone.

Return type:

complex

getGqMatrix(q, GcInv, index=None)

\(\boldsymbol{G}^{-1}(\boldsymbol{q},\omega)=\boldsymbol{G}^{-1}_{\text{cluster}}(\boldsymbol{q},\omega)-\boldsymbol{T}_{\boldsymbol{q}}\)

Parameters:
  • q (Vector) – k vector

  • GcInv (Matrix) – inverse matrix of the matrix of Green’s function of a single cluster

  • index (list[int] | None, optional) – if None, dim(G) = size of super cell.

Returns:

_description_

Return type:

Matrix

getGqMatrixList(q, zList=None, GcList=None, index=None)

Generate list of Gq matrix. One need to input zList or GcList, NOT both. This subroution is used to consider different \(\omega. Notice that z =:math:\)omega+ieta`

Parameters:
  • q (Vector) – _description_

  • zList (list | None, optional) – defines \(\omega+i\eta\). Defaults to None.

  • GcList (list[Matrix] | None, optional) – Cluster Green’s function. Defaults to None.

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

Returns:

_description_

Return type:

list[Matrix]

isqham.greenfunction.frequencyGreenf module

class GreenFuncZ(tMax, tN, rGObj)

Bases: object

\(G_{ij}(z) = \int^{t_{Max}}_0 dt e^{izt} G_{ij}(t)\)

Parameters:
  • tMax (float) – upper limit for integration

  • tN (int) – Num of points for integration

  • rGObj (RetardedGreenFunction) – _description_

G_Omega(i, j, OmegaList, eta)
Gz(i, j, zList)
GzMatrix(zList, index)

[G(z1),G(z2),…] where each G(zi) is a LxL matrix.

Parameters:
  • zList (list) – z for G(z)

  • index (list) – The range of i and j for G_{ij}. The length should be L.

Return type:

list

isqham.greenfunction.retardedGreenfunction module

class RetardedGreenFunction(H, N, circuit_cls, ground_state, shots=1024)

Bases: object

Parameters:
EPEP_PEPE(Pi, i, Pj, j, Tlist)
G(i, j, Tlist)
GI(i, j, Tlist)
GR(i, j, Tlist)
etaGF(i, j, Tlist, eta)

isqham.greenfunction.utils module

class ControlledPauliGate(circuit_cls, P, control)

Bases: object

Parameters:
  • P (list[int])

  • control (int)

ControlledPauliGate(control)
Parameters:

control (int)

property circuit
class Exp_Ts(hamiltonian, circuit_cls, t, N)

Bases: object

Parameters:
property circuit
deployEXP_H_tau()
deploy_expH_TS()
evolutionU(r, k)
evolutionU_onlyZ(r, k)

exp(-i * r * Z ⊗ … ⊗ Z)

evolution_of_each_term_in_Hamiltonian(xi, k)
class GaussLegendreIntegration

Bases: object

generate sampling points for integration

directGenerate_xw0(n)
get_cache_xw0(n)
getzw(n, z1, z2)

majorly use this function

Parameters:
  • n (int) – number of points

  • z1 (float/complex) – start point

  • z2 (float/complex) – end point

Returns:

list of x and w

Return type:

(x,w)

itgFunCache(n, z1, z2, funCache, expr)
itgFunc(n, z1, z2, func)
static legendreP(N, x)
static zerosOfLegendre(N)

find zeros of legendre polynomial P_N(x)

Parameters:

N (int) – order N

Returns:

zeros

Return type:

list

Module contents