class_docstr: Test the construction of composite ops.
class_docstr_tok: ["Test","the","construction","of","composite","ops","."]
docstr: Test that the diagonalizing gates are correct when wires overlap.
docstr_tok: ["Test","that","the","diagonalizing","gates","are","correct","when","wires","overlap","."]
code: def test_diagonalizing_gates_overlapping(self):
      """Test that the diagonalizing gates are correct when wires overlap."""
      diag_op = ValidOp(qml.S(0), qml.PauliX(0))
      diagonalizing_gates = diag_op.diagonalizing_gates()
  
      assert len(diagonalizing_gates) == 1
      diagonalizing_mat = diagonalizing_gates[0].matrix()
  
      true_mat = np.eye(2)
  
      assert np.allclose(diagonalizing_mat, true_mat)
  
imports: from copy import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.operation import DecompositionUndefinedError
  from pennylane.ops.op_math import CompositeOp, Prod, Sum, SProd
  from pennylane.wires import Wires
label_desc: Use image node_id 15 for calling the TestConstruction obj's underlying member method code with example usage: obj.test_diagonalizing_gates_overlapping() without return types