From 5f3d1d32c8851ebf935a7aa4aaa82dd42292b2c0 Mon Sep 17 00:00:00 2001 From: Joey Carter Date: Thu, 10 Oct 2024 18:21:50 -0400 Subject: [PATCH] Seed non-deterministic TestMeasurementTransforms test (#1200) **Context:** We noticed a non-deterministic failing pytest, `TestMeasurementTransforms.test_measurement_from_samples_single_measurement_analytic`. We can fix the non-deterministic failure by seeding the qjit-ed circuit. **Description of the Change:** Replace `@qjit` decorator with `@qjit(seed=37)`. --- frontend/test/pytest/test_measurement_transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/test/pytest/test_measurement_transforms.py b/frontend/test/pytest/test_measurement_transforms.py index c79e42a4ca..81bac53925 100644 --- a/frontend/test/pytest/test_measurement_transforms.py +++ b/frontend/test/pytest/test_measurement_transforms.py @@ -489,7 +489,7 @@ def test_measurement_from_samples_single_measurement_analytic( dev = qml.device("lightning.qubit", wires=4, shots=shots) - @qml.qjit + @qml.qjit(seed=37) @partial(measurements_from_samples, device_wires=dev.wires) @qml.qnode(dev) def circuit(theta: float):