qml.workflow.interfaces.tensorflow.tf_execute¶
- tf_execute(tapes, execute_fn, jpc, device=None, differentiable=False)[source]¶
Execute a batch of tapes with TensorFlow 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 (VJP) for the input tapes.
- Keyword Arguments
device=None – not used for tensorflow
differentiable=False – whether or not the custom gradient vjp needs to be differentiable. Note that this keyword argument is unique to tensorflow.
- Returns
A nested tuple of tape results. Each element in the returned tuple corresponds in order to the provided tapes.
- Return type
TensorLike
code/api/pennylane.workflow.interfaces.tensorflow.tf_execute
Download Python script
Download Notebook
View on GitHub