class_docstr: Tests for the (reduced) density matrix for matrix.
class_docstr_tok: ["Tests","for","the","(","reduced",")","density","matrix","for","matrix","."]
docstr: Test different complex dtype.
docstr_tok: ["Test","different","complex","dtype","."]
code: def test_density_matrix_c_dtype(self, density_matrix, wires, c_dtype):
      """Test different complex dtype."""
      if (
          fn.get_interface(density_matrix) == "jax"
          and c_dtype == "complex128"
      ):
          pytest.skip("Jax does not support complex 128")
      density_matrix = fn.reduce_dm(
          density_matrix, indices=wires, c_dtype=c_dtype
      )
      if fn.get_interface(density_matrix) == "torch":
          if c_dtype == "complex64":
              c_dtype = torch.complex64
          elif c_dtype == "complex128":
              c_dtype = torch.complex128
      assert density_matrix.dtype == c_dtype
  
imports: import numpy
  import pytest
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 11 for calling the TestDensityMatrixFromMatrix obj's underlying member method code with example usage: obj.test_density_matrix_c_dtype(density_matrix, wires, c_dtype) without return types