Skip to content

Commit 2264b4b

Browse files
committed
update ham-sim poly test
1 parent f303ec9 commit 2264b4b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

qualtran/bloqs/generalized_qsp_test.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -328,13 +328,13 @@ def test_generalized_qsp_with_exp_cos_approx_on_random_unitaries(
328328

329329
for _ in range(5):
330330
U = RandomGate.create(bitsize, random_state=random_state)
331-
P = HamiltonianSimulationByGQSP(
332-
None, t=t, alpha=alpha, precision=precision
333-
).approx_cos / np.sqrt(2)
331+
gqsp = HamiltonianSimulationByGQSP(None, t=t, alpha=alpha, precision=precision).gqsp
332+
P, Q = gqsp.P, gqsp.Q
333+
334334
check_polynomial_pair_on_random_points_on_unit_circle(
335-
P, P, random_state=random_state, rtol=2 * precision
335+
P, Q, random_state=random_state, rtol=2 * precision
336336
)
337-
verify_generalized_qsp(U, P, P, negative_power=len(P) // 2)
337+
verify_generalized_qsp(U, P, Q, negative_power=len(P) // 2)
338338

339339

340340
@frozen

0 commit comments

Comments
 (0)