pythtb.TBModel.hamiltonian#
- TBModel.hamiltonian(k_pts=None, flatten_spin_axis=False, **params)[source]#
Generate the Bloch Hamiltonian of the tight-binding model.
The Hamiltonian is computed in tight-binding convention I, which includes phase factors associated with orbital positions in the hopping terms:
\[H_{ij}(\mathbf{k}) = \sum_{\mathbf{R}} H_{ij}(\mathbf{R}) \exp[i \mathbf{k} \cdot (\mathbf{R} + \boldsymbol{\tau}_j - \boldsymbol{\tau}_i)]\]where \(H_{ij}(\mathbf{R})\) is the hopping amplitude from orbital \(j\) in the cell displaced by \(\mathbf{R}\) to orbital \(i\) in the home cell, and \(\boldsymbol{\tau}_i\) is the position of orbital \(i\) within the unit cell. The Hamiltonian is Hermitian by construction.
Added in version 2.0.0.
- Parameters:
- k_pts(Nk, dim_k) list or numpy.ndarray of floats or None, optional
Array of k-points in reduced coordinates. Shape must be
(Nk, dim_k). If None, the Hamiltonian is computed at a single point (dim_k = 0), corresponding to a finite sample.- flatten_spin_axisbool, optional
If True, the spin indices are flattened into the orbital indices. This results in a Hamiltonian of shape
(..., norb*nspin, norb*nspin). If False (default), the Hamiltonian has shape(..., norb, nspin, norb, nspin).- **params
Keyword arguments mapping parameter names to value(s). Each value can be a scalar or a 1D array of values. If any values are array-like, the Hamiltonian is evaluated at all combinations of parameter values, and the final array is stacked with the k-axis leading, followed by each parameter axis in the order of given parameter names.
- Returns:
- hamnumpy.ndarray
Array of Bloch-Hamiltonian matrices defined on the specified k-points. The Hamiltonian is Hermitian by construction. The shape of the returned array depends on the presence of k-points and spin:
Spinless models:
(..., norb, norb)Spinful models:
(..., norb, nspin, norb, nspin)ifflatten_spin_axis=False, or(..., norb*nspin, norb*nspin)ifflatten_spin_axis=True.dim_k > 0:(n_kpts, ...)dim_k = 0: no k-point axis.Parameter sweeps:
(n_kpts, n_param1, n_param2, ...)parameter axes are added after the k-point axis (if present).
See also
velocityCompute the derivatives of the Hamiltonian with respect to k and parameters.
k_uniform_meshGenerate a uniform k-point mesh for periodic systems.
k_pathGenerate a k-point path for band structure calculations.
Notes
In convention I, the Hamiltonian satisfies:
\[H(k) \neq H(k + G), \quad \text{but instead} \quad H(k) = U H(k + G) U^{\dagger}\]where \(G\) is a reciprocal lattice vector and \(U\) is a unitary transformation relating the two.
Examples
Compute Hamiltonian at a single k-point for a finite model:
>>> ham = tb_model.hamiltonian()
Compute Hamiltonian at multiple k-points for a periodic model:
>>> k_points = tb_model.k_uniform_mesh([10, 10]) >>> ham_k = tb_model.hamiltonian(k_pts=k_points)
Compute Hamiltonian while sweeping over a parameter:
>>> model = TBModel(lattice, spinful=False) >>> model.set_hop('t1', 0, 1, [0, 0]) >>> k_points = model.k_uniform_mesh([5, 5]) >>> ham_param = tb_model.hamiltonian(k_pts=k_points, t1=[0.0, 1.0, 2.0])