Format with black

This commit is contained in:
tankya2
2024-01-30 10:41:26 +08:00
committed by yangliwei
parent 9bca7a0614
commit 15bab605a2

View File

@@ -369,6 +369,7 @@ def eval_tn_MPI_expectation(qibo_circ, datatype, n_samples=8):
return result, rank return result, rank
def eval_mps(qibo_circ, gate_algo, datatype): def eval_mps(qibo_circ, gate_algo, datatype):
myconvertor = QiboCircuitToMPS(qibo_circ, gate_algo, dtype=datatype) myconvertor = QiboCircuitToMPS(qibo_circ, gate_algo, dtype=datatype)
mps_helper = MPSContractionHelper(myconvertor.num_qubits) mps_helper = MPSContractionHelper(myconvertor.num_qubits)
@@ -377,6 +378,7 @@ def eval_mps(qibo_circ, gate_algo, datatype):
myconvertor.mps_tensors, {"handle": myconvertor.handle} myconvertor.mps_tensors, {"handle": myconvertor.handle}
) )
def PauliStringGen(nqubits): def PauliStringGen(nqubits):
if nqubits <= 0: if nqubits <= 0:
return "Invalid input. N should be a positive integer." return "Invalid input. N should be a positive integer."