NCON: A tensor network contractor for MATLAB
  A fundamental process in the implementation of any numerical tensor network algorithm is that of contracting a tensor network. In this process, a network made up of multiple tensors connected by summed indices is reduced to a single tensor or a number by evaluating the index sums. This article presents a MATLAB function ncon(), or "Network CONtractor", which accepts as its input a tensor network and a contraction sequence describing how this network may be reduced to a single tensor or number. As its output it returns that single tensor or number. The function ncon() may be obtained by downloading the source of this preprint. 
Robert N. C. Pfeifer and Glen Evenbly and Sukhwinder Singh and Guifre   Vidal
physics.comp-ph cond-mat.str-el quant-ph