pauxy.systems package

Submodules

pauxy.systems.generic module

class pauxy.systems.generic.Generic(nelec=None, h1e=None, chol=None, ecore=None, inputs={}, verbose=False)[source]

Bases: object

Generic system defined by ab-initio Hamiltonian.

Can be created by either passing the one and two electron integrals directly or initialised from integrals stored in QMCPACK hdf5 format. If initialising from file the `inputs’ optional dictionary should be populated.

Parameters:
  • nelec (tuple) – Number of alpha and beta electrons.
  • h1e (:class:`numpy.ndarray’) – One-electron integrals. Optional. Default: None.
  • chol (:class:`numpy.ndarray’) – Factorized 2-electron integrals of shape (naux, nbasis, nbasis). Optional. Default: None.
  • ecore (float) – Core energy.
  • inputs (dict) – Input options defined below.
  • nup (int) – Number of up electrons.
  • ndown (int) – Number of down electrons.
  • integrals (string) – Path to file containing one- and two-electron integrals in QMCPACK format.
  • threshold (float) – Cutoff for cholesky decomposition or minimum eigenvalue.
  • verbose (bool) – Print extra information.
H1

One-body part of the Hamiltonian. Spin-dependent by default.

Type:numpy.ndarray
ecore

Core contribution to the total energy.

Type:float
h1e_mod

Modified one-body Hamiltonian.

Type:numpy.ndarray
chol_vecs

Cholesky vectors.

Type:numpy.ndarray
nchol

Number of cholesky vectors.

Type:int
nfields

Number of auxiliary fields required.

Type:int
sparse_cutoff

Screen out integrals below this threshold. Optional. Default 0.

Type:float
cplx_chol

Force setting of interpretation of cholesky decomposition. Optional. Default False, i.e. real/complex factorization determined from cholesky integrals.

Type:bool
construct_h1e_mod()[source]
construct_integral_tensors_cplx(trial)[source]
construct_integral_tensors_real(trial)[source]
hijkl(i, j, k, l)[source]
read_integrals()[source]
write_integrals(filename='hamil.h5')[source]

pauxy.systems.hubbard module

Hubbard model specific classes and methods

class pauxy.systems.hubbard.Hubbard(inputs, verbose=False)[source]

Bases: object

Hubbard model system class.

1 and 2 case with nearest neighbour hopping.

Parameters:inputs (dict) – dictionary of system input options.
nup

Number of up electrons.

Type:int
ndown

Number of down electrons.

Type:int
ne

Number of electrons.

Type:int
t

Hopping parameter.

Type:float
U

Hubbard U interaction strength.

Type:float
nx

Number of x lattice sites.

Type:int
ny

Number of y lattice sites.

Type:int
nbasis

Number of single-particle basis functions.

Type:int
T

Hopping matrix

Type:numpy.array
gamma

Super matrix (not currently implemented).

Type:numpy.array
construct_h1e_mod()[source]
fcidump(to_string=False)[source]

Dump 1- and 2-electron integrals to file.

Parameters:to_string (bool) – Return fcidump as string. Default print to stdout.
pauxy.systems.hubbard.decode_basis(nx, ny, i)[source]

Return cartesian lattice coordinates from basis index.

Consider a 3x3 lattice then we index lattice sites like:

(0,2) (1,2) (2,2)       6 7 8
(0,1) (1,1) (2,1)  ->   3 4 5
(0,0) (1,0) (2,0)       0 1 2

i.e., i = i_x + n_x * i_y, and i_x = i%n_x, i_y = i//nx.

Parameters:
  • nx (int) – Number of x lattice sites.
  • ny (int) – Number of y lattice sites.
  • i (int) – Basis index (same for up and down spins).
pauxy.systems.hubbard.ek(t, k, kc, ny)[source]

Calculate single-particle energies.

Parameters:
  • t (float) – Hopping amplitude.
  • k (numpy array) – Kpoint.
  • kc (float) – Scaling factor.
  • ny (int) – Number of y lattice points.
pauxy.systems.hubbard.encode_basis(i, j, nx)[source]

Encode 2d index to one dimensional index.

See decode basis for layout.

Parameters:
  • i (int) – x coordinate.
  • j (int) – y coordinate
  • nx (int) – Number of x lattice sites.
Returns:

ix – basis index.

Return type:

int

pauxy.systems.hubbard.get_strip(cfunc, cfunc_err, ix, nx, ny, stag=False)[source]
pauxy.systems.hubbard.kinetic(t, nbasis, nx, ny, ks)[source]

Kinetic part of the Hamiltonian in our one-electron basis.

Parameters:
  • t (float) – Hopping parameter
  • nbasis (int) – Number of one-electron basis functions.
  • nx (int) – Number of x lattice sites.
  • ny (int) – Number of y lattice sites.
Returns:

T – Hopping Hamiltonian matrix.

Return type:

numpy.array

pauxy.systems.hubbard.kinetic_pinning(t, nbasis, nx, ny)[source]

Kinetic part of the Hamiltonian in our one-electron basis.

Adds pinning fields as outlined in [Qin16]. This forces periodic boundary conditions along x and open boundary conditions along y. Pinning fields are applied in the y direction as:

\[\nu_{i\uparrow} = -\nu_{i\downarrow} = (-1)^{i_x+i_y}\nu_0,\]

for \(i_y=1,L_y\) and \(\nu_0=t/4\).

Parameters:
  • t (float) – Hopping parameter
  • nbasis (int) – Number of one-electron basis functions.
  • nx (int) – Number of x lattice sites.
  • ny (int) – Number of y lattice sites.
Returns:

T – Hopping Hamiltonian matrix.

Return type:

numpy.array

pauxy.systems.hubbard.kinetic_pinning_alt(t, nbasis, nx, ny)[source]

Kinetic part of the Hamiltonian in our one-electron basis.

Adds pinning fields as outlined in [Qin16]. This forces periodic boundary conditions along x and open boundary conditions along y. Pinning fields are applied in the y direction as:

\[\nu_{i\uparrow} = -\nu_{i\downarrow} = (-1)^{i_x+i_y}\nu_0,\]

for \(i_y=1,L_y\) and \(\nu_0=t/4\).

Parameters:
  • t (float) – Hopping parameter
  • nbasis (int) – Number of one-electron basis functions.
  • nx (int) – Number of x lattice sites.
  • ny (int) – Number of y lattice sites.
Returns:

T – Hopping Hamiltonian matrix.

Return type:

numpy.array

pauxy.systems.hubbard.kpoints(t, nx, ny)[source]

Construct kpoints for system.

Parameters:
  • t (float) – Hopping amplitude.
  • nx (int) – Number of x lattice sites.
  • nx – Number of y lattice sites.
Returns:

  • kp (numpy array) – System kpoints Note these are not sorted according to eigenvalue energy but rather so as to conform with numpys default kpoint indexing for FFTs.
  • kfac (float) – Kpoint scaling factor (2pi/L).
  • eigs (numpy array) – Single particle eigenvalues associated with kp.

pauxy.systems.hubbard.transform_matrix(nbasis, kpoints, kc, nx, ny)[source]

pauxy.systems.utils module

pauxy.systems.utils.get_system(sys_opts=None, verbose=0, chol_cut=1e-05)[source]

Wrapper to select system class

Parameters:
  • sys_opts (dict) – System input options.
  • verbose (bool) – Output verbosity.
Returns:

system – System class.

Return type:

object

Module contents