dseuss/mpnum

View on GitHub
docs/fig/tensors_pmps_to_mpo.tikz

Summary

Maintainability
Test Coverage
\directlua{mpt.defaults['tensor_width'] = 1}
\directlua{mpt.defaults['len_horizontal_legs'] = 0.25}
\directlua{mpt.defaults['len_vertical_legs'] = 0.25}

\newcommand{\ydist}{0.75}
\directlua{mpt.draw_node({N=3,S=3,W=1,E=1}, {y=\ydist,tensor_name='Au', tensor_width=1.5})}
\directlua{mpt.draw_node({N=3,S=3,W=1,E=1}, {y=-\ydist,tensor_name='Ad', tensor_width=1.5})}

\node at (2,0) {\Huge $=$};


\directlua{mpt.draw_mpa(3,{N=1,S=1,W=1,E=1}, {x=4,y=\ydist,tensor_name='Bu'})}
\directlua{mpt.draw_mpa(3,{N=1,S=1,W=1,E=1}, {x=4,y=-\ydist,tensor_name='Bd'})}


\draw[labelline,shorten >=\labellineshorten] (Au_E1)
  -- +(.5,1) node[labelnode,anchor=south east] (dummy) {dummy \\ virtual legs}
  -- (Bu_1_W1);
\draw[labelline,shorten >=\labellineshorten] (Au_N3)
--   ($ (dummy) + (2.,-0.5)$) node[labelnode,anchor=south west] {physical column legs, \\ system sites}
  -- (Bu_1_N1);
\draw[labelline,shorten >=\labellineshorten] (Ad_S3)
  -- +(1,-0.5) node[labelnode,anchor=north west] {physical row legs, \\ system sites}
  -- (Bd_1_S1);
\draw[labelline] (Bu_2_W1e)
  -- +(1.2,1.3) node[labelnode] {virtual leg};

\draw[labelline, shorten <=-5pt] (Au)
  -- +(-1,0.5) node[labelnode, anchor=east] {complex conjugate of \\ PMPS local tensor};
\draw[labelline, shorten <=-5pt] (Ad)
  -- +(-1,-0.5) node[labelnode, anchor=east] {PMPS local tensor};
\draw[labelline] (Au_S1e)
  -- +(-1,0.2) node[labelnode, anchor=east] {physical legs \\ of ancilla sites};


\begin{scope}[on background layer]
  \fill[tensornode,fill=black, opacity=0.2] ($ (Bd_3) - (0.65,0.65) $) rectangle ($ (Bu_3) + (0.65,0.65) $);
\end{scope}
\draw[labelline] ($ (Bd_3) - (0.5,0.5) $)
  -- +(0.3,-1.2) node[labelnode] {local tensor of an \\ MPO representation};


\draw[labelline, shorten <=-5pt] (Bu_3)
  -- +(1,0.5) node[labelnode] {complex conjugate of \\ PMPS local tensor};
\draw[labelline, shorten <=-5pt] (Bd_3)
  -- +(1,-0.5) node[labelnode] {PMPS local tensor};
\draw[labelline] (Bu_3_S1e)
  -- +(1,0.2) node[labelnode] {physical legs \\ of ancilla sites};