append_left_env

tenpy.algorithms.plane_wave_excitation.append_left_env(As, Bs, L, Ws=None)[source]

Contract all tensors in As and Bs to the left environment L.

If Ws given, contract as a MPO environment.

Parameters:
  • As (list of Array) – Arrays to add to the top leg of the environment, labels are vL, vR, p (in any order).

  • Bs (list of Array) – Arrays to add to the bottom leg of the environment, labels are vL, vR, p (in any order).

  • L (Array) – Initial left environment, labels are vL, vR (in any order), if ‘Ws’ is None, otherwise also need a leg wR

  • Ws (list of Array) – Arrays to add to the middle leg of the environment, labels are wL, wR, p, p* (in any order).

Returns:

temp – The new environment with the tensors above included.

Return type:

Array