pythtb.TBModel.chern_number#

TBModel.chern_number(plane, nks, occ_idxs=None, *, param_periods=None, diff_scheme='central', diff_order=4, use_tensorflow=False, **params)[source]#

Compute the Chern number on the specified plane.

The Chern number is computed by integrating the Berry curvature over a surface defined by plane parameter. The Chern number is given by

\[C_{\mu\nu} = \frac{1}{2\pi} \int_{\mathcal{S}_{\mu\nu}} \Omega_{\mu\nu}(\boldsymbol{\kappa}) \, d\kappa_\mu\, d\kappa_\nu\]

where \(\mathcal{S}_{\mu\nu}\) denotes the two-dimensional plane in the combined k/parameter space, and \(\boldsymbol{\kappa}\) is the combined coordinate vector including both crystal momenta and swept parameters. Here, \(\Omega_{\mu\nu}(\boldsymbol{\kappa})\) is the trace of the Berry curvature tensor over the occupied bands.

Added in version 2.0.0.

Parameters:
planetuple[int, int]

Two distinct indices identifying the directions to integrate. Indices below dim_k refer to k-space axes, higher indices refer to swept parameters supplied via **params.

nkstuple[int, int]

Number of k samples along each periodic direction. Length must equal dim_k. If the any k-directions are spectators, meaning they are not part of the plane, they are still sampled uniformly in [0, 1) but the number of samples does not affect the Chern number result. The returned array will the Chern number for each spectator k-point and/or swept parameter combination.

occ_idxsarray-like, optional

Occupied-band indices used in the Berry-curvature calculation. Defaults to the lower half of the spectrum.

param_periodsdict[str, float], optional

Optional map {param_name: period} for swept parameters. When supplied, assumes the parameter is cyclic and trims any duplicated endpoints, or endpoints equal to the start plus the given period, before building finite-difference stencils. This can improve numerical accuracy by using centered differences throughout the parameter range. Otherwise, the function will use a backward difference at the endpoint and a forward difference at the start.

diff_scheme{‘central’, ‘forward’}, optional

Finite-difference stencil passed through to berry_curvature().

diff_orderint, optional

Accuracy order for the finite-difference stencil (even for 'central' schemes). Default is 4.

use_tensorflow: bool, optional

Forwarded to berry_curvature(); enables GPU evaluation if TensorFlow is available.

**params

Parameter assignments. Scalars fix a parameter value; 1D arrays define sweeps. Swept axes appear as spectator dimensions in the returned array unless they are part of the integration plane.

Returns:
float or np.ndarray

Chern number(s) evaluated on the spectator grid. A scalar is returned when no spectator axes remain; otherwise the array shape matches the Cartesian product of the spectator coordinates.

See also

berry_curvature

Computes the Berry curvature used in the integrand.

Notes

  • The plane indices use the combined coordinate ordering of k-space dimensions followed by swept parameters \([k_0, ..., k_{\text{dim_k}}, \lambda_0, \lambda_1, ...]\). For example, in a 2D model with one swept parameter, the valid plane indices are 0, 1, and 2, where 0 and 1 refer to the two k-space dimensions, and 2 refers to the swept parameter axis. Swept parameters are those provided as array-like values in **params. The order of swept parameters is determined by the order in which they appear in the **params keyword arguments.

  • The routine reuses berry_curvature() to obtain \(\Omega_{\mu\nu}\) and performs the discrete integral for the selected plane. The occupied manifold must stay gapped over the entire integration region for the result to converge to an (approximate) integer.

  • The Chern number is only defined when the total number of independent coordinates (crystal momenta plus varying parameters) is at least two, i.e. dim_k + n_params >= 2 where n_params is the number of parameters set with lists of values.

  • The Chern number is only guaranteed to be an integer in the limit of dense k-meshes and when the plane of integration forms a closed manifold (e.g., a Brillouin zone or a periodic parameter).