[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
@@ -18,9 +18,8 @@ CUDA_TYPES = {
|
|||||||
|
|
||||||
class CuTensorNet(NumpyBackend): # pragma: no cover
|
class CuTensorNet(NumpyBackend): # pragma: no cover
|
||||||
# CI does not test for GPU
|
# CI does not test for GPU
|
||||||
"""Creates CuQuantum backend for QiboTN.
|
"""Creates CuQuantum backend for QiboTN."""
|
||||||
|
|
||||||
"""
|
|
||||||
def __init__(self, runcard):
|
def __init__(self, runcard):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
from cuquantum import cutensornet as cutn # pylint: disable=import-error
|
from cuquantum import cutensornet as cutn # pylint: disable=import-error
|
||||||
@@ -94,7 +93,7 @@ class CuTensorNet(NumpyBackend): # pragma: no cover
|
|||||||
super().set_precision(precision)
|
super().set_precision(precision)
|
||||||
|
|
||||||
def cuda_type(self, dtype="complex64"):
|
def cuda_type(self, dtype="complex64"):
|
||||||
"""Get CUDA Type
|
"""Get CUDA Type.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
dtype (str, optional): Either single ("complex64") or double (complex128) precision. Defaults to "complex64".
|
dtype (str, optional): Either single ("complex64") or double (complex128) precision. Defaults to "complex64".
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ class QiboCircuitToEinsum:
|
|||||||
self.circuit = circuit
|
self.circuit = circuit
|
||||||
|
|
||||||
def state_vector_operands(self):
|
def state_vector_operands(self):
|
||||||
"""Create the operands for expectation computation in the interleave format.
|
"""Create the operands for expectation computation in the interleave
|
||||||
|
format.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Operands for the contraction in the interleave format.
|
Operands for the contraction in the interleave format.
|
||||||
@@ -198,7 +199,8 @@ class QiboCircuitToEinsum:
|
|||||||
return gates
|
return gates
|
||||||
|
|
||||||
def expectation_operands(self, pauli_string):
|
def expectation_operands(self, pauli_string):
|
||||||
"""Create the operands for pauli string expectation computation in the interleave format.
|
"""Create the operands for pauli string expectation computation in the
|
||||||
|
interleave format.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
pauli_string: A string representating the list of pauli gates.
|
pauli_string: A string representating the list of pauli gates.
|
||||||
|
|||||||
Reference in New Issue
Block a user