Change import from cutn to eval [skip CI]
This commit is contained in:
@@ -32,7 +32,7 @@ def test_eval(nqubits: int, dtype="complex128"):
|
|||||||
dtype (str): The data type for precision, 'complex64' for single,
|
dtype (str): The data type for precision, 'complex64' for single,
|
||||||
'complex128' for double.
|
'complex128' for double.
|
||||||
"""
|
"""
|
||||||
import qibotn.cutn
|
import qibotn.eval
|
||||||
|
|
||||||
# Test qibo
|
# Test qibo
|
||||||
qibo.set_backend(backend=config.qibo.backend,
|
qibo.set_backend(backend=config.qibo.backend,
|
||||||
@@ -59,7 +59,7 @@ def test_mps(nqubits: int, dtype="complex128"):
|
|||||||
dtype (str): The data type for precision, 'complex64' for single,
|
dtype (str): The data type for precision, 'complex64' for single,
|
||||||
'complex128' for double.
|
'complex128' for double.
|
||||||
"""
|
"""
|
||||||
import qibotn.cutn
|
import qibotn.eval
|
||||||
|
|
||||||
# Test qibo
|
# Test qibo
|
||||||
qibo.set_backend(backend=config.qibo.backend,
|
qibo.set_backend(backend=config.qibo.backend,
|
||||||
@@ -78,7 +78,7 @@ def test_mps(nqubits: int, dtype="complex128"):
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
cutn_time, result_tn = time(
|
cutn_time, result_tn = time(
|
||||||
lambda: qibotn.cutn.eval_mps(circ_qibo, gate_algo, dtype).flatten())
|
lambda: qibotn.eval.eval_mps(circ_qibo, gate_algo, dtype).flatten())
|
||||||
|
|
||||||
print(
|
print(
|
||||||
f"State vector difference: {abs(result_tn - result_sv_cp).max():0.3e}")
|
f"State vector difference: {abs(result_tn - result_sv_cp).max():0.3e}")
|
||||||
|
|||||||
Reference in New Issue
Block a user