class_docstr: Test that broadcasting works as expected for the reduced_dm functions
class_docstr_tok: ["Test","that","broadcasting","works","as","expected","for","the","reduced_dm","functions"]
docstr: Test that broadcasting works for state vectors and single wires
docstr_tok: ["Test","that","broadcasting","works","for","state","vectors","and","single","wires"]
code: def test_sv_broadcast_single_wires(self, wires, array_func):
      """Test that broadcasting works for state vectors and single wires"""
      state_vector = array_func([sv[0] for sv in state_vectors])
      expected_density_matrices = array_func(
          [sv[1][wires[0]] for sv in state_vectors]
      )
  
      _density_matrices = fn.reduce_statevector(
          state_vector, indices=wires
      )
      assert np.allclose(_density_matrices, expected_density_matrices)
  
imports: import numpy
  import pytest
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 1 for calling the TestDensityMatrixBroadcasting obj's underlying member method code with example usage: obj.test_sv_broadcast_single_wires(wires, array_func) without return types