class_docstr: Tests for the vjp function
class_docstr_tok: ["Tests","for","the","vjp","function"]
docstr: Tests that the vjp function matches the dtype of dy when dy is
  zero-like.
docstr_tok: ["Tests","that","the","vjp","function","matches","the","dtype","of","dy","when","dy","is","zero-like","."]
code: def test_dtype_matches_dy(self, dtype):
      """Tests that the vjp function matches the dtype of dy when dy is
      zero-like."""
      x = np.array([0.1], dtype=np.float64)
  
      with qml.queuing.AnnotatedQueue() as q:
          qml.RX(x[0], wires=0)
          qml.expval(qml.PauliZ(0))
  
      tape = qml.tape.QuantumScript.from_queue(q)
      dy = np.zeros(3, dtype=dtype)
      _, func = qml.gradients.vjp(tape, dy, qml.gradients.param_shift)
  
      assert func([]).dtype == dtype
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.gradients import param_shift
label_desc: Use image node_id 6 for calling the TestVJP obj's underlying member method code with example usage: obj.test_dtype_matches_dy(dtype) without return types