class_docstr: Implements an arbitrary unitary on the specified wires.
  
  An arbitrary unitary on :math:`n` wires is parametrized by :math:`4^n - 1`
  independent real parameters. This templates uses Pauli word rotations to
  parametrize the unitary.
  
  **Example**
  
  ArbitraryUnitary can be used as a building block, e.g. to parametrize arbitrary
  two-qubit operations in a circuit:
  
  .. code-block:: python
  
      def arbitrary_nearest_neighbour_interaction(weights, wires):
          qml.broadcast(unitary=ArbitraryUnitary, pattern="double", wires=wires, parameters=weights)
  
  Args:
      weights (tensor_like): The angles of the Pauli word rotations, needs to have length :math:`4^n - 1`
          where :math:`n` is the number of wires the template acts upon.
      wires (Iterable): wires that the template acts on
docstr: Representation of the operator as a product of other operators.
  
  .. math:: O = O_1 O_2 \dots O_n.
  
  
  
  .. seealso:: :meth:`~.ArbitraryUnitary.decomposition`.
  
  Args:
      weights (tensor_like): The angles of the Pauli word rotations, needs to have length :math:`4^n - 1`
              where :math:`n` is the number of wires the template acts upon.
      wires (Any or Iterable[Any]): wires that the operator acts on
  
  
  Returns:
      list[.Operator]: decomposition of the operator
docstr_tok: ["Representation","of","the","operator","as","a","product","of","other","operators",".","..","math",":",":","O","=","O_1","O_2","\\dots","O_n",".","..","seealso",":",":",":","meth",":","`","~.ArbitraryUnitary.decomposition","`",".","Args",":","weights","(","tensor_like",")",":","The","angles","of","the","Pauli","word","rotations",",","needs","to","have","length",":","math",":","`","4^n","-","1","`","where",":","math",":","`","n","`","is","the","number","of","wires","the","template","acts","upon",".","wires","(","Any","or","Iterable","[","Any","]",")",":","wires","that","the","operator","acts","on","Returns",":","list","[",".Operator","]",":","decomposition","of","the","operator"]
code: def compute_decomposition(
      weights, wires
  ):  # 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:`~.ArbitraryUnitary.decomposition`.
  
      Args:
          weights (tensor_like): The angles of the Pauli word rotations, needs to have length :math:`4^n - 1`
                  where :math:`n` is the number of wires the template acts upon.
          wires (Any or Iterable[Any]): wires that the operator acts on
  
  
      Returns:
          list[.Operator]: decomposition of the operator
      """
      op_list = []
  
      for i, pauli_word in enumerate(
          _all_pauli_words_but_identity(len(wires))
      ):
          op_list.append(
              PauliRot(weights[..., i], pauli_word, wires=wires)
          )
  
      return op_list
  
file_path: pennylane/pennylane/templates/subroutines/arbitrary_unitary.py
imports: import pennylane
  from pennylane.operation import Operation, AnyWires
  from pennylane.ops import PauliRot
label_desc: Use image node_id 2 for calling the ArbitraryUnitary obj's underlying member method code with example usage: obj.compute_decomposition(weights, wires) and returns: op_list