diff --git a/qualtran/bloqs/chemistry/pbc/first_quantization/prepare_t_test.py b/qualtran/bloqs/chemistry/pbc/first_quantization/prepare_t_test.py index 026f232dd..afa581df1 100644 --- a/qualtran/bloqs/chemistry/pbc/first_quantization/prepare_t_test.py +++ b/qualtran/bloqs/chemistry/pbc/first_quantization/prepare_t_test.py @@ -33,15 +33,12 @@ def test_prepare_kinetic_t_counts(): n_eta = (eta - 1).bit_length() expected_cost = (14 * n_eta + 8 * b_r - 36) + 2 * (2 * num_bits_p + 9) uni = UniformSuperpostionIJFirstQuantization(eta, num_bits_rot_aa=b_r) - toffolis = get_cost_value(uni, QECGatesCost()).total_toffoli_only() - qual_cost = toffolis + + qual_cost = get_cost_value(uni, QECGatesCost()).total_toffoli_only() uni = UniformSuperpostionIJFirstQuantization(eta, num_bits_rot_aa=b_r).adjoint() - toffolis = get_cost_value(uni, QECGatesCost()).total_toffoli_only() - qual_cost += toffolis + qual_cost += get_cost_value(uni, QECGatesCost()).total_toffoli_only() prep = PrepareTFirstQuantization(num_bits_p, eta, num_bits_rot_aa=b_r) - toffolis = get_cost_value(prep, QECGatesCost()).total_toffoli_only() - qual_cost += toffolis + qual_cost += get_cost_value(prep, QECGatesCost()).total_toffoli_only() prep = PrepareTFirstQuantization(num_bits_p, eta, num_bits_rot_aa=b_r).adjoint() - toffolis = get_cost_value(prep, QECGatesCost()).total_toffoli_only() - qual_cost += toffolis + qual_cost += get_cost_value(prep, QECGatesCost()).total_toffoli_only() assert qual_cost == expected_cost diff --git a/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/prepare_t_test.py b/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/prepare_t_test.py index 26e7cd87e..a250da50e 100644 --- a/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/prepare_t_test.py +++ b/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/prepare_t_test.py @@ -39,16 +39,11 @@ def test_prepare_kinetic_t_proj_counts(): expected_cost = 2 * (2 * num_bits_n + 9) + 2 * (num_bits_n - num_bits_p) + 20 qual_cost = 0 prep = PrepareTFirstQuantizationWithProj(num_bits_p, num_bits_n, eta, num_bits_rot_aa=b_r) - _, counts = prep.call_graph() - counts = get_cost_value(prep, QECGatesCost()) - cost_dict = counts.total_t_and_ccz_count() - qual_cost += cost_dict['n_ccz'] + qual_cost += get_cost_value(prep, QECGatesCost()).total_toffoli_only() prep = PrepareTFirstQuantizationWithProj( num_bits_p, num_bits_n, eta, num_bits_rot_aa=b_r ).adjoint() - counts = get_cost_value(prep, QECGatesCost()) - cost_dict = counts.total_t_and_ccz_count() - qual_cost += cost_dict['n_ccz'] + qual_cost += get_cost_value(prep, QECGatesCost()).total_toffoli_only() assert qual_cost == expected_cost diff --git a/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/select_t_test.py b/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/select_t_test.py index 7356c1e63..f0752fda4 100644 --- a/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/select_t_test.py +++ b/qualtran/bloqs/chemistry/pbc/first_quantization/projectile/select_t_test.py @@ -25,6 +25,5 @@ def test_sel_t_proj(bloq_autotester): def test_select_kinetic_t_counts(): num_bits_n = 6 sel = SelectTFirstQuantizationWithProj(num_bits_n, 10) - counts = get_cost_value(sel, QECGatesCost()) - cost_dict = counts.total_t_and_ccz_count() - assert cost_dict['n_ccz'] == 5 * (num_bits_n - 1) + 2 + 1 + toffolis = get_cost_value(sel, QECGatesCost()).total_toffoli_only() + assert toffolis == 5 * (num_bits_n - 1) + 2 + 1