kinetic¶
Module: luescher_nd.hamiltonians.kinetic
Implementation of kinetic Hamiltonians
-
class
MomentumKineticHamiltonian(n1d, epsilon=1.0, mass=4.758, ndim=3, nstep=3, filter_out=None, filter_cutoff=None, _op=None)[source]¶ Kinetic Hamiltonian in momentum space
- Attributes
- n1d: int
Number of lattice sites in one dimension
- epsilon: float = 1.0
Lattice spacing in inverse fermi
- mass: float = 4.758
Particle mass in inverse fermi. Hamiltonina uses reduced mass
mu = m /2- ndim: int = 3
Number of dimensions
- nstep: Optional[int] = 3
Number of derivative steps. None corresponds to inifinte step derivative.
- filter_out: Optional[sp.csr_matrix] = None
Projection operator which must commute with the Hamiltonian. If specified, applies
H + cutoff * filter_outinstead ofH. Thus, eigenstates withfilter_out |psi> = |psi>are projected to larger energies.- filter_cutoff: Optional[float] = None
Size of the cutoff filter.
-
property
L¶ Lattice spacing time nodes in one direction
-
classmethod
exists_in_db(database, **export_kwargs)[source]¶ Filters the data base table if entries are present.
- Arguments
- database: str
Address of the database.
- export_kwargs: Dict[str, Any]
Columns to filter (equal).
- Return type
bool
-
export_eigs(database, overwrite=False, eigsh_kwargs=None, export_kwargs=None)[source]¶ Computes eigenvalues of hamiltonian and writes to database.
First checks if values are already present. If true, does nothing. However, it does not check how many levels are present. So if you want to compute more levels, set
overwritetoTrue.- Arguments
- database: str
Database name for export / import.
- overwrite: bool = False
Overwrite existing entries.
- eigsh_kwargs: Optional[Dict[str, Any]] = None
Arguments fed to
scipy.sparse.linalg.eigsh. Default arereturn_eigenvectors=Falseandwhich="SA". These cannot be changed.- export_kwargs: Optional[Dict[str, Any]] = None
Arguments fed to
table.get_or_create. This does not overwrite properties of the hamiltonian.
-
property
op¶ The matvec kernel of the Hamiltonian
- Return type
LinearOperator
-
property
p2¶ Returns momentum dispersion
-
get_kinetic_hamiltonian(n1d_max, lattice_spacing=1.0, particle_mass=4.758, ndim_max=3, derivative_shifts=None)[source]¶ Computes the kinetic Hamiltonian for a relative two-body system in a 3D box.
The kinetic Hamiltonian is defined by
H0 = - Laplace / 2 /(particle_mass/2)Where Laplace is the lattice laplace operator with twisted boundary conditions.The function uses scipy sparse matrices in column format.
- Parameters
n1d_max (
int) – Spatial dimension of lattice in any direction.lattice_spacing (
float) – The lattice spacing in fermi.particle_mass (
float) – The mass of the particles to be described in inverse fermi.ndim_max (
int) – The number of spatial dimensions.derivative_shifts (
Optional[Dict[int,float]]) –The implementation of the numerical laplace operator. E.g., for a one step derivative
where s_i and c_i are the keys and values of derivative_shifts.
If None, the shifts are defaulted to
{-1: 1.0, 0: -2.0, 1: 1.0}.
In the one-dimensional case, a simple discrete 1-step derivative for periodic boundary conditions is given by
$$ \frac{d^2 f(x = n \epsilon)}{dx^2} \rightarrow \frac{1}{\epsilon^2} \left[ f(n\epsilon + \epsilon) - 2 f(n\epsilon) + f(n\epsilon - \epsilon) \right] $$
where \(\epsilon\) is the lattice spacing.
For improved discrete derivative implementations (n-steps) see also finite difference coefficients.
The kinetic Hamiltonian in relative coordinates is computed by dividing the above expression by two times the reduced mass of the subsystem — in the case of equal mass particles, half the mass of individual particles.
The below implementation of the kinetic Hamiltonian is general in the number of dimensions and the implementation of the derivative. This is achieved by creating a meta index for coordinates:
where
nidescribe the index in each respective dimension.Taking the derivative in a respective direction adjusts the ni components. Because the grid is finite with boundary conditions, all ni are identified with their n1d_max modulus.
For example, when shifitng the y-coordinate in a three dimensional space by one lattice spacing becomes
The below kinetic Hamiltonian iterates over all dimensions and shifts to create a
n_max x n_maxmatrix withn_max = n1d_max ** ndim_max.- Return type
csr_matrix