From 631231f9335ee926bb54b568d1036e5b1321d55f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 08:09:34 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/qibotn/circuit_to_mps.py | 3 ++- src/qibotn/mps_contraction_helper.py | 2 +- src/qibotn/mps_utils.py | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/qibotn/circuit_to_mps.py b/src/qibotn/circuit_to_mps.py index 3027a75..48ebde7 100644 --- a/src/qibotn/circuit_to_mps.py +++ b/src/qibotn/circuit_to_mps.py @@ -8,7 +8,7 @@ from qibotn.mps_utils import apply_gate, initial class QiboCircuitToMPS: """A helper class to convert Qibo circuit to MPS. - + Parameters: circ_qibo: The quantum circuit object. gate_algo(dict): Dictionary for SVD and QR settings. @@ -18,6 +18,7 @@ class QiboCircuitToMPS: Return: None. """ + def __init__( self, circ_qibo, diff --git a/src/qibotn/mps_contraction_helper.py b/src/qibotn/mps_contraction_helper.py index c29dc92..e562850 100644 --- a/src/qibotn/mps_contraction_helper.py +++ b/src/qibotn/mps_contraction_helper.py @@ -19,7 +19,7 @@ class MPSContractionHelper: Parameters: num_qubits: The number of qubits for the MPS. - + Return: None. """ diff --git a/src/qibotn/mps_utils.py b/src/qibotn/mps_utils.py index f29685b..878a5aa 100644 --- a/src/qibotn/mps_utils.py +++ b/src/qibotn/mps_utils.py @@ -5,11 +5,11 @@ from cuquantum.cutensornet.experimental import contract_decompose def initial(num_qubits, dtype): r"""Generate the MPS with an initial state of :math:`\ket{00...00}` - + Parameters: num_qubits: Number of qubits in the Quantum Circuit. dtype: Either single ("complex64") or double (complex128) precision. - + Returns: The initial MPS tensors. """ @@ -20,11 +20,11 @@ def initial(num_qubits, dtype): def mps_site_right_swap(mps_tensors, i, **kwargs): """Perform the swap operation between the ith and i+1th MPS tensors. - + Parameters: mps_tensors: Tensors representing MPS i (int): index of the tensor to swap - + Returns: The updated MPS tensors. """