From a610cf4ec5f84a15c5ec06ad72fe1ed7430aaddb Mon Sep 17 00:00:00 2001 From: BrunoLiegiBastonLiegi Date: Sat, 3 Aug 2024 15:01:13 +0200 Subject: [PATCH] fix: fixed seed of random_clifford in test_decoding --- tests/test_models_decoding.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_models_decoding.py b/tests/test_models_decoding.py index cd24855..ea51f19 100644 --- a/tests/test_models_decoding.py +++ b/tests/test_models_decoding.py @@ -26,12 +26,13 @@ def test_state_layer(backend): @pytest.mark.parametrize("analytic", [True, False]) def test_expectation_layer(backend, analytic): backend.set_seed(42) + rng = np.random.default_rng(42) nqubits = 5 # test observable error with pytest.raises(RuntimeError): layer = ed.ExpectationLayer(nqubits, backend=backend) - c = random_clifford(nqubits, backend=backend) + c = random_clifford(nqubits, seed=rng, backend=backend) observable = hamiltonians.SymbolicHamiltonian( sum([Z(i) for i in range(nqubits)]), nqubits=nqubits,