make tensor networks optimization fast (no outer products yet)