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 different complex dtype.
docstr_tok: ["Test","different","complex","dtype","."]
code: def test_density_matrix_c_dtype(
      self, array_func, state_vector, wires, c_dtype
  ):
      """Test different complex dtype."""
      state_vector = array_func(state_vector)
      if (
          fn.get_interface(state_vector) == "jax"
          and c_dtype == "complex128"
      ):
          pytest.skip("Jax does not support complex 128")
      density_matrix = fn.reduce_statevector(
          state_vector, indices=wires, c_dtype=c_dtype
      )
      if fn.get_interface(state_vector) == "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 TestDensityMatrixFromStateVectors obj's underlying member method code with example usage: obj.test_density_matrix_c_dtype(array_func, state_vector, wires, c_dtype) without return types