class_docstr: Tests for the numeric computation of VJPs
class_docstr_tok: ["Tests","for","the","numeric","computation","of","VJPs"]
docstr: Test that using the JAX interface the dtype of the result is
  determined by the dtype of the dy.
docstr_tok: ["Test","that","using","the","JAX","interface","the","dtype","of","the","result","is","determined","by","the","dtype","of","the","dy","."]
code: def test_dtype_jax(self, dtype1, dtype2):
      """Test that using the JAX interface the dtype of the result is
      determined by the dtype of the dy."""
      import jax
  
      dtype = dtype1
      dtype1 = getattr(jax.numpy, dtype1)
      dtype2 = getattr(jax.numpy, dtype2)
  
      dy = tuple(
          [
              jax.numpy.array(1, dtype=dtype1),
              jax.numpy.array([1, 1], dtype=dtype1),
          ]
      )
      jac = tuple(
          [
              jax.numpy.array(1, dtype=dtype2),
              jax.numpy.array([1, 1], dtype=dtype2),
          ]
      )
      assert qml.gradients.compute_vjp_multi(dy, jac)[0].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 14 for calling the TestComputeVJP obj's underlying member method code with example usage: obj.test_dtype_jax(dtype1, dtype2) without return types