Merge branch 'cuQuantum_cuTensorNet' of https://github.com/qiboteam/qibotn into cuQuantum_cuTensorNet

This commit is contained in:
tankya2
2023-04-21 11:11:12 +08:00
2 changed files with 2 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ class QiboCircuitToEinsum:
"""This function is to modify the shape of the tensor to the required format by cuQuantum
(qubit_states,) * input_output * qubits_involved
"""
return (2,) * 2 * nqubits
return (2, 2) * nqubits
self.backend = cp
self.dtype = getattr(self.backend, dtype)

View File

@@ -5,6 +5,4 @@ from cuquantum import contract
def eval(qibo_circ, datatype):
myconvertor = QiboCircuitToEinsum(qibo_circ, dtype=datatype)
operands_expression = myconvertor.state_vector_operands()
results = contract(*operands_expression)
return results
return contract(*myconvertor.state_vector_operands())