class_docstr: Encodes :math:`N` features into the rotation angles of :math:`n` qubits, where :math:`N \leq n`.
  
  The rotations can be chosen as either :class:`~pennylane.ops.RX`, :class:`~pennylane.ops.RY`
  or :class:`~pennylane.ops.RZ` gates, as defined by the ``rotation`` parameter:
  
  * ``rotation='X'`` uses the features as angles of RX rotations
  
  * ``rotation='Y'`` uses the features as angles of RY rotations
  
  * ``rotation='Z'`` uses the features as angles of RZ rotations
  
  The length of ``features`` has to be smaller or equal to the number of qubits. If there are fewer entries in
  ``features`` than rotations, the circuit does not apply the remaining rotation gates.
  
  Args:
      features (tensor_like): input tensor of shape ``(N,)``, where N is the number of input features to embed,
          with :math:`N\leq n`
      wires (Any or Iterable[Any]): wires that the template acts on
      rotation (str): type of rotations used
      id (str): custom label given to an operator instance,
          can be useful for some applications where the instance has to be identified.
  
  Example:
  
      Angle embedding encodes the features by using the specified rotation operation.
  
      .. code-block:: python
  
          dev = qml.device('default.qubit', wires=3)
  
          @qml.qnode(dev)
          def circuit(feature_vector):
              qml.AngleEmbedding(features=feature_vector, wires=range(3), rotation='Z')
              qml.Hadamard(0)
              return qml.probs(wires=range(3))
  
          X = [1,2,3]
  
      Here, we have also used rotation angles :class:`RZ`. If not specified, :class:`RX` is used as default.
      The resulting circuit is:
  
      >>> print(qml.draw(circuit, expansion_strategy="device")(X))
      0: ──RZ(1.00)──H─┤ ╭Probs
      1: ──RZ(2.00)────┤ ├Probs
      2: ──RZ(3.00)────┤ ╰Probs
docstr: Representation of the operator as a product of other operators.
  
  .. math:: O = O_1 O_2 \dots O_n.
  
  
  
  .. seealso:: :meth:`~.AngleEmbedding.decomposition`.
  
  Args:
      features (tensor_like): input tensor of dimension ``(len(wires),)``
      wires (Any or Iterable[Any]): wires that the operator acts on
      rotation (.Operator): rotation gate class
  
  Returns:
      list[.Operator]: decomposition of the operator
  
  **Example**
  
  >>> features = torch.tensor([1., 2.])
  >>> qml.AngleEmbedding.compute_decomposition(features, wires=["a", "b"], rotation=qml.RX)
  [RX(tensor(1.), wires=['a']),
   RX(tensor(2.), wires=['b'])]
docstr_tok: ["Representation","of","the","operator","as","a","product","of","other","operators",".","..","math",":",":","O","=","O_1","O_2","\\dots","O_n",".","..","seealso",":",":",":","meth",":","`","~.AngleEmbedding.decomposition","`",".","Args",":","features","(","tensor_like",")",":","input","tensor","of","dimension","``","(","len","(","wires",")",",",")","``","wires","(","Any","or","Iterable","[","Any","]",")",":","wires","that","the","operator","acts","on","rotation","(",".Operator",")",":","rotation","gate","class","Returns",":","list","[",".Operator","]",":","decomposition","of","the","operator","*","*","Example","*","*",">",">",">","features","=","torch.tensor","(","[","1.",",","2",".","]",")",">",">",">","qml.AngleEmbedding.compute_decomposition","(","features",",","wires=","[","``","a","''",",","``","b","''","]",",","rotation=qml.RX",")","[","RX","(","tensor","(","1",".",")",",","wires=","[","'","a","'","]",")",",","RX","(","tensor","(","2",".",")",",","wires=","[","'","b","'","]",")","]"]
code: def compute_decomposition(
      features, wires, rotation
  ):  # pylint: disable=arguments-differ
      r"""Representation of the operator as a product of other operators.
  
      .. math:: O = O_1 O_2 \dots O_n.
  
  
  
      .. seealso:: :meth:`~.AngleEmbedding.decomposition`.
  
      Args:
          features (tensor_like): input tensor of dimension ``(len(wires),)``
          wires (Any or Iterable[Any]): wires that the operator acts on
          rotation (.Operator): rotation gate class
  
      Returns:
          list[.Operator]: decomposition of the operator
  
      **Example**
  
      >>> features = torch.tensor([1., 2.])
      >>> qml.AngleEmbedding.compute_decomposition(features, wires=["a", "b"], rotation=qml.RX)
      [RX(tensor(1.), wires=['a']),
       RX(tensor(2.), wires=['b'])]
      """
      batched = qml.math.ndim(features) > 1
      # We will iterate over the first axis of `features` together with iterating over the wires.
      # If the leading dimension is a batch dimension, exchange the wire and batching axes.
      features = qml.math.T(features) if batched else features
  
      return [
          rotation(features[i], wires=wires[i])
          for i in range(len(wires))
      ]
  
file_path: pennylane/pennylane/templates/embeddings/angle.py
imports: import pennylane
  from pennylane.ops import RX, RY, RZ
  from pennylane.operation import Operation, AnyWires
label_desc: Use image node_id 6 for calling the AngleEmbedding obj's underlying member method code with example usage: obj.compute_decomposition(features, wires, rotation) and returns: unknown