more compact form for mps settings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user