class_docstr: Tests for the (reduced) density matrix for matrix.
class_docstr_tok: ["Tests","for","the","(","reduced",")","density","matrix","for","matrix","."]
docstr: Test the reduced_dm with matrix for single wires.
docstr_tok: ["Test","the","reduced_dm","with","matrix","for","single","wires","."]
code: def test_reduced_dm_with_matrix_single_wires(
      self, density_matrix, wires, expected_density_matrix
  ):
      """Test the reduced_dm with matrix for single wires."""
      density_matrix = fn.reduce_dm(density_matrix, 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 1 for calling the TestDensityMatrixFromMatrix obj's underlying member method code with example usage: obj.test_reduced_dm_with_matrix_single_wires(density_matrix, wires, expected_density_matrix) without return types