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 non-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_custom_shifts(self):
      """Tests the correct non-equidistant eight term shift rule is generated given the
      frequencies using non-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)
      custom_shifts = (
          1 / 13 * np.pi,
          3 / 7 * np.pi,
          2 / 3 * np.pi,
          3 / 4 * np.pi,
      )
  
      correct_terms = [
          [2.709571194594805, np.pi / 13],
          [-2.709571194594805, -np.pi / 13],
          [-0.12914139932030527, 3 * np.pi / 7],
          [0.12914139932030527, -3 * np.pi / 7],
          [-0.3820906256032637, 2 * np.pi / 3],
          [0.3820906256032637, -2 * np.pi / 3],
          [0.436088184940856, 3 * np.pi / 4],
          [-0.436088184940856, -3 * np.pi / 4],
      ]
  
      generated_terms = generate_shift_rule(frequencies, custom_shifts)
  
      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 6 for calling the TestGenerateShiftRule obj's underlying member method code with example usage: obj.test_eight_term_rule_non_equidistant_custom_shifts() without return types