pythtb.TBModel.position_matrix#
- TBModel.position_matrix(evecs, pos_dir)[source]#
Position operator matrix elements
Returns matrix elements of the position operator along direction
pos_dirfor eigenvectorsevecsat a single k-point. Position operator is defined in reduced coordinates.The returned object \(X\) is
\[X_{m n {\bf k}}^{\alpha} = \langle u_{m {\bf k}} \vert r^{\alpha} \vert u_{n {\bf k}} \rangle\]Here \(r^{\alpha}\) is the position operator along direction \(\alpha\) that is selected by
pos_dir.- Parameters:
- evecsnp.ndarray
Eigenvectors for which we are computing matrix elements of the position operator. The shape of this array is
evecs[band, orbital]ifspinful=Falseandevecs[band, orbital, spin]ifspinful=True.Changed in version 2.0.0: Parameter
evecrenamed toevecsto clarify that multiple eigenvectors can be passed at once.- pos_dirint
Direction along which we are computing the center. This integer must not be one of the periodic directions since position operator matrix element in that case is not well defined.
Changed in version 2.0.0: Parameter
dirrenamed topos_dirto avoid conflict with built-in functiondir().
- Returns:
- pos_matnp.ndarray
Position operator matrix \(X_{m n}\) as defined above. This is a square matrix with size determined by number of bands given in evec input array. First index of pos_mat corresponds to bra vector (\(m\)) and second index to ket (\(n\)).
See also
- Hybrid Wannier centers in the Haldane model
For an example.
Examples
Diagonalizes Hamiltonian at some k-points
>>> (evals, evecs) = my_model.solve_ham(k_vec, return_eigvecs=True)
Computes position operator matrix elements for 3-rd kpoint and bottom five bands along first coordinate
>>> pos_mat = my_model.position_matrix(evecs[2, :5], 0)