TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
triqs::experimental::lattice::tb_hk

#include <triqs/experimental/lattice/tb_hk.hpp>

Detailed Description

Tight-binding Hamiltonian \( H(\mathbf{k}) \) on a 3D lattice.

A tight-binding Hamiltonian is defined by a set of lattice vectors \( \mathbf{R} \) and the associated hopping (overlap) matrices \( t(\mathbf{R}) \) between orbitals. It represents

\[ H(\mathbf{k}) = \sum_\mathbf{R} t(\mathbf{R}) \, e^{2 \pi i \, \mathbf{k} \cdot \mathbf{R}} \; , \]

and provides access to the hopping matrices, band energies and eigenvectors at a list of k-points, comparison, stream output and HDF5 serialization.

Definition at line 40 of file tb_hk.hpp.

Inheritance diagram for triqs::experimental::lattice::tb_hk:
triqs::experimental::lattice::fourier_polynomial< 2, 3 >

Public Types

using eigenvectors_t = std::pair<nda::array<double, 2>, nda::array<dcomplex, 3>>
 Type used for returning eigenvectors.

Public Member Functions

 tb_hk ()
 Default constructor: a single zero hopping matrix for the lattice vector at the origin.
 tb_hk (fourier_polynomial< 2, 3 > fp)
 Construct a tight-binding Hamiltonian from an existing matrix-valued Fourier polynomial.
 tb_hk (std::vector< std::array< long, 3 > > Rs, std::vector< nda::array< dcomplex, 2 > > hoppings)
 Construct a tight-binding Hamiltonian from lattice vectors and their hopping matrices.
nda::array< double, 2 > eigenvalues (nda::array_view< double, 2 > k) const
 Compute the band-basis energies of \( H(\mathbf{k}) \) for a list of k-points.
eigenvectors_t eigenvectors (nda::array_view< double, 2 > k) const
 Compute the band-basis energies and eigenvectors of \( H(\mathbf{k}) \) for a list of k-points.
auto elements ()
 Get a lazy range over the (R-vector, hopping-matrix) pairs.
auto elements () const
 Get a lazy range over the (R-vector, hopping-matrix) pairs (const overload).
std::vector< std::array< long, 3 > > get_R_list () const
 Get the list of real-space lattice vectors.
auto hoppings ()
 Get a lazy range over the hopping matrices, one per R-vector.
auto hoppings () const
 Get a lazy range over the hopping matrices, one per R-vector (const overload).
long n_orbitals () const
 Get the number of orbitals, i.e. the dimension of the Hamiltonian matrices.
bool operator== (tb_hk const &tb) const
 Equal-to comparison operator.
Public Member Functions inherited from triqs::experimental::lattice::fourier_polynomial< 2, 3 >
 fourier_polynomial ()=default
 Default constructor: construct an empty Fourier polynomial.
auto get_coeff_arr ()
 Get the packed coefficient array.
long get_R_idx (std::array< long, kdim > R) const
 Get the storage index of a given R-vector.
auto const & get_R_list () const
 Get the list of real-space lattice vectors.
auto const & get_R_mat () const
 Get the packed matrix of lattice vectors.
long n_R () const
 Get the number of R-vectors.
auto operator() (T... ks) const
 Evaluate the Fourier polynomial, optionally as a lazy CLEF expression.
fourier_polynomialoperator= (fourier_polynomial const &)=default
 Copy assignment operator.
auto operator[] (std::array< long, kdim > R)
 Access the coefficient associated with a given R-vector.

Static Public Member Functions

static std::string hdf5_format ()
 Get the HDF5 format tag.
Static Public Member Functions inherited from triqs::experimental::lattice::fourier_polynomial< 2, 3 >
static std::string hdf5_format ()
 Get the HDF5 format tag.

Friends

void h5_read (h5::group g, std::string const &name, tb_hk &tb)
 Read a tight-binding Hamiltonian from HDF5.
void h5_write (h5::group g, std::string const &name, tb_hk const &tb)
 Write a tight-binding Hamiltonian to HDF5.
std::ostream & operator<< (std::ostream &out, tb_hk const &tb)
 Write a tight-binding Hamiltonian to a std::ostream.

Additional Inherited Members

Protected Member Functions inherited from triqs::experimental::lattice::fourier_polynomial< 2, 3 >
void h5_read_impl (h5::group g, std::string const &name, char const *exp_format)
 HDF5 read helper for derived classes: reads R_list and coeff_arr in place; rebuilds R_mat.
void h5_write_impl (h5::group g, std::string const &name, char const *format) const
 HDF5 write helper for derived classes: writes R_list and coeff_arr under the given format tag.
Protected Attributes inherited from triqs::experimental::lattice::fourier_polynomial< 2, 3 >
nda::array< dcomplex, coeff_dim+1 > coeff_arr
 Packed Fourier coefficients, of shape [nR, coeff_shape...].
std::vector< std::array< long, kdim > > R_list
 Lattice vectors \( \mathbf{R} \) as integer arrays.
nda::matrix< double > R_mat
 Lattice vectors as doubles, of shape [nR, kdim], for BLAS.

Constructor & Destructor Documentation

◆ tb_hk() [1/2]

triqs::experimental::lattice::tb_hk::tb_hk ( std::vector< std::array< long, 3 > > Rs,
std::vector< nda::array< dcomplex, 2 > > hoppings )
inline

Construct a tight-binding Hamiltonian from lattice vectors and their hopping matrices.

Parameters
RsList of lattice vectors \( \mathbf{R} \).
hoppingsList of hopping (overlap) matrices \( t(\mathbf{R}) \), one per lattice vector.

Definition at line 56 of file tb_hk.hpp.

◆ tb_hk() [2/2]

triqs::experimental::lattice::tb_hk::tb_hk ( fourier_polynomial< 2, 3 > fp)
inline

Construct a tight-binding Hamiltonian from an existing matrix-valued Fourier polynomial.

Parameters
fpMatrix-valued Fourier polynomial to wrap as a tight-binding Hamiltonian.

Definition at line 69 of file tb_hk.hpp.

Member Function Documentation

◆ eigenvalues()

nda::array< double, 2 > triqs::experimental::lattice::tb_hk::eigenvalues ( nda::array_view< double, 2 > k) const

Compute the band-basis energies of \( H(\mathbf{k}) \) for a list of k-points.

For each k-point the Hamiltonian is diagonalized and the resulting energies are returned in the band basis:

\[ H_{k,mn} = U_{\mathbf{k},ma}^\dagger \left( \sum_j t(\mathbf{R}_j)_{ab} e^{2 \pi i \mathbf{k} \cdot \mathbf{R}_j} \right) U_{\mathbf{k},nb} \; , \]

with lattice vectors \( \{\mathbf{R}_j\} \) and associated overlap (hopping) matrices \( \{t(\mathbf{R}_j)_{ab}\} \).

The k-points must be given in units of the reciprocal lattice vectors (from 0 to 1).

Parameters
kk-points as an array of shape [nk, 3] in units of the reciprocal lattice vectors.
Returns
Band-basis energies as a real matrix of shape [nk, nbands].

Definition at line 36 of file tb_hk.cpp.

◆ eigenvectors()

std::pair< nda::array< double, 2 >, nda::array< dcomplex, 3 > > triqs::experimental::lattice::tb_hk::eigenvectors ( nda::array_view< double, 2 > k) const

Compute the band-basis energies and eigenvectors of \( H(\mathbf{k}) \) for a list of k-points.

For each k-point the Hamiltonian is diagonalized and both the band energies and the eigenvectors are returned:

\[ H_{k,mn} = U_{\mathbf{k},ma}^\dagger \left( \sum_j t(\mathbf{R}_j)_{ab} e^{2 \pi i \mathbf{k} \cdot \mathbf{R}_j} \right) U_{\mathbf{k},nb} \; , \]

with lattice displacements \( \{\mathbf{R}_j\} \) and associated overlap (hopping) matrices \( \{t(\mathbf{R}_j)_{ab}\} \).

The k-points must be given in units of the reciprocal lattice vectors (from 0 to 1).

Parameters
kk-points as an array of shape [nk, 3] in units of the reciprocal lattice vectors.
Returns
Tuple containing the band-basis energies as a real matrix of shape [nk, nbands] and the complex eigenvectors as an array of shape [nk, nbands, nOrbitals].

Definition at line 46 of file tb_hk.cpp.

◆ elements() [1/2]

auto triqs::experimental::lattice::tb_hk::elements ( )
inlinenodiscard

Get a lazy range over the (R-vector, hopping-matrix) pairs.

Returns
Lazy range of tuples \( (\mathbf{R}, t(\mathbf{R})) \) pairing each lattice vector with its hopping matrix.

Definition at line 102 of file tb_hk.hpp.

◆ elements() [2/2]

auto triqs::experimental::lattice::tb_hk::elements ( ) const
inlinenodiscard

Get a lazy range over the (R-vector, hopping-matrix) pairs (const overload).

Returns
Lazy range of tuples \( (\mathbf{R}, t(\mathbf{R})) \) pairing each lattice vector with its hopping matrix.

Definition at line 109 of file tb_hk.hpp.

◆ get_R_list()

std::vector< std::array< long, 3 > > triqs::experimental::lattice::tb_hk::get_R_list ( ) const
inlinenodiscard

Get the list of real-space lattice vectors.

Returns
List of real-space lattice vectors \( \mathbf{R} \).

Definition at line 95 of file tb_hk.hpp.

◆ hdf5_format()

std::string triqs::experimental::lattice::tb_hk::hdf5_format ( )
inlinestaticnodiscard

Get the HDF5 format tag.

Returns
HDF5 format tag of a tight-binding Hamiltonian.

Definition at line 202 of file tb_hk.hpp.

◆ hoppings() [1/2]

auto triqs::experimental::lattice::tb_hk::hoppings ( )
inlinenodiscard

Get a lazy range over the hopping matrices, one per R-vector.

Returns
Range over the hopping matrices \( t(\mathbf{R}) \), one per lattice vector.

Definition at line 77 of file tb_hk.hpp.

◆ hoppings() [2/2]

auto triqs::experimental::lattice::tb_hk::hoppings ( ) const
inlinenodiscard

Get a lazy range over the hopping matrices, one per R-vector (const overload).

Returns
Range over the hopping matrices \( t(\mathbf{R}) \), one per lattice vector.

Definition at line 85 of file tb_hk.hpp.

◆ n_orbitals()

long triqs::experimental::lattice::tb_hk::n_orbitals ( ) const
inlinenodiscard

Get the number of orbitals, i.e. the dimension of the Hamiltonian matrices.

Returns
Number of orbitals.

Definition at line 115 of file tb_hk.hpp.

◆ operator==()

bool triqs::experimental::lattice::tb_hk::operator== ( tb_hk const & tb) const
inline

Equal-to comparison operator.

Two tight-binding Hamiltonians are equal if they have the same list of lattice vectors and the same hopping coefficients.

Parameters
tbTight-binding Hamiltonian to compare with.
Returns
true if both Hamiltonians are equal, false otherwise.

Definition at line 169 of file tb_hk.hpp.

◆ h5_read

void h5_read ( h5::group g,
std::string const & name,
tb_hk & tb )
friend

Read a tight-binding Hamiltonian from HDF5.

Parameters
gh5::group to be read from.
nameName of the subgroup.
tbTight-binding Hamiltonian to be read into.

Definition at line 220 of file tb_hk.hpp.

◆ h5_write

void h5_write ( h5::group g,
std::string const & name,
tb_hk const & tb )
friend

Write a tight-binding Hamiltonian to HDF5.

Parameters
gh5::group to be written to.
nameName of the subgroup.
tbTight-binding Hamiltonian to be written.

Definition at line 211 of file tb_hk.hpp.

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
tb_hk const & tb )
friend

Write a tight-binding Hamiltonian to a std::ostream.

Prints the number of lattice vectors and the orbital dimension, and, for small Hamiltonians (fewer than 12 lattice vectors), the hopping matrix associated with each lattice vector.

Parameters
outstd::ostream object.
tbTight-binding Hamiltonian to be written.
Returns
Reference to the std::ostream object.

Definition at line 185 of file tb_hk.hpp.


The documentation for this class was generated from the following files: