# PurificationTwoSiteU¶

Inheritance Diagram

Methods

 PurificationTwoSiteU.__init__(env, i0[, …]) Initialize self. Return the hermitian conjugate of self. Combine LP and RP with W to form LHeff and RHeff. Combine the legs of theta, such that it fits to how we combined the legs of self. Apply the effective Hamiltonian to theta. Contract self to a matrix.

Class Attributes and Properties

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

Variant of TwoSiteH suitable for purification.

The MPO gets only applied to the physical legs p0, p1, the ancialla 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.

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.