PurificationTwoSiteU

Inheritance Diagram

Inheritance diagram of tenpy.algorithms.purification.PurificationTwoSiteU

Methods

PurificationTwoSiteU.__init__(env, i0[, ...])

PurificationTwoSiteU.adjoint()

Return the hermitian conjugate of self.

PurificationTwoSiteU.combine_Heff()

Combine LP and RP with W to form LHeff and RHeff.

PurificationTwoSiteU.combine_theta(theta)

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

PurificationTwoSiteU.matvec(theta)

Apply the effective Hamiltonian to theta.

PurificationTwoSiteU.to_matrix()

Contract self to a matrix.

PurificationTwoSiteU.update_LP(env, i[, U])

Equivalent to env.get_LP(i, store=True); optimized for combine.

PurificationTwoSiteU.update_RP(env, i[, VH])

Equivalent to env.get_RP(i, store=True); optimized for combine.

Class Attributes and Properties

PurificationTwoSiteU.acts_on

PurificationTwoSiteU.length

class tenpy.algorithms.purification.PurificationTwoSiteU(env, i0, combine=False, move_right=True)[source]

Bases: TwoSiteH

Variant of TwoSiteH suitable for purification.

The MPO gets only applied to the physical legs p0, p1, the ancilla legs q0, q1 of theta are ignored.

combine_Heff()[source]

Combine LP and RP with W to form LHeff and RHeff.

Combine LP with W0 and RP with W1 to get the effective parts of the Hamiltonian with piped legs.

Parameters:
  • env (MPOEnvironment) – Environment for contraction <psi|H|psi>.

  • left (bool) – The mixer might need only one of LHeff/RHeff after the Lanczos optimization even for combine=True. These flags allow to calculate them specifically.

  • right (bool) – The mixer might need only one of LHeff/RHeff after the Lanczos optimization even for combine=True. These flags allow to calculate them specifically.

adjoint()[source]

Return the hermitian conjugate of self.

combine_theta(theta)[source]

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

Parameters:

theta (Array) – Wave function with labels 'vL', 'p0', 'p1', 'vR'

Returns:

theta – Wave function with labels 'vL', 'p0', 'p1', 'vR'

Return type:

Array

matvec(theta)[source]

Apply the effective Hamiltonian to theta.

Parameters:

theta (Array) – Labels: vL, p0, p1, vR if combine=False, (vL.p0), (p1.vR) if True

Returns:

Product of theta and the effective Hamiltonian.

Return type:

theta Array

to_matrix()[source]

Contract self to a matrix.

update_LP(env, i, U=None)[source]

Equivalent to env.get_LP(i, store=True); optimized for combine.

Parameters:
  • env (MPOEnvironment) – The same environment as given during class initialization.

  • i (int) – We update the part left of site i. Can optimize if i == i0 and combine is True.

  • U (None | Array) – The tensor on the left-most site self acts on, with combined legs after SVD. Only used if trying to optimize.

update_RP(env, i, VH=None)[source]

Equivalent to env.get_RP(i, store=True); optimized for combine.

Parameters:
  • env (MPOEnvironment) – The same environment as given during class initialization.

  • i (int) – We update the part right of site i. Can optimize if i == i0 + 2 - length and combine is True.

  • U (None | Array) – The tensor on the right-most site self acts on, with combined legs after SVD. Only used if trying to optimize.