From 46b36031050241ce47b991943d7f901993014533 Mon Sep 17 00:00:00 2001 From: Korbinian Kottmann <43949391+Qottmann@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:43:00 +0200 Subject: [PATCH] Fix hyper parameters for tests in pulse module (#4643) Some hyper parameters can be reduced to speed up slow jax tests while maintaining coverage. --- tests/gradients/core/test_pulse_gradient.py | 1 - tests/pulse/test_convenience_functions.py | 2 +- tests/pulse/test_parametrized_evolution.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/gradients/core/test_pulse_gradient.py b/tests/gradients/core/test_pulse_gradient.py index 8271996b4a8..609b08abb31 100644 --- a/tests/gradients/core/test_pulse_gradient.py +++ b/tests/gradients/core/test_pulse_gradient.py @@ -1534,7 +1534,6 @@ def ansatz(params): diff_method=stoch_pulse_grad, num_split_times=num_split_times, sampler_seed=7123, - cache=False, # remove once 3870 is merged ) qnode_backprop = qml.QNode(ansatz, dev, interface="jax") diff --git a/tests/pulse/test_convenience_functions.py b/tests/pulse/test_convenience_functions.py index 7d5a3cee4c0..2f0d060905f 100644 --- a/tests/pulse/test_convenience_functions.py +++ b/tests/pulse/test_convenience_functions.py @@ -190,7 +190,7 @@ def f1(p, t): ops = [qml.PauliX(0), qml.PauliY(1)] H = qml.dot(coeffs, ops) - t = (1, 2) + t = (1, 1.1) def generator(params): time_step = 1e-3 diff --git a/tests/pulse/test_parametrized_evolution.py b/tests/pulse/test_parametrized_evolution.py index 710e76345b2..f2f2fd08389 100644 --- a/tests/pulse/test_parametrized_evolution.py +++ b/tests/pulse/test_parametrized_evolution.py @@ -558,7 +558,7 @@ def test_time_dependent_hamiltonian(self, device_class): H = time_dependent_hamiltonian() dev = device_class(wires=2) - t = 2 + t = 0.1 def generator(params): time_step = 1e-3