quant_met.mean_field.hamiltonians.TwoBand.

from_file#

classmethod TwoBand.from_file(filename)#

Initialize a Hamiltonian from a previously saved HDF5 file.

This class method allows users to reconstruct a Hamiltonian object from saved attributes and matrix configurations stored in an HDF5 file.

Parameters:
filenamepathlib.Path

The file path to the HDF5 file containing Hamiltonian data.

Returns:
class:BaseHamiltonian[GenericParameters]

An instance of the Hamiltonian initialized with data from the file.