PurificationApplyMPO¶
full name: tenpy.algorithms.purification.PurificationApplyMPO
parent module:
tenpy.algorithms.purification
type: class
Inheritance Diagram
Methods
|
Initialize self. |
|
Perform N_sweeps sweeps without optimization to update the environment. |
Define the schedule of the sweep. |
|
Initialize the environment. |
|
Create new instance of self.EffectiveH at self.i0 and set it to self.eff_H. |
|
Algorithm-specific actions to be taken after local update. |
|
Prepare everything algorithm-specific to perform a local update. |
|
Reset the statistics. |
|
Run the compression. |
|
|
One ‘sweep’ of a sweeper algorithm. |
|
|
|
|
|
Perform local update. |
|
Class Attributes and Properties
|
-
class
tenpy.algorithms.purification.
PurificationApplyMPO
(psi, U_MPO, options)[source]¶ Bases:
tenpy.algorithms.mps_common.VariationalApplyMPO
Variant of VariationalApplyMPO suitable for purification.
-
EffectiveH
[source]¶ alias of
PurificationTwoSiteU
-
update_local
(_, optimize=True)[source]¶ Perform local update.
This simply contracts the environments and theta from the ket to get an updated theta for the bra self.psi (to be changed in place).
-
environment_sweeps
(N_sweeps)[source]¶ Perform N_sweeps sweeps without optimization to update the environment.
- Parameters
N_sweeps (int) – Number of sweeps to run without optimization
-
get_sweep_schedule
()[source]¶ Define the schedule of the sweep.
One ‘sweep’ is a full sequence from the leftmost site to the right and back. Only those LP and RP that can be used later should be updated.
- Returns
schedule – Schedule for the sweep. Each entry is
(i0, move_right, (update_LP, update_RP))
, where i0 is the leftmost of theself.EffectiveH.length
sites to be updated inupdate_local()
, move_right indicates whether the next i0 in the schedule is rigth (True) of the current one, and update_LP, update_RP indicate whether it is necessary to update the LP and RP. The latter are chosen such that the environment is growing for infinite systems, but we only keep the minimal number of environment tensors in memory.- Return type
-
init_env
(U_MPO)[source]¶ Initialize the environment.
- Parameters
U_MPO (
MPO
) – The MPO to be applied to the sate.
-
post_update_local
(update_data)[source]¶ Algorithm-specific actions to be taken after local update.
An example would be to collect statistics.
-
reset_stats
()[source]¶ Reset the statistics. Useful if you want to start a new Sweep run.
This method is expected to be overwritten by subclass, and should then define self.update_stats and self.sweep_stats dicts consistent with the statistics generated by the algorithm particular to that subclass.
-
run
()[source]¶ Run the compression.
The state
psi
is compressed in place.- Returns
max_trunc_err – The maximal truncation error of a two-site wave function.
- Return type
-