tightbinder.topology.write_entanglement_spectrum_to_file#
- write_entanglement_spectrum_to_file(spectrum, file, n=None, shift=0)[source]#
Routine to write the entanglement spectrum to a text file. If n is given, only n eigenvalues are written to file. The algorithm is as follows: first we search for the eigenvalue that is closer to 0.5, and then we write the n/2 eigenvalues to its left and right.
- Parameters:
spectrum (
ndarray) – Array with the entanglement spectrum.file (
TextIOWrapper) – Pointer to the file to write the entanglement spectrum.
- Return type: