class_docstr: Tests of input validation and output correctness of function `generate_shift_rule`.
class_docstr_tok: ["Tests","of","input","validation","and","output","correctness","of","function","`","generate_shift_rule","`","."]
docstr: Tests the correct non-equidistant eight term shift rule is generated given the
  frequencies using the default shifts. The frequency [1,4,5,6] corresponds to e.g.
  a 2-qubit generator of the form: 1/2*X0Y1 + 5/2*Y0X1.
code: def test_eight_term_rule_non_equidistant_default_shifts(self):
      """Tests the correct non-equidistant eight term shift rule is generated given the
      frequencies using the default shifts. The frequency [1,4,5,6] corresponds to e.g.
      a 2-qubit generator of the form: 1/2*X0Y1 + 5/2*Y0X1."""
  
      frequencies = (1, 4, 5, 6)
  
      correct_terms = [
          [2.8111804455102014, np.pi / 8],
          [-2.8111804455102014, -np.pi / 8],
          [0.31327576445128014, 3 * np.pi / 8],
          [-0.31327576445128014, -3 * np.pi / 8],
          [-0.8080445791083615, 5 * np.pi / 8],
          [0.8080445791083615, -5 * np.pi / 8],
          [-0.3101398980494395, 7 * np.pi / 8],
          [0.3101398980494395, -7 * np.pi / 8],
      ]
  
      generated_terms = generate_shift_rule(frequencies)
  
      assert np.allclose(generated_terms, correct_terms)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.gradients.general_shift_rules import eigvals_to_frequencies, frequencies_to_period, generate_shift_rule, _get_shift_rule, generate_multi_shift_rule, generate_shifted_tapes, generate_multishifted_tapes, _iterate_shift_rule_with_multipliers
label_desc: Use image node_id 5 for calling the TestGenerateShiftRule obj's underlying member method code with example usage: obj.test_eight_term_rule_non_equidistant_default_shifts() without return types