File tree Expand file tree Collapse file tree
qualtran/bloqs/gf_poly_arithmetic Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515from galois import Poly
1616
1717from qualtran .bloqs .gf_poly_arithmetic .gf2_poly_add import _gf2_poly_4_8_add , _gf2_poly_add_symbolic
18+ from qualtran .resource_counting import get_cost_value , QECGatesCost
1819from qualtran .testing import assert_consistent_classical_action
1920
2021
@@ -41,3 +42,13 @@ def test_gf2_poly_add_classical_sim():
4142 ]
4243 )
4344 assert_consistent_classical_action (bloq , f_x = f_x_range , g_x = f_x_range )
45+
46+
47+ def test_gf2_poly_add_resource ():
48+ bloq = _gf2_poly_4_8_add .make ()
49+ assert get_cost_value (bloq , QECGatesCost ()).total_t_count () == 0
50+ assert get_cost_value (bloq , QECGatesCost ()).clifford == bloq .qgf_poly .bitsize
51+
52+ bloq = _gf2_poly_add_symbolic .make ()
53+ assert get_cost_value (bloq , QECGatesCost ()).total_t_count () == 0
54+ assert get_cost_value (bloq , QECGatesCost ()).clifford == bloq .qgf_poly .bitsize
You can’t perform that action at this time.
0 commit comments