class_docstr: Tests the layering function
class_docstr_tok: ["Tests","the","layering","function"]
docstr: Tests that the layering function accepts Tensorflow variables.
docstr_tok: ["Tests","that","the","layering","function","accepts","Tensorflow","variables","."]
code: def test_layer_tf(self):
      """Tests that the layering function accepts Tensorflow variables."""
  
      import tensorflow as tf
  
      def unitary(param):
          qml.RX(param, wires=0)
  
      x = tf.Variable([0.1, 0.2, 0.3])
  
      with qml.tape.OperationRecorder() as rec:
          layer(unitary, 3, x)
  
      assert len(rec.operations) == 3
  
      for ii, op in enumerate(rec.operations):
          assert qml.math.allclose(op.parameters[0], x[ii])
          assert isinstance(op, qml.RX)
  
file_path: pennylane/tests/templates/test_layer.py
imports: import pytest
  import pennylane
  from pennylane import layer
label_desc: Use image node_id 3 for calling the TestLayer obj's underlying member method code with example usage: obj.test_layer_tf() without return types