class_docstr: Test that the entropy transforms support broadcasting
docstr: Test that the relative_entropy transform supports broadcasting
docstr_tok: ["Test","that","the","relative_entropy","transform","supports","broadcasting"]
code: def test_relative_entropy_broadcast(self, device):
      """Test that the relative_entropy transform supports broadcasting"""
      dev = qml.device(device, wires=2)
  
      @qml.qnode(dev)
      def circuit_state(x):
          qml.IsingXX(x, wires=[0, 1])
          return qml.state()
  
      x = np.array([0.4, 0.6, 0.8])
      y = np.array([0.6, 0.8, 1.0])
      entropy = qml.qinfo.relative_entropy(
          circuit_state, circuit_state, wires0=[0], wires1=[1]
      )(x, y)
  
      eigs0 = np.stack([np.cos(x / 2) ** 2, np.sin(x / 2) ** 2])
      eigs1 = np.stack([np.cos(y / 2) ** 2, np.sin(y / 2) ** 2])
      expected = np.sum(eigs0 * np.log(eigs0), axis=0) - np.sum(
          eigs0 * np.log(eigs1), axis=0
      )
      assert qml.math.allclose(entropy, expected)
  
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 3 for calling the TestBroadcasting obj's underlying member method code with example usage: obj.test_relative_entropy_broadcast(device) and returns: qml