class_docstr: Test that the reduced_dm transform supports broadcasting
docstr: Test that broadcasting works for circuits returning state vectors
docstr_tok: ["Test","that","broadcasting","works","for","circuits","returning","state","vectors"]
code: def test_sv_broadcast(self, device, interface, tol):
      """Test that broadcasting works for circuits returning state vectors"""
      dev = qml.device(device, wires=2)
  
      @qml.qnode(dev, interface=interface)
      def circuit(x):
          qml.PauliX(0)
          qml.IsingXX(x, wires=[0, 1])
          return qml.state()
  
      x = qml.math.asarray([0.4, 0.6, 0.8], like=interface)
      density_matrix = qml.qinfo.reduced_dm(circuit, wires=[0])(x)
  
      expected = np.zeros((3, 2, 2))
      expected[:, 0, 0] = np.sin(x / 2) ** 2
      expected[:, 1, 1] = np.cos(x / 2) ** 2
  
      assert qml.math.allclose(expected, density_matrix, atol=tol)
  
file_path: pennylane/tests/qinfo/test_reduced_dm.py
imports: import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 1 for calling the TestBroadcasting obj's underlying member method code with example usage: obj.test_sv_broadcast(device, interface, tol) and returns: qml