From fc3e0c24bdd1f51769d1cb5b792ad4505a5a8bf6 Mon Sep 17 00:00:00 2001 From: tankya2 Date: Thu, 3 Aug 2023 10:27:19 +0800 Subject: [PATCH] Return function output directly --- src/qibotn/cutn.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qibotn/cutn.py b/src/qibotn/cutn.py index 9b9ac7a..fc603ba 100644 --- a/src/qibotn/cutn.py +++ b/src/qibotn/cutn.py @@ -13,6 +13,7 @@ def eval(qibo_circ, datatype): def eval_mps(qibo_circ, gate_algo, datatype): myconvertor = QiboCircuitToMPS(qibo_circ, gate_algo, dtype=datatype) mps_helper = MPSContractionHelper(myconvertor.num_qubits) - sv_mps = mps_helper.contract_state_vector( - myconvertor.mps_tensors, myconvertor.options) - return sv_mps + + return mps_helper.contract_state_vector( + myconvertor.mps_tensors, myconvertor.options + )