class_docstr: A device driver that can control one or more backends. A backend can be either a physical
  Quantum Processing Unit or a virtual one such as a simulator.
  
  Only the ``execute`` method must be defined to construct a device driver.
  
  .. details::
      :title: Design Motivation
  
      **Streamlined interface:** Only methods that are required to interact with the rest of PennyLane will be placed in the
      interface. Developers will be able to clearly see what they can change while still having a fully functional device.
  
      **Reduction of duplicate methods:** Methods that solve similar problems are combined together. Only one place will have
      to solve each individual problem.
  
      **Support for dynamic execution configurations:** Properties such as shots belong to specific executions.
  
      **Greater coverage for differentiation methods:** Devices can define any order of derivative, the vector jacobian product,
      or the jacobian vector product.  Calculation of derivatives can be done at the same time as execution to allow reuse of intermediate
      results.
  
  .. details::
      :title: Porting from the old interface
  
      :meth:`pennylane.Device.batch_execute` and :meth:`~pennylane.Device.execute` are now a single method, :meth:`~.Device.execute`
  
      :meth:`~.Device.batch_transform` and :meth:`~.Device.expand_fn` are now a single method, :meth:`~.Device.preprocess`
  
      Shot information is no longer stored on the device, but instead specified on individual input :class:`~.QuantumTape`.
  
      The old devices defined a :meth:`~.Device.capabilities` dictionary that defined characteristics of the devices and controlled various
      preprocessing and validation steps, such as ``"supports_broadcasting"``.  These capabilites should now be handled by the
      :meth:`~.Device.preprocess` method. For example, if a device does not support broadcasting, ``preprocess`` should
      split a quantum script with broadcasted parameters into a batch of quantum scripts. If the device does not support mid circuit
      measurements, then ``preprocess`` should apply :func:`~.defer_measurements`.  A set of default preprocessing steps will be available
      to make a seamless transition to the new interface.
  
      A class will be provided to easily construct default preprocessing steps from supported operations, supported observables,
      supported measurement processes, and various capabilities.
  
      Utility functions will be added to the ``devices`` module to query whether or not the device driver can do certain things, such
      as ``devices.supports_operator(op, dev, native=True)``. These functions will work by checking the behaviour of :meth:`~.Device.preprocess`
      to certain inputs.
  
      Versioning should be specified by the package containing the device. If an external package includes a PennyLane device,
      then the package requirements should specify the minimium PennyLane version required to work with the device.
  
  .. details::
      :title: The relationship between preprocessing and execution
  
      The :meth:`~.preprocess` method is assumed to be run before any :meth:`~.execute` or differentiation method.
      If an arbitrary, non-preprocessed circuit is provided, :meth:`~.execute` has no responsibility to perform any
      validation or provide clearer error messages.
  
      >>> op = qml.Permute(["c", 3,"a",2,0], wires=[3,2,"a",0,"c"])
      >>> circuit = qml.tape.QuantumScript([op], [qml.state()])
      >>> dev = DefaultQubit()
      >>> dev.execute(circuit)
      MatrixUndefinedError
      >>> circuit = qml.tape.QuantumScript([qml.Rot(1.2, 2.3, 3.4, 0)], [qml.expval(qml.PauliZ(0))])
      >>> config = ExecutionConfig(gradient_method="adjoint")
      >>> dev.compute_derivatives(circuit, config)
      ValueError: Operation Rot is not written in terms of a single parameter
      >>> new_circuit, postprocessing, new_config = dev.preprocess(circuit, config)
      >>> dev.compute_derivatives(new_circuit, new_config)
      ((array(0.), array(-0.74570521), array(0.)),)
  
      Any validation checks or error messages should occur in :meth:`~.preprocess` to avoid failures after expending
      computation resources.
  
  .. details::
      :title: Execution Configuration
  
      Execution config properties related to configuring a device include:
  
      * ``device_options``: A dictionary of device specific options. For example, the python device may have ``multiprocessing_mode``
        as a key. These should be documented in the class docstring.
  
      * ``gradient_method``: A device can choose to have native support for any type of gradient method. If the method
        :meth:`~.supports_derivatives` returns ``True`` for a particular gradient method, it will be treated as a device
        derivative and not handled by pennylane core code.
  
      * ``gradient_keyword_arguments``: Options for the gradient method.
  
      * ``derivative_order``: Relevant for requested device derivatives.
docstr: Whether or not a given device defines a custom jacobian vector product.
  
  Args:
      execution_config (ExecutionConfig): A description of the hyperparameters for the desired computation.
      circuit (None, QuantumTape): A specific circuit to check differentation for.
  
  Default behaviour assumes this to be ``True`` if :meth:`~.compute_jvp` is overridden.
docstr_tok: ["Whether","or","not","a","given","device","defines","a","custom","jacobian","vector","product",".","Args",":","execution_config","(","ExecutionConfig",")",":","A","description","of","the","hyperparameters","for","the","desired","computation",".","circuit","(","None",",","QuantumTape",")",":","A","specific","circuit","to","check","differentation","for",".","Default","behaviour","assumes","this","to","be","``","True","``","if",":","meth",":","`","~.compute_jvp","`","is","overridden","."]
code: def supports_jvp(
      self,
      execution_config: Optional[ExecutionConfig] = None,
      circuit: Optional[QuantumTape] = None,
  ) -> bool:
      """Whether or not a given device defines a custom jacobian vector product.
  
      Args:
          execution_config (ExecutionConfig): A description of the hyperparameters for the desired computation.
          circuit (None, QuantumTape): A specific circuit to check differentation for.
  
      Default behaviour assumes this to be ``True`` if :meth:`~.compute_jvp` is overridden.
  
      """
      return type(self).compute_jvp != Device.compute_jvp
  
imports: import abc
  from collections.abc import Iterable
  from numbers import Number
  from typing import Callable, Union, Sequence, Tuple, Optional
  from pennylane.measurements import Shots
  from pennylane.tape import QuantumTape
  from pennylane.typing import Result, ResultBatch
  from pennylane.wires import Wires
  from pennylane import Tracker
  from pennylane.transforms.core import TransformProgram
  from .execution_config import ExecutionConfig, DefaultExecutionConfig
label_desc: Use image node_id 13 for calling the Device obj's underlying member method code with example usage: obj.supports_jvp(execution_config, circuit) and returns: unknown