append_right_env

tenpy.algorithms.plane_wave_excitation.append_right_env(As, Bs, R, Ws=None)[source]

Contract all tensors in As and Bs to the right environment R.

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).

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

  • 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