By: ValentinHirschi <valentin.hirschi@gmail.com>
make contraction parsing lazy and finish tensor API cleanup