OneSiteH¶
full name: tenpy.algorithms.mps_sweeps.OneSiteH
parent module:
tenpy.algorithms.mps_sweeps
type: class
Inheritance Diagram
Methods

Initialize self. 
Combine LP and RP with W to form LHeff and RHeff, depending on the direction. 


Combine the legs of theta, such that fit to how we combined the legs of self. 

Apply the effective Hamiltonian to theta. 

Apply self to theta, and orthogonalize against self.theta_ortho. 
Contract self to a matrix. 
Class Attributes and Properties

class
tenpy.algorithms.mps_sweeps.
OneSiteH
(env, i0, combine=False, move_right=True, ortho_to_envs=[])[source]¶ Bases:
tenpy.algorithms.mps_sweeps.EffectiveH
Class defining the onesite effective Hamiltonian for Lanczos.
The effective onesite Hamiltonian looks like this:
 . .      LPW0RP      . .
If combine is True, we define either LHeff as contraction of LP with W (in the case move_right is True) or RHeff as contraction of RP and W.
 Parameters
env (
MPOEnvironment
) – Environment for contraction<psiHpsi>
.i0 (int) – Index of the active site if length=1, or of the leftmost active site if length>1.
combine (bool) – Whether to combine legs into pipes. This combines the virtual and physical leg for the left site (when moving right) or right side (when moving left) into pipes. This reduces the overhead of calculating charge combinations in the contractions, but one
matvec()
is formally more expensive, \(O(2 d^3 \chi^3 D)\). Is originally from the wosite method; unclear if it works well for 1 site.move_right (bool) – Whether the the sweep is moving right or left for the next update.

acts_on
¶ Labels of the state on which self acts. NB: class attribute. Overwritten by normal attribute, if combine.
 Type
list of str

combine, move_right
See above.
 Type

LHeff, RHeff
Only set
combine
, and only one of them depending onmove_right
. If move_right was True, LHeff is set with labels'(vR*.p0)', 'wR', '(vR.p0*)'
for bra, MPO, ket; otherwise RHeff is set with labels'(p0*.vL)', 'wL', '(p0, vL*)'
 Type

LP, W0, RP
Tensors making up the network of self.
 Type

combine_Heff
()[source]¶ Combine LP and RP with W to form LHeff and RHeff, depending on the direction.
In a move to the right, we need LHeff. In a move to the left, we need RHeff. Both contain the same W.

combine_theta
(theta)[source]¶ Combine the legs of theta, such that fit to how we combined the legs of self.

matvec_theta_ortho
(theta)[source]¶ Apply self to theta, and orthogonalize against self.theta_ortho. __ We implement this by effectively replacing
H > P H P
with the projectorP = 1  sum_o o> <o
projecting out the states fromtheta_ortho
.Parameter and return value as for
matvec()
(which this function replaces, if the class was initialized with nonempty ortho_to_envs.)