class_docstr: Test that all operations in the ``supports_broadcasting`` attribute
  actually support broadcasting.
docstr: Test that DiagonalQubitUnitary, which is marked as supporting parameter broadcasting,
  actually does support broadcasting.
docstr_tok: ["Test","that","DiagonalQubitUnitary",",","which","is","marked","as","supporting","parameter","broadcasting",",","actually","does","support","broadcasting","."]
code: def test_diagonal_qubit_unitary(self):
      """Test that DiagonalQubitUnitary, which is marked as supporting parameter broadcasting,
      actually does support broadcasting."""
      diag = np.array(
          [[1j, 1, 1, -1j], [-1j, 1j, 1, -1], [1j, -1j, 1.0, -1]]
      )
      wires = ["a", 5]
  
      op = qml.DiagonalQubitUnitary(diag, wires=wires)
  
      mat1 = op.matrix()
      mat2 = qml.DiagonalQubitUnitary.compute_matrix(diag)
      single_mats = [
          qml.DiagonalQubitUnitary(d, wires=wires).matrix()
          for d in diag
      ]
  
      assert qml.math.allclose(mat1, single_mats)
      assert qml.math.allclose(mat2, single_mats)
  
imports: import itertools
  import pytest
  import numpy
  from scipy.stats import unitary_group
  import pennylane
  from pennylane.ops.qubit.attributes import Attribute, has_unitary_generator
  from pennylane.operation import AnyWires
label_desc: Use image node_id 9 for calling the TestSupportsBroadcasting obj's underlying member method code with example usage: obj.test_diagonal_qubit_unitary() without return types