class_docstr: Tests for the (reduced) density matrix for matrix.
class_docstr_tok: ["Tests","for","the","(","reduced",")","density","matrix","for","matrix","."]
docstr: Test the density matrix from matrices for single wires with state checking
docstr_tok: ["Test","the","density","matrix","from","matrices","for","single","wires","with","state","checking"]
code: def test_reduce_dm_check(self, density_matrix, wires):
      """Test the density matrix from matrices for single wires with state checking"""
      # pylint: disable=protected-access
      returned_density_matrix = fn.quantum.reduce_dm(
          density_matrix, indices=wires, check_state=True
      )
      expected = density_matrix
      if wires == [1, 0]:
          expected = permute_two_qubit_dm(expected)
  
      assert np.allclose(returned_density_matrix, expected)
  
imports: import numpy
  import pytest
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 3 for calling the TestDensityMatrixFromMatrix obj's underlying member method code with example usage: obj.test_reduce_dm_check(density_matrix, wires) without return types