more compact form for mps settings

This commit is contained in:
vinitha-balachandran
2024-03-01 07:25:08 +08:00
parent 69e62da1ee
commit 891102f638
2 changed files with 8 additions and 13 deletions

View File

@@ -55,13 +55,11 @@ def test_eval(nqubits: int, tolerance: float, is_mps: bool):
gate_opt["method"] = "svd"
gate_opt["cutoff"] = 1e-6
gate_opt["cutoff_mode"] = "abs"
result_tn = qibotn.eval_qu.dense_vector_tn_qu(
qasm_circ, init_state_tn, gate_opt, backend=config.quimb.backend
).flatten()
else:
result_tn = qibotn.eval_qu.dense_vector_tn_qu(
qasm_circ, init_state_tn, is_mps, backend=config.quimb.backend
).flatten()
gate_opt = None
result_tn = qibotn.eval_qu.dense_vector_tn_qu(
qasm_circ, init_state_tn, gate_opt, backend=config.quimb.backend
).flatten()
assert np.allclose(
result_sv, result_tn, atol=tolerance