qml.workflow.interfaces.torch.execute

execute(tapes, execute_fn, jpc, device=None)[source]

Execute a batch of tapes with Torch parameters on a device.

Parameters
  • tapes (Sequence[QuantumTape]) – batch of tapes to execute

  • execute_fn (Callable[[Sequence[QuantumTape]], ResultBatch]) – a function that turns a batch of circuits into results

  • jpc (JacobianProductCalculator) – a class that can compute the vector jacobian product for the input tapes.

Returns

A nested tuple of tape results. Each element in the returned tuple corresponds in order to the provided tapes.

Return type

TensorLike