tensor-network/error-correction study tensorcontract.py can only contract 2 indices at a time for now.