def test_run_factory(): rand_circ = random_identity_circuit(depth=TEST_DEPTH) qp = measure(rand_circ, qid=0) fac = RichardsonFactory([1.0, 2.0, 3.0]) fac.run(qp, basic_executor, scale_noise) result = fac.reduce() assert np.isclose(result, 1.0, atol=1.0e-1)
def test_run_factory(): """Tests qrun of a Richardson Factory.""" qp = random_one_qubit_identity_circuit(num_cliffords=TEST_DEPTH) qp = measure(qp, 0) fac = RichardsonFactory([1.0, 2.0, 3.0]) fac.run(qp, basic_executor, scale_noise) result = fac.reduce() assert np.isclose(result, 1.0, atol=1.0e-1)