class_docstr: ControlledQutritUnitary(U, control_wires, wires, control_values)
  Apply an arbitrary fixed unitary to ``wires`` with control from the ``control_wires``.
  
  In addition to default ``Operation`` instance attributes, the following are
  available for ``ControlledQutritUnitary``:
  
  * ``control_wires``: wires that act as control for the operation
  * ``U``: unitary applied to the target wires. Accessible via ``op.parameters[0]``
  * ``control_values``: a string of trits representing the state of the control
    qutrits to control on (default is the all 2s state)
  
  **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
      control_wires (Union[Wires, Sequence[int], or int]): the control wire(s)
      wires (Union[Wires, Sequence[int], or int]): the wire(s) the unitary acts on
      control_values (str): a string of trits representing the state of the control
          qutrits to control on (default is the all 2s state)
  
  **Example**
  
  The following shows how a single-qutrit unitary can be applied to wire ``2`` with control on
  both wires ``0`` and ``1``:
  
  >>> U = np.array([[1, 1, 0], [1, -1, 0], [0, 0, np.sqrt(2)]]) / np.sqrt(2)
  >>> qml.ControlledQutritUnitary(U, control_wires=[0, 1], wires=2)
  
  By default, controlled operations apply the desired gate if the control qutrit(s)
  are all in the state :math:`\vert 2\rangle`. However, there are some situations where
  it is necessary to apply a gate conditioned on all control qutrits being in the
  :math:`\vert 0\rangle` or :math:`\vert 1\rangle` state, or a mix of the three.
  
  The state on which to control can be changed by passing a string of trits to
  ``control_values``. For example, if we want to apply a single-qutrit unitary to
  wire ``3`` conditioned on three wires where the first is in state ``0``, the
  second is in state ``1``, and the third in state ``2``, we can write:
  
  >>> qml.ControlledQutritUnitary(U, control_wires=[0, 1, 2], wires=3, control_values='012')
class_docstr_tok: ["ControlledQutritUnitary","(","U",",","control_wires",",","wires",",","control_values",")","Apply","an","arbitrary","fixed","unitary","to","``","wires","``","with","control","from","the","``","control_wires","``",".","In","addition","to","default","``","Operation","``","instance","attributes",",","the","following","are","available","for","``","ControlledQutritUnitary","``",":","*","``","control_wires","``",":","wires","that","act","as","control","for","the","operation","*","``","U","``",":","unitary","applied","to","the","target","wires",".","Accessible","via","``","op.parameters","[","0","]","``","*","``","control_values","``",":","a","string","of","trits","representing","the","state","of","the","control","qutrits","to","control","on","(","default","is","the","all","2s","state",")","*","*","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","control_wires","(","Union","[","Wires",",","Sequence","[","int","]",",","or","int","]",")",":","the","control","wire","(","s",")","wires","(","Union","[","Wires",",","Sequence","[","int","]",",","or","int","]",")",":","the","wire","(","s",")","the","unitary","acts","on","control_values","(","str",")",":","a","string","of","trits","representing","the","state","of","the","control","qutrits","to","control","on","(","default","is","the","all","2s","state",")","*","*","Example","*","*","The","following","shows","how","a","single-qutrit","unitary","can","be","applied","to","wire","``","2","``","with","control","on","both","wires","``","0","``","and","``","1","``",":",">",">",">","U","=","np.array","(","[","[","1",",","1",",","0","]",",","[","1",",","-1",",","0","]",",","[","0",",","0",",","np.sqrt","(","2",")","]","]",")","\/","np.sqrt","(","2",")",">",">",">","qml.ControlledQutritUnitary","(","U",",","control_wires=","[","0",",","1","]",",","wires=2",")","By","default",",","controlled","operations","apply","the","desired","gate","if","the","control","qutrit","(","s",")","are","all","in","the","state",":","math",":","`","\\vert","2\\rangle","`",".","However",",","there","are","some","situations","where","it","is","necessary","to","apply","a","gate","conditioned","on","all","control","qutrits","being","in","the",":","math",":","`","\\vert","0\\rangle","`","or",":","math",":","`","\\vert","1\\rangle","`","state",",","or","a","mix","of","the","three",".","The","state","on","which","to","control","can","be","changed","by","passing","a","string","of","trits","to","``","control_values","``",".","For","example",",","if","we","want","to","apply","a","single-qutrit","unitary","to","wire","``","3","``","conditioned","on","three","wires","where","the","first","is","in","state","``","0","``",",","the","second","is","in","state","``","1","``",",","and","the","third","in","state","``","2","``",",","we","can","write",":",">",">",">","qml.ControlledQutritUnitary","(","U",",","control_wires=","[","0",",","1",",","2","]",",","wires=3",",","control_values='012","'",")"]
code: def pow(self, z):
      if isinstance(z, int):
          return [
              ControlledQutritUnitary(
                  qml.math.linalg.matrix_power(self.data[0], z),
                  control_wires=self.control_wires,
                  wires=self.hyperparameters["u_wires"],
                  control_values=self.hyperparameters["control_values"],
              )
          ]
      return super().pow(z)
  
imports: import warnings
  import pennylane
  from pennylane.operation import AnyWires, Operation
  from pennylane.wires import Wires
label_desc: Use image node_id 5 for calling the ControlledQutritUnitary obj's underlying member method code with example usage: obj.pow(z) and returns: super, list