class_docstr: Tests for the functions involved in obtaining post-rotations necessary in the measurement
  optimization schemes implemented in :mod:`grouping`.
class_docstr_tok: ["Tests","for","the","functions","involved","in","obtaining","post-rotations","necessary","in","the","measurement","optimization","schemes","implemented","in",":","mod",":","`","grouping","`","."]
docstr: Checks whether the two input gates are identical up to a certain threshold in their
  parameters.
  
  Arguments:
      gate_1 (Union[RX, RY, RZ]): the first single-qubit rotation gate
      gate_2 (Union[RX, RY, RZ]): the second single-qubit rotation gate
  
  Keyword arguments:
      param_tol (float): the absolute tolerance for considering whether two gates parameter
          values are the same
  
  Returns:
      bool: whether the input rotation gates are identical up to the parameter tolerance
docstr_tok: ["Checks","whether","the","two","input","gates","are","identical","up","to","a","certain","threshold","in","their","parameters",".","Arguments",":","gate_1","(","Union","[","RX",",","RY",",","RZ","]",")",":","the","first","single-qubit","rotation","gate","gate_2","(","Union","[","RX",",","RY",",","RZ","]",")",":","the","second","single-qubit","rotation","gate","Keyword","arguments",":","param_tol","(","float",")",":","the","absolute","tolerance","for","considering","whether","two","gates","parameter","values","are","the","same","Returns",":","bool",":","whether","the","input","rotation","gates","are","identical","up","to","the","parameter","tolerance"]
code: def are_identical_rotation_gates(
      self, gate_1, gate_2, param_tol=1e-6
  ):
      """Checks whether the two input gates are identical up to a certain threshold in their
      parameters.
  
      Arguments:
          gate_1 (Union[RX, RY, RZ]): the first single-qubit rotation gate
          gate_2 (Union[RX, RY, RZ]): the second single-qubit rotation gate
  
      Keyword arguments:
          param_tol (float): the absolute tolerance for considering whether two gates parameter
              values are the same
  
      Returns:
          bool: whether the input rotation gates are identical up to the parameter tolerance
  
      """
  
      return (
          gate_1.wires == gate_2.wires
          and np.allclose(
              gate_1.parameters,
              gate_2.parameters,
              atol=param_tol,
              rtol=0,
          )
          and gate_1.name == gate_2.name
      )
  
file_path: pennylane/tests/test_measurement_transformations.py
imports: import pytest
  import numpy
  from pennylane import PauliX, PauliY, PauliZ, Identity, Hadamard, Hermitian, RX, RY, U3
  from pennylane.pauli import are_identical_pauli_words, qwc_rotation, diagonalize_pauli_word, diagonalize_qwc_pauli_words
label_desc: Use image node_id 1 for calling the TestMeasurementTransformations obj's underlying member method code with example usage: obj.are_identical_rotation_gates(gate_1, gate_2, param_tol) and returns: unknown