operators.three_body_operators#
This module provides functions to define three body operators on the 3D lattice
Functions
|
Changes a three-body interaction in list format for a given L to a new L |
|
Computes the density cubed and normal ordered at a lattice site n |
|
Generates the leading-order short-range interaction defined in equation 13 |
|
Takes sparse 3-body interaction and converts it to a list |
- operators.three_body_operators.rho_cubed_NO(rho_n, mult, min_val, max_mem=0)#
Computes the density cubed and normal ordered at a lattice site n
- Parameters:
rho_n (scipy.sparse.coo_array) – Array storing the density at lattice site n
mult – Factor to scale the calculation by
min_val (float) – minimum value to be saved in the operator
max_mem (int) – Optional; Maximum memory size for the value array to get to before compressing into a sparse format. If left as 0, no limit to the memory will be set
- Returns:
The density operator squared and normal ordered, for V^{ij}_{kl}, it only stores i<j and k<l
- Return type:
scipy.sparse.csr_array
- operators.three_body_operators.shortRangeV_3body(lattice, myL, sL, sNL, c0, spin=2, isospin=2, verbose=False, min_val=0, max_mem=0, sites=None)#
Generates the leading-order short-range interaction defined in equation 13
- Parameters:
lattice (list[(int, int, int)]) – list of lattice sites returned by lattice.get_lattice
myL (int) – number of lattice sites in each direction
sL (float) – local smearing strength
sNL (float) – non-local smearing strength
c0 (float) – strength of the short range interaction in MeV
spin (int) – Optional; number of spin degrees of freedom
isospin (int) – Optional; number of isospin degrees of freedom
verbose (bool) – Optional; whether or not to print progress during calculation
max_mem – Optional; maximum memory for all of the temporary float arrays to take up before compressing into a sparse format. If set to 0, it will completely fill the array before compressing. NOTE: this utilizes a multiprocess to parallelize the loop over all sites, so the memory for each site will be max_mem / cpu_count and you should set the memory limit accordingly
sites (list[int,int,int]) – Optional; Give default value or None in order to compute the interaction at all sites, or give a list of sites in the format [i, j, k] to only compute it at the given sites
- Returns:
A sparse csr_array representing V^{abc}_{ijk} in MeV with the row indicies corresponding to a + b * spin*isospin*L^3 and column indices corresponding to i + j * spin*isospin*L^3
- Return type:
scipy.sparse.csr_array()
- operators.three_body_operators.sparse_to_list_3body(sparse_int, myL, spin=2, isospin=2)#
Takes sparse 3-body interaction and converts it to a list
- Parameters:
sparse_int (scipy.sparse.csr_array) – Interaction stored as a sparse matrix
myL (int) – number of lattice sites in each direction
spin (int) – Optional; number of spin degrees of freedom
isospin (int) – Optional; number of isospin degrees of freedom
- Returns:
list of lists [a,b,c,d,e,f,v] where a, b, c, d, e, and f are indices and v is the value for V^abc_def
- Return type:
list[[int, int, int, int, int, int float]]
- operators.three_body_operators.change_lat_3body(inter, origL, newL, spin=2, isospin=2)#
Changes a three-body interaction in list format for a given L to a new L
- Parameters:
inter (list[(int, int, int, int, int, int, float)]) – interaction stored as a list of lists [a,b,c,d,e,f,v] where a, b, c, and d are indices and v is the value for V^abc_def
origL (int) – original L for the basis of inter
newL (int) – new L to return the basis of inter
spin (int) – Optional; number of spin degrees of freedom
isospin (int) – Optional; number of isospin degrees of freedom
- Returns:
interaction in the basis of the new L in the same list format
- Return type:
list[(int, int, int, int, int, int, float)]