MomentumMPS
full name: tenpy.networks.momentum_mps.MomentumMPS
parent module:
tenpy.networks.momentum_mps
type: class
Inheritance Diagram
Methods
|
|
Returns a copy of self. |
|
|
Load instance from a HDF5 file. |
|
Return (view of) X at site i. |
|
Export self into a HDF5 file. |
|
Set X at site i. |
- class tenpy.networks.momentum_mps.MomentumMPS(Xs, uMPS, p, n_sites=1)[source]
Bases:
object
A Matrix Product State, finite (MPS) or infinite (iMPS).
- Parameters:
Xs (list of
Array
) – Excitation tensors for each site of the unit cell.uMPS (
UniformMPS
) – The uniform MPS on which the excitations are based.p (float) – The momentum of the state.
n_sites (int) – Number of sites for each excitation.
- _X
The excitation matrices of the MPS. Labels are
vL, p1, ..., p{n_sites-1}, vR
.- Type:
list of
Array
- uMPS_GS
The uniform MPS, representing the ground state.
- Type:
- save_hdf5(hdf5_saver, h5gr, subpath)[source]
Export self into a HDF5 file.
This method saves all the data it needs to reconstruct self with
from_hdf5()
.Specifically, it saves
_X
as"tensors"
,uMPS_GS
as"GS_uMPS"
, andp
as"momentum"
. Moreover, it savesn_sites
as HDF5 attributes.
- classmethod from_hdf5(hdf5_loader, h5gr, subpath)[source]
Load instance from a HDF5 file.
This method reconstructs a class instance from the data saved with
save_hdf5()
.- Parameters:
hdf5_loader (
Hdf5Loader
) – Instance of the loading engine.h5gr (
Group
) – HDF5 group which is represent the object to be constructed.subpath (str) – The name of h5gr with a
'/'
in the end.
- Returns:
obj – Newly generated class instance containing the required data.
- Return type:
cls