class_docstr: Apply an arbitrary, fixed unitary matrix.
  
  **Details:**
  
  * Number of wires: Any (the operation can act on any number of wires)
  * Number of parameters: 1
  * Gradient recipe: None
  
  Args:
      U (array[complex]): square unitary matrix
      wires(Sequence[int] or int): the wire(s) the operation acts on
      id (str): custom label given to an operator instance,
          can be useful for some applications where the instance has to be identified.
  
  **Example**
  
  >>> dev = qml.device('default.qutrit', wires=1)
  >>> U = np.array([[1, 1, 0], [1, -1, 0], [0, 0, np.sqrt(2)]]) / np.sqrt(2)
  >>> @qml.qnode(dev)
  ... def example_circuit():
  ...     qml.QutritUnitary(U, wires=0)
  ...     return qml.state()
  >>> print(example_circuit())
  [0.70710678+0.j 0.70710678+0.j 0.        +0.j]
class_docstr_tok: ["Apply","an","arbitrary",",","fixed","unitary","matrix",".","*","*","Details",":","*","*","*","Number","of","wires",":","Any","(","the","operation","can","act","on","any","number","of","wires",")","*","Number","of","parameters",":","1","*","Gradient","recipe",":","None","Args",":","U","(","array","[","complex","]",")",":","square","unitary","matrix","wires","(","Sequence","[","int","]","or","int",")",":","the","wire","(","s",")","the","operation","acts","on","id","(","str",")",":","custom","label","given","to","an","operator","instance",",","can","be","useful","for","some","applications","where","the","instance","has","to","be","identified",".","*","*","Example","*","*",">",">",">","dev","=","qml.device","(","'default.qutrit","'",",","wires=1",")",">",">",">","U","=","np.array","(","[","[","1",",","1",",","0","]",",","[","1",",","-1",",","0","]",",","[","0",",","0",",","np.sqrt","(","2",")","]","]",")","\/","np.sqrt","(","2",")",">",">",">","@","qml.qnode","(","dev",")","...","def","example_circuit","(",")",":","...","qml.QutritUnitary","(","U",",","wires=0",")","...","return","qml.state","(",")",">",">",">","print","(","example_circuit","(",")",")","[","0.70710678+0.j","0.70710678+0.j","0",".","+0.j","]"]
docstr: Representation of the operator as a canonical matrix in the computational basis (static method).
  
  The canonical matrix is the textbook matrix representation that does not consider wires.
  Implicitly, this assumes that the wires of the operator correspond to the global wire order.
  
  .. seealso:: :meth:`~.QutritUnitary.matrix`
  
  Args:
      U (tensor_like): unitary matrix
  
  Returns:
      tensor_like: canonical matrix
  
  **Example**
  
  >>> U = np.array([[1, 1, 0], [1, -1, 0], [0, 0, np.sqrt(2)]]) / np.sqrt(2)
  >>> qml.QutritUnitary.compute_matrix(U)
  array([[ 0.70710678,  0.70710678,  0.        ],
         [ 0.70710678, -0.70710678,  0.        ],
         [ 0.        ,  0.        ,  1.        ]])
docstr_tok: ["Representation","of","the","operator","as","a","canonical","matrix","in","the","computational","basis","(","static","method",")",".","The","canonical","matrix","is","the","textbook","matrix","representation","that","does","not","consider","wires",".","Implicitly",",","this","assumes","that","the","wires","of","the","operator","correspond","to","the","global","wire","order",".","..","seealso",":",":",":","meth",":","`","~.QutritUnitary.matrix","`","Args",":","U","(","tensor_like",")",":","unitary","matrix","Returns",":","tensor_like",":","canonical","matrix","*","*","Example","*","*",">",">",">","U","=","np.array","(","[","[","1",",","1",",","0","]",",","[","1",",","-1",",","0","]",",","[","0",",","0",",","np.sqrt","(","2",")","]","]",")","\/","np.sqrt","(","2",")",">",">",">","qml.QutritUnitary.compute_matrix","(","U",")","array","(","[","[","0.70710678",",","0.70710678",",","0",".","]",",","[","0.70710678",",","-0.70710678",",","0",".","]",",","[","0.",",","0.",",","1",".","]","]",")"]
code: def compute_matrix(U):  # pylint: disable=arguments-differ
      r"""Representation of the operator as a canonical matrix in the computational basis (static method).
  
      The canonical matrix is the textbook matrix representation that does not consider wires.
      Implicitly, this assumes that the wires of the operator correspond to the global wire order.
  
      .. seealso:: :meth:`~.QutritUnitary.matrix`
  
      Args:
          U (tensor_like): unitary matrix
  
      Returns:
          tensor_like: canonical matrix
  
      **Example**
  
      >>> U = np.array([[1, 1, 0], [1, -1, 0], [0, 0, np.sqrt(2)]]) / np.sqrt(2)
      >>> qml.QutritUnitary.compute_matrix(U)
      array([[ 0.70710678,  0.70710678,  0.        ],
             [ 0.70710678, -0.70710678,  0.        ],
             [ 0.        ,  0.        ,  1.        ]])
      """
      return U
  
imports: import warnings
  import pennylane
  from pennylane.operation import AnyWires, Operation
  from pennylane.wires import Wires
label_desc: Use image node_id 2 for calling the QutritUnitary obj's underlying member method code with example usage: obj.compute_matrix(U) and returns: U