class_docstr: QubitUnitary(U, wires)
  Apply an arbitrary unitary matrix with a dimension that is a power of two.
  
  **Details:**
  
  * Number of wires: Any (the operation can act on any number of wires)
  * Number of parameters: 1
  * Number of dimensions per parameter: (2,)
  * 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
      unitary_check (bool): check for unitarity of the given matrix
  
  Raises:
      ValueError: if the number of wires doesn't fit the dimensions of the matrix
  
  **Example**
  
  >>> dev = qml.device('default.qubit', wires=1)
  >>> U = 1 / np.sqrt(2) * np.array([[1, 1], [1, -1]])
  >>> @qml.qnode(dev)
  ... def example_circuit():
  ...     qml.QubitUnitary(U, wires=0)
  ...     return qml.expval(qml.PauliZ(0))
  >>> print(example_circuit())
  0.0
class_docstr_tok: ["QubitUnitary","(","U",",","wires",")","Apply","an","arbitrary","unitary","matrix","with","a","dimension","that","is","a","power","of","two",".","*","*","Details",":","*","*","*","Number","of","wires",":","Any","(","the","operation","can","act","on","any","number","of","wires",")","*","Number","of","parameters",":","1","*","Number","of","dimensions","per","parameter",":","(","2",",",")","*","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","unitary_check","(","bool",")",":","check","for","unitarity","of","the","given","matrix","Raises",":","ValueError",":","if","the","number","of","wires","does","n't","fit","the","dimensions","of","the","matrix","*","*","Example","*","*",">",">",">","dev","=","qml.device","(","'default.qubit","'",",","wires=1",")",">",">",">","U","=","1","\/","np.sqrt","(","2",")","*","np.array","(","[","[","1",",","1","]",",","[","1",",","-1","]","]",")",">",">",">","@","qml.qnode","(","dev",")","...","def","example_circuit","(",")",":","...","qml.QubitUnitary","(","U",",","wires=0",")","...","return","qml.expval","(","qml.PauliZ","(","0",")",")",">",">",">","print","(","example_circuit","(",")",")","0.0"]
code: def _controlled(self, wire):
      return qml.ControlledQubitUnitary(
          *self.parameters, control_wires=wire, wires=self.wires
      )
  
imports: import warnings
  from itertools import product
  import numpy
  from scipy.linalg import fractional_matrix_power
  from pennylane.math import norm, cast, eye, zeros, transpose, conj, sqrt, sqrt_matrix
  from pennylane import numpy
  import pennylane
  from pennylane.operation import AnyWires, DecompositionUndefinedError, Operation
  from pennylane.wires import Wires
label_desc: Use image node_id 7 for calling the QubitUnitary obj's underlying member method code with example usage: obj._controlled(wire) and returns: qml