quant_met.mean_field.

self_consistency_loop#

quant_met.mean_field.self_consistency_loop(h, k_space_grid, epsilon, max_iter=1000, delta_init=None)#

Self-consistently solves the gap equation for a given Hamiltonian.

This function performs a self-consistency loop to solve the gap equation for a Hamiltonian h. The gaps in the orbital basis are iteratively updated until the change is within a specified tolerance epsilon.

Parameters:
hBaseHamiltonian

The Hamiltonian object with the parameters for the calculation.

k_space_gridnumpy.ndarray

A grid of points in the Brillouin zone at which the gap equation is evaluated.

epsilonfloat

The convergence criterion. The loop will terminate when the change in the delta orbital basis is less than this value.

delta_initnumpy.ndarray

Initial gaps in orbital basis.

max_iterint

Maximal number of iterations, default 300.

Returns:
quant_met.mean_field.BaseHamiltonian

The updated Hamiltonian object with the new gaps.

Notes

The function initializes the gaps with random complex numbers before entering the self-consistency loop. The mixing parameter is set to 0.2, which controls how much of the new gaps is taken relative to the previous value in each iteration.