[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot]
2024-03-04 08:09:34 +00:00
parent 7c7d86062b
commit 631231f933
3 changed files with 7 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ from qibotn.mps_utils import apply_gate, initial
class QiboCircuitToMPS: class QiboCircuitToMPS:
"""A helper class to convert Qibo circuit to MPS. """A helper class to convert Qibo circuit to MPS.
Parameters: Parameters:
circ_qibo: The quantum circuit object. circ_qibo: The quantum circuit object.
gate_algo(dict): Dictionary for SVD and QR settings. gate_algo(dict): Dictionary for SVD and QR settings.
@@ -18,6 +18,7 @@ class QiboCircuitToMPS:
Return: Return:
None. None.
""" """
def __init__( def __init__(
self, self,
circ_qibo, circ_qibo,

View File

@@ -19,7 +19,7 @@ class MPSContractionHelper:
Parameters: Parameters:
num_qubits: The number of qubits for the MPS. num_qubits: The number of qubits for the MPS.
Return: Return:
None. None.
""" """

View File

@@ -5,11 +5,11 @@ from cuquantum.cutensornet.experimental import contract_decompose
def initial(num_qubits, dtype): def initial(num_qubits, dtype):
r"""Generate the MPS with an initial state of :math:`\ket{00...00}` r"""Generate the MPS with an initial state of :math:`\ket{00...00}`
Parameters: Parameters:
num_qubits: Number of qubits in the Quantum Circuit. num_qubits: Number of qubits in the Quantum Circuit.
dtype: Either single ("complex64") or double (complex128) precision. dtype: Either single ("complex64") or double (complex128) precision.
Returns: Returns:
The initial MPS tensors. The initial MPS tensors.
""" """
@@ -20,11 +20,11 @@ def initial(num_qubits, dtype):
def mps_site_right_swap(mps_tensors, i, **kwargs): def mps_site_right_swap(mps_tensors, i, **kwargs):
"""Perform the swap operation between the ith and i+1th MPS tensors. """Perform the swap operation between the ith and i+1th MPS tensors.
Parameters: Parameters:
mps_tensors: Tensors representing MPS mps_tensors: Tensors representing MPS
i (int): index of the tensor to swap i (int): index of the tensor to swap
Returns: Returns:
The updated MPS tensors. The updated MPS tensors.
""" """