From a42ba15e88f47ab89e90e110a48942bd3db60d4f Mon Sep 17 00:00:00 2001 From: tankya2 Date: Wed, 16 Aug 2023 18:18:27 +0800 Subject: [PATCH] use **kwargs --- src/qibotn/MPSUtils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qibotn/MPSUtils.py b/src/qibotn/MPSUtils.py index 1a9dad5..8b8cdb3 100644 --- a/src/qibotn/MPSUtils.py +++ b/src/qibotn/MPSUtils.py @@ -13,14 +13,13 @@ def initial(num_qubits, dtype): def mps_site_right_swap( mps_tensors, i, - algorithm=None, - options=None + **kwargs ): """ Perform the swap operation between the ith and i+1th MPS tensors. """ # contraction followed by QR decomposition - a, _, b = contract_decompose('ipj,jqk->iqj,jpk', *mps_tensors[i:i+2], algorithm=algorithm, options=options) + a, _, b = contract_decompose('ipj,jqk->iqj,jpk', *mps_tensors[i:i+2], algorithm=list(kwargs.items())[0][1], options=list(kwargs.items())[1][1]) mps_tensors[i:i+2] = (a, b) return mps_tensors