diff --git a/tests/test_models_encodings.py b/tests/test_models_encodings.py index d0c255ae49..7862a1e0f4 100644 --- a/tests/test_models_encodings.py +++ b/tests/test_models_encodings.py @@ -40,7 +40,7 @@ def test_unary_encoder(backend, nqubits): @pytest.mark.parametrize("seed", [None, 10, np.random.default_rng(10)]) -@pytest.mark.parametrize("nqubits", [8, 16]) +@pytest.mark.parametrize("nqubits", [8]) def test_unary_encoder_random_gaussian(backend, nqubits, seed): """Tests if encoded vector are random variables sampled from Gaussian distribution with 0.0 mean and variance close to the norm diff --git a/tests/test_quantum_info_metrics.py b/tests/test_quantum_info_metrics.py index 06efa6c61f..2903102839 100644 --- a/tests/test_quantum_info_metrics.py +++ b/tests/test_quantum_info_metrics.py @@ -598,7 +598,7 @@ def test_entangling_capability(backend): entangling_capability(circuit, samples, backend=backend) nqubits = 2 - samples = 500 + samples = 100 c1 = Circuit(nqubits) c1.add([gates.RX(q, 0, trainable=True) for q in range(nqubits)]) @@ -631,7 +631,7 @@ def test_expressibility(backend): expressibility(circuit, t, samples, backend=backend) nqubits = 2 - samples = 500 + samples = 100 t = 1 c1 = Circuit(nqubits) @@ -652,9 +652,9 @@ def test_expressibility(backend): backend.assert_allclose(expr_1 < expr_2 < expr_3, True) -@pytest.mark.parametrize("samples", [int(1e2)]) +@pytest.mark.parametrize("samples", [int(1e1)]) @pytest.mark.parametrize("power_t", [2]) -@pytest.mark.parametrize("nqubits", [2, 3, 4]) +@pytest.mark.parametrize("nqubits", [2, 3]) def test_frame_potential(backend, nqubits, power_t, samples): depth = int(np.ceil(nqubits * power_t)) diff --git a/tests/test_quantum_info_random.py b/tests/test_quantum_info_random.py index 7704970cc6..01000ab822 100644 --- a/tests/test_quantum_info_random.py +++ b/tests/test_quantum_info_random.py @@ -37,7 +37,7 @@ def test_uniform_sampling_U3(backend, seed): Y = backend.cast(matrices.Y, dtype=matrices.Y.dtype) Z = backend.cast(matrices.Z, dtype=matrices.Z.dtype) - ngates = int(1e4) + ngates = int(1e3) phases = uniform_sampling_U3(ngates, seed=seed, backend=backend) # expectation values in the 3 directions should be the same diff --git a/tests/test_quantum_info_utils.py b/tests/test_quantum_info_utils.py index 4820a0fe5a..f873078bb4 100644 --- a/tests/test_quantum_info_utils.py +++ b/tests/test_quantum_info_utils.py @@ -180,16 +180,16 @@ def test_haar_integral_errors(backend): test = haar_integral(nqubits, power_t, samples=samples, backend=backend) -@pytest.mark.parametrize("power_t", [1, 2, 3]) +@pytest.mark.parametrize("power_t", [1, 2]) @pytest.mark.parametrize("nqubits", [2, 3]) def test_haar_integral(backend, nqubits, power_t): - samples = int(1e4) + samples = int(1e3) haar_int_exact = haar_integral(nqubits, power_t, samples=None, backend=backend) haar_int_sampled = haar_integral(nqubits, power_t, samples=samples, backend=backend) - backend.assert_allclose(haar_int_sampled, haar_int_exact, atol=1e-2) + backend.assert_allclose(haar_int_sampled, haar_int_exact, atol=1e-1) def test_pqc_integral(backend):