class_docstr: Tests for creating a density matrix from state vectors.
class_docstr_tok: ["Tests","for","creating","a","density","matrix","from","state","vectors","."]
docstr: Test the reduced_dm with state vectors for single wires.
docstr_tok: ["Test","the","reduced_dm","with","state","vectors","for","single","wires","."]
code: def test_reduced_dm_with_state_vector_single_wires(
      self, state_vector, wires, expected_density_matrix, array_func
  ):
      """Test the reduced_dm with state vectors for single wires."""
      state_vector = array_func(state_vector)
      density_matrix = fn.reduce_statevector(
          state_vector, indices=wires
      )
      assert np.allclose(
          density_matrix, expected_density_matrix[wires[0]]
      )
  
imports: import numpy
  import pytest
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 3 for calling the TestDensityMatrixFromStateVectors obj's underlying member method code with example usage: obj.test_reduced_dm_with_state_vector_single_wires(state_vector, wires, expected_density_matrix, array_func) without return types