From 304dc96b84c676710733d0e8874b68885c2a7387 Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Thu, 21 Dec 2023 08:39:43 +0400 Subject: [PATCH 1/5] `metrics` --- tests/test_quantum_info_metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_quantum_info_metrics.py b/tests/test_quantum_info_metrics.py index 06efa6c61f..58545367d8 100644 --- a/tests/test_quantum_info_metrics.py +++ b/tests/test_quantum_info_metrics.py @@ -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)) From 9c772eb4a5a4867c7e0c7c8f3593ba52f8728b44 Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Thu, 21 Dec 2023 08:42:27 +0400 Subject: [PATCH 2/5] `encodings` --- tests/test_models_encodings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 49c83d9a1675ca51022a2f35b364307735c6f32a Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Thu, 21 Dec 2023 08:45:32 +0400 Subject: [PATCH 3/5] `random_ensembles` --- tests/test_quantum_info_random.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From e7ad55b0e015b7dc054c87a0e4944e1aa2b6c8ad Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Thu, 21 Dec 2023 08:49:58 +0400 Subject: [PATCH 4/5] `utils` --- tests/test_quantum_info_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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): From 2f895259726656783f76fa4105d69e7793e90bdd Mon Sep 17 00:00:00 2001 From: Renato Mello Date: Thu, 21 Dec 2023 09:41:32 +0400 Subject: [PATCH 5/5] `entangling capacity` and `expressibility` --- tests/test_quantum_info_metrics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_quantum_info_metrics.py b/tests/test_quantum_info_metrics.py index 58545367d8..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)