From 2cbae1e02d484a214347aa13e48cfd3d01edfcce Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Tue, 17 Dec 2024 17:41:12 -0500 Subject: [PATCH] Fixing attribute error from vestige --- tests/benchq/problem_embeddings/test_qpe.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/benchq/problem_embeddings/test_qpe.py b/tests/benchq/problem_embeddings/test_qpe.py index 5532e523..3c24b19c 100644 --- a/tests/benchq/problem_embeddings/test_qpe.py +++ b/tests/benchq/problem_embeddings/test_qpe.py @@ -267,7 +267,12 @@ def test_calc_of_algorithm_failure_prob(n_toffoli, n_T): ) np.testing.assert_almost_equal( - (best_toffoli.logical_error_rate - 2 * best_T.logical_error_rate), 0, decimal=5 + ( + best_toffoli.total_circuit_failure_rate + - 2 * best_T.total_circuit_failure_rate + ), + 0, + decimal=5, ) @@ -296,9 +301,9 @@ def test_algorithm_failure_prob_calculation(): architecture_model=BAM, hardware_failure_tolerance=1e-1, ) - np.testing.assert_almost_equal( - best_cost_toffoli.logical_error_rate, best_cost_t.logical_error_rate - ) + exp_error_rate = best_cost_toffoli.total_circuit_failure_rate + obt_error_rate = best_cost_t.total_circuit_failure_rate + np.testing.assert_almost_equal(exp_error_rate, obt_error_rate) # type: ignore def test_default_values():