quant_met.mean_field.

quantum_metric#

quant_met.mean_field.quantum_metric(h, k_grid, bands)#

Calculate the quantum metric (geometric tensor) for specified bands.

This function computes the quantum geometric tensor associated with the specified bands of a given Hamiltonian over a grid of k-points. The output is a 2x2 matrix representing the quantum metric.

Parameters:
hBaseHamiltonian

Hamiltonian object used to compute Bloch states and their derivatives.

k_gridnumpy.ndarray

Array of k points in the Brillouin zone.

bandslist of int

Indices of the bands for which the quantum metric is to be calculated.

Returns:
numpy.ndarray

A 2x2 matrix representing the quantum metric.

Raises:
ValueError

If bands contains invalid indices or k_grid is empty.