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
code: def __init__(self, weights, wires, id=None):
      shape = qml.math.shape(weights)
      dim = 4 ** len(wires) - 1
      if len(shape) not in (1, 2) or shape[-1] != dim:
          raise ValueError(
              f"Weights tensor must be of shape {(dim,)} or (batch_dim, {dim}); got {shape}."
          )
  
      super().__init__(weights, wires=wires, id=id)
  
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 1 to create a new ArbitraryUnitary object from inherited base classes: Operation with example: obj = ArbitraryUnitary(weights, wires, id)