class_docstr: Test that the user-defined dtype of the device is preserved for QNode
  evaluation
class_docstr_tok: ["Test","that","the","user-defined","dtype","of","the","device","is","preserved","for","QNode","evaluation"]
docstr: Test that the user-defined dtype of the device is preserved
  for QNodes with complex-valued outputs
docstr_tok: ["Test","that","the","user-defined","dtype","of","the","device","is","preserved","for","QNodes","with","complex-valued","outputs"]
code: def test_complex_dtype(self, c_dtype, measurement):
      """Test that the user-defined dtype of the device is preserved
      for QNodes with complex-valued outputs"""
      p = 0.543
  
      dev = qml.device("default.mixed", wires=3, c_dtype=c_dtype)
  
      @qml.qnode(dev, diff_method="backprop")
      def circuit(x):
          qml.RX(x, wires=0)
          return qml.apply(measurement)
  
      res = circuit(p)
      assert res.dtype == c_dtype
  
imports: import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices.default_mixed import DefaultMixed
  from pennylane import DeviceError
label_desc: Use image node_id 2 for calling the TestDtypePreserved obj's underlying member method code with example usage: obj.test_complex_dtype(c_dtype, measurement) and returns: qml