qml.interfaces.tf.to_tf

to_tf(qnode, dtype=None)[source]

Function that accepts a QNode, and returns a TensorFlow eager-execution-compatible QNode.

Parameters
  • qnode (QNode) – a PennyLane QNode

  • dtype (tf.DType) – target output type of QNode; uses the TensorFlow equivalent of the QNode output type if dtype is not specified

Returns

the QNode as a TensorFlow function

Return type

function