class_docstr: Tests to ensure the transform is fully differentiable in all interfaces
  when the circuit contains two-qubit QubitUnitary operations.
  
  Note that we are not testing whether we can differentiate w.r.t. the two-qubit
  unitary itself, but rather that the entire pipeline remains differentiable even
  when we are decomposing two-qubit unitaries within.
docstr: Tests differentiability in tensorflow interface.
docstr_tok: ["Tests","differentiability","in","tensorflow","interface","."]
code: def test_gradient_unitary_to_rot_tf_two_qubits(self, diff_method):
      """Tests differentiability in tensorflow interface."""
      import tensorflow as tf
  
      # We have to mark these as constant, otherwise it will try to
      # differentiate with respect to them.
      U0 = tf.constant(test_two_qubit_unitaries[0], dtype=tf.complex128)
      U1 = tf.constant(test_two_qubit_unitaries[1], dtype=tf.complex128)
  
      def two_qubit_decomp_qnode(x):
          qml.RX(x, wires=0)
          qml.QubitUnitary(U0, wires=[0, 1])
          qml.QubitUnitary(U1, wires=[1, 2])
          return qml.expval(
              qml.PauliZ(0) @ qml.PauliZ(1) @ qml.PauliZ(2)
          )
  
      x = tf.Variable(0.1, dtype=tf.float64)
  
      transformed_x = tf.Variable(0.1, dtype=tf.float64)
  
      dev = qml.device("default.qubit", wires=3)
  
      original_qnode = qml.QNode(
          two_qubit_decomp_qnode,
          dev,
          interface="tf",
          diff_method=diff_method,
      )
  
      original_result = original_qnode(x)
  
      transformed_qfunc = unitary_to_rot(two_qubit_decomp_qnode)
      transformed_qnode = qml.QNode(
          transformed_qfunc,
          dev,
          interface="tf",
          diff_method=diff_method,
      )
  
      transformed_result = transformed_qnode(transformed_x)
  
      assert qml.math.allclose(original_result, transformed_result)
  
      assert len(transformed_qnode.qtape.operations) == 25
  
      with tf.GradientTape() as tape:
          loss = original_qnode(x)
      original_grad = tape.gradient(loss, x)
  
      with tf.GradientTape() as tape:
          loss = transformed_qnode(transformed_x)
      transformed_grad = tape.gradient(loss, transformed_x)
  
      # For 64bit values, need to slightly increase the tolerance threshold
      assert qml.math.allclose(
          original_grad, transformed_grad, atol=1e-7
      )
  
imports: from itertools import product
  import pytest
  from gate_data import I, Z, S, T, H, X
  from test_optimization.utils import check_matrix_equivalence
  import pennylane
  from pennylane import numpy
  from pennylane.wires import Wires
  from pennylane.transforms import unitary_to_rot
label_desc: Use image node_id 3 for calling the TestTwoQubitUnitaryDifferentiability obj's underlying member method code with example usage: obj.test_gradient_unitary_to_rot_tf_two_qubits(diff_method) and returns: qml