Add datatype as an input in eval() [skip ci]

This commit is contained in:
tankya2
2023-04-18 11:34:00 +08:00
parent 7751dbd2f9
commit aee995802f
2 changed files with 4 additions and 3 deletions

View File

@@ -32,7 +32,8 @@ def test_eval(nqubits: int):
qibo_time, (qibo_circ, result_sv) = time(lambda: qibo_qft(nqubits, swaps=True))
# Test Cuquantum
cutn_time, result_tn = time(lambda: qibotn.cutn.eval(qibo_circ))
data_type = "complex128"
cutn_time, result_tn = time(lambda: qibotn.cutn.eval(qibo_circ,data_type))
assert 1e-2 * qibo_time < cutn_time < 1e2 * qibo_time
assert np.allclose(result_sv, result_tn), "Resulting dense vectors do not match"