Skip to content

Commit a4db7fc

Browse files
Fix test_multiply_by_xk_classical_action_slow (#1561)
Fix nightly tests
1 parent 8593e2d commit a4db7fc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qualtran/bloqs/gf_arithmetic/gf2_multiplication_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,14 @@ def test_multiply_by_xk_classical_action(n, k):
184184

185185

186186
@pytest.mark.slow
187-
@pytest.mark.parametrize(['n', 'k'], [(n, k) for n in range(4, 6) for k in range(1, 2 * n + 1)])
187+
@pytest.mark.parametrize(['n', 'k'], [(n, k) for n in range(4, 6) for k in range(1, n + 2)])
188188
def test_multiply_by_xk_classical_action_slow(n, k):
189189
blq = MultiplyPolyByOnePlusXk(n, k)
190190
fg_polys = tuple(itertools.product(range(2), repeat=n))[1:]
191191
h_polys = [*itertools.product(range(2), repeat=blq.signature[-1].shape[0])]
192+
h_polys = [
193+
h_polys[i] for i in np.random.choice(len(h_polys), min(len(h_polys), 20), replace=False)
194+
]
192195

193196
qlt_testing.assert_consistent_classical_action(blq, f=fg_polys, g=fg_polys, h=h_polys)
194197

0 commit comments

Comments
 (0)