class_docstr: THadamard(wires, subspace)
  The ternary Hadamard operator
  
  Performs the Hadamard operation on a 2D subspace, if specified. The subspace is
  given as a keyword argument and determines which two of three single-qutrit basis states the
  operation applies to. When a subspace is not specified, the generalized Hadamard operation
  is used.
  
  The construction of this operator is based on section 2 of
  `Di et al. (2012) <https://arxiv.org/abs/1105.5485>`_ when the subspace is specified, and
  definition 4 and equation 5 from `Yeh et al. (2022) <https://arxiv.org/abs/2204.00552>`_
  when no subspace is specified. The operator definition of the ``subspace=None`` case is
  
  .. math:: \text{THadamard} = \frac{-i}{\sqrt{3}}\begin{bmatrix}
                  1 & 1 & 1 \\
                  1 & \omega & \omega^2 \\
                  1 & \omega^2 & \omega \\
              \end{bmatrix}
  
  where :math:`\omega = \exp(2 \pi i / 3)`.
  
  **Details:**
  
  * Number of wires: 1
  * Number of parameters: 0
  
  Args:
      wires (Sequence[int] or int): the wire the operation acts on
      subspace (Optional[Sequence[int]]): the 2D subspace on which to apply the operation.
          This should be `None` for the generalized Hadamard.
  
  **Example**
  
  The specified subspace will determine which basis states the operation actually
  applies to:
  
  >>> qml.THadamard(wires=0, subspace=(0, 1)).matrix()
  array([[ 0.70710678+0.j,  0.70710678+0.j,  0.        +0.j],
         [ 0.70710678+0.j, -0.70710678+0.j,  0.        +0.j],
         [ 0.        +0.j,  0.        +0.j,  1.        +0.j]])
  
  >>> qml.THadamard(wires=0, subspace=(0, 2)).matrix()
  array([[ 0.70710678+0.j,  0.        +0.j,  0.70710678+0.j],
         [ 0.        +0.j,  1.        +0.j,  0.        +0.j],
         [ 0.70710678+0.j,  0.        +0.j, -0.70710678+0.j]])
  
  >>> qml.THadamard(wires=0, subspace=(1, 2)).matrix()
  array([[ 1.        +0.j,  0.        +0.j,  0.        +0.j],
         [ 0.        +0.j,  0.70710678+0.j,  0.70710678+0.j],
         [ 0.        +0.j,  0.70710678+0.j, -0.70710678+0.j]])
  
  >>> qml.THadamard(wires=0, subspace=None).matrix()
  array([[ 0. -0.57735027j,  0. -0.57735027j,  0. -0.57735027j],
         [ 0. -0.57735027j,  0.5+0.28867513j, -0.5+0.28867513j],
         [ 0. -0.57735027j, -0.5+0.28867513j,  0.5+0.28867513j]])
class_docstr_tok: ["THadamard","(","wires",",","subspace",")","The","ternary","Hadamard","operator","Performs","the","Hadamard","operation","on","a","2D","subspace",",","if","specified",".","The","subspace","is","given","as","a","keyword","argument","and","determines","which","two","of","three","single-qutrit","basis","states","the","operation","applies","to",".","When","a","subspace","is","not","specified",",","the","generalized","Hadamard","operation","is","used",".","The","construction","of","this","operator","is","based","on","section","2","of","`","Di","et","al",".","(","2012",")","<","https",":","\/\/arxiv.org\/abs\/1105.5485",">","`","_","when","the","subspace","is","specified",",","and","definition","4","and","equation","5","from","`","Yeh","et","al",".","(","2022",")","<","https",":","\/\/arxiv.org\/abs\/2204.00552",">","`","_","when","no","subspace","is","specified",".","The","operator","definition","of","the","``","subspace=None","``","case","is","..","math",":",":","\\text","{","THadamard","}","=","\\frac","{","-i","}","{","\\sqrt","{","3","}","}","\\begin","{","bmatrix","}","1","&","1","&","1","\\\\","1","&","\\omega","&","\\omega^2","\\\\","1","&","\\omega^2","&","\\omega","\\\\","\\end","{","bmatrix","}","where",":","math",":","`","\\omega","=","\\exp","(","2","\\pi","i","\/","3",")","`",".","*","*","Details",":","*","*","*","Number","of","wires",":","1","*","Number","of","parameters",":","0","Args",":","wires","(","Sequence","[","int","]","or","int",")",":","the","wire","the","operation","acts","on","subspace","(","Optional","[","Sequence","[","int","]","]",")",":","the","2D","subspace","on","which","to","apply","the","operation",".","This","should","be","`","None","`","for","the","generalized","Hadamard",".","*","*","Example","*","*","The","specified","subspace","will","determine","which","basis","states","the","operation","actually","applies","to",":",">",">",">","qml.THadamard","(","wires=0",",","subspace=","(","0",",","1",")",")",".matrix","(",")","array","(","[","[","0.70710678+0.j",",","0.70710678+0.j",",","0",".","+0.j","]",",","[","0.70710678+0.j",",","-0.70710678+0.j",",","0",".","+0.j","]",",","[","0",".","+0.j",",","0",".","+0.j",",","1",".","+0.j","]","]",")",">",">",">","qml.THadamard","(","wires=0",",","subspace=","(","0",",","2",")",")",".matrix","(",")","array","(","[","[","0.70710678+0.j",",","0",".","+0.j",",","0.70710678+0.j","]",",","[","0",".","+0.j",",","1",".","+0.j",",","0",".","+0.j","]",",","[","0.70710678+0.j",",","0",".","+0.j",",","-0.70710678+0.j","]","]",")",">",">",">","qml.THadamard","(","wires=0",",","subspace=","(","1",",","2",")",")",".matrix","(",")","array","(","[","[","1",".","+0.j",",","0",".","+0.j",",","0",".","+0.j","]",",","[","0",".","+0.j",",","0.70710678+0.j",",","0.70710678+0.j","]",",","[","0",".","+0.j",",","0.70710678+0.j",",","-0.70710678+0.j","]","]",")",">",">",">","qml.THadamard","(","wires=0",",","subspace=None",")",".matrix","(",")","array","(","[","[","0",".","-0.57735027j",",","0",".","-0.57735027j",",","0",".","-0.57735027j","]",",","[","0",".","-0.57735027j",",","0.5+0.28867513j",",","-0.5+0.28867513j","]",",","[","0",".","-0.57735027j",",","-0.5+0.28867513j",",","0.5+0.28867513j","]","]",")"]
code: def label(self, decimals=None, base_label=None, cache=None):
      return base_label or "TH"
  
imports: import numpy
  from pennylane.operation import Operation, AdjointUndefinedError
  from pennylane.wires import Wires
label_desc: Use image node_id 1 for calling the THadamard obj's underlying member method code with example usage: obj.label(decimals, base_label, cache) and returns: unknown