class_docstr: Test the Rademacher distribution sampler.
class_docstr_tok: ["Test","the","Rademacher","distribution","sampler","."]
docstr: Test that the output differs for different seeds.
docstr_tok: ["Test","that","the","output","differs","for","different","seeds","."]
code: def test_differing_seeds(self):
      """Test that the output differs for different seeds."""
      ids = [0, 1, 2, 3, 4]
      num = 5
      seeds = [42, 43]
      rng = np.random.default_rng(seeds[0])
      first_direction = _rademacher_sampler(ids, num, rng=rng)
      rng = np.random.default_rng(seeds[1])
      second_direction = _rademacher_sampler(ids, num, rng=rng)
      assert not np.allclose(first_direction, second_direction)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.gradients import spsa_grad
  from pennylane.gradients.spsa_gradient import _rademacher_sampler
  from pennylane.operation import AnyWires, Observable
label_desc: Use image node_id 3 for calling the TestRademacherSampler obj's underlying member method code with example usage: obj.test_differing_seeds() without return types