Skip to content

Remove global random seed fixture - #1458

Open
SripriyaDevarapalli wants to merge 1 commit into
quantumlib:mainfrom
SripriyaDevarapalli:issue-1060-local-rng
Open

SripriyaDevarapalli wants to merge 1 commit into
quantumlib:mainfrom
SripriyaDevarapalli:issue-1060-local-rng

Conversation

@SripriyaDevarapalli

Copy link
Copy Markdown

Addresses #1060.

The test suite previously reset Python and NumPy global random state
before every test. This removes that autouse fixture so tests can rely
on pytest-randomly for per-test random-state handling.

The collection-time seeds in pytest_configure are retained because they
are used for deterministic parameterization during test collection.

Tests:

  • 190 RNG-related tests passed
  • Full suite: 2223 passed, 66 skipped, 1 pre-existing Windows/Python 3.14
    forkserver failure

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the set_random_seed autouse fixture from conftest.py, which previously set a fixed random seed using random.seed(0) and np.random.seed(0) during testing. There are no review comments, and I have no additional feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant