docstr: Tests that setting a seed to ``default_rng`` gives reproducible results.
docstr_tok: ["Tests","that","setting","a","seed","to","``","default_rng","``","gives","reproducible","results","."]
code: def test_seed_reproducible(self):
      """Tests that setting a seed to ``default_rng`` gives reproducible results."""
  
      seed = 42
      size = (3, 2)
  
      rng1 = random.default_rng(seed)
      rng2 = random.default_rng(seed)
  
      assert isinstance(rng1, random.Generator)
      assert isinstance(rng2, random.Generator)
  
      mat1 = rng1.random(size=size)
      mat2 = rng2.random(size=size)
  
      assert np.all(mat1 == mat2)
  
      mat1_2 = rng1.normal(size=size)
      mat2_2 = rng2.normal(size=size)
  
      assert np.all(mat1_2 == mat2_2)
  
file_path: pennylane/tests/numpy/test_numpy_random.py
imports: import pytest
  from pennylane import numpy
  from pennylane.numpy import random
label_desc: Use image node_id 4 for calling the Test_default_rng obj's underlying member method code with example usage: obj.test_seed_reproducible() without return types