class_docstr: TSWAP(wires)
  The ternary swap operator.
  
  This operation is analogous to the qubit SWAP and acts on two-qutrit computational basis states
  according to :math:`TSWAP\vert i, j\rangle = \vert j, i \rangle`. Its matrix representation is
  
  .. math:: TSWAP = \begin{bmatrix}
              1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
              0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\
              0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\
              0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
              0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\
              0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\
              0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\
              0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\
              0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\
          \end{bmatrix}
  
  **Details:**
  
  * Number of wires: 2
  * Number of parameters: 0
  
  Args:
      wires (Sequence[int]): the wires the operation acts on
class_docstr_tok: ["TSWAP","(","wires",")","The","ternary","swap","operator",".","This","operation","is","analogous","to","the","qubit","SWAP","and","acts","on","two-qutrit","computational","basis","states","according","to",":","math",":","`","TSWAP\\vert","i",",","j\\rangle","=","\\vert","j",",","i","\\rangle","`",".","Its","matrix","representation","is","..","math",":",":","TSWAP","=","\\begin","{","bmatrix","}","1","&","0","&","0","&","0","&","0","&","0","&","0","&","0","&","0","\\\\","0","&","0","&","0","&","1","&","0","&","0","&","0","&","0","&","0","\\\\","0","&","0","&","0","&","0","&","0","&","0","&","1","&","0","&","0","\\\\","0","&","1","&","0","&","0","&","0","&","0","&","0","&","0","&","0","\\\\","0","&","0","&","0","&","0","&","1","&","0","&","0","&","0","&","0","\\\\","0","&","0","&","0","&","0","&","0","&","0","&","0","&","1","&","0","\\\\","0","&","0","&","1","&","0","&","0","&","0","&","0","&","0","&","0","\\\\","0","&","0","&","0","&","0","&","0","&","1","&","0","&","0","&","0","\\\\","0","&","0","&","0","&","0","&","0","&","0","&","0","&","0","&","1","\\\\","\\end","{","bmatrix","}","*","*","Details",":","*","*","*","Number","of","wires",":","2","*","Number","of","parameters",":","0","Args",":","wires","(","Sequence","[","int","]",")",":","the","wires","the","operation","acts","on"]
docstr: Eigenvalues of the operator in the computational basis (static method).
  
  If :attr:`diagonalizing_gates` are specified and implement a unitary :math:`U^{\dagger}`,
  the operator can be reconstructed as
  
  .. math:: O = U \Sigma U^{\dagger},
  
  where :math:`\Sigma` is the diagonal matrix containing the eigenvalues.
  Otherwise, no particular order for the eigenvalues is guaranteed.
  
  .. seealso:: :meth:`~.TSWAP.eigvals`
  
  Returns:
      array: eigenvalues
  
  **Example**
  
  >>> print(qml.TSWAP.compute_eigvals())
  [ 1. -1.  1. -1.  1. -1.  1.  1.  1.]
docstr_tok: ["Eigenvalues","of","the","operator","in","the","computational","basis","(","static","method",")",".","If",":","attr",":","`","diagonalizing_gates","`","are","specified","and","implement","a","unitary",":","math",":","`","U^","{","\\dagger","}","`",",","the","operator","can","be","reconstructed","as","..","math",":",":","O","=","U","\\Sigma","U^","{","\\dagger","}",",","where",":","math",":","`","\\Sigma","`","is","the","diagonal","matrix","containing","the","eigenvalues",".","Otherwise",",","no","particular","order","for","the","eigenvalues","is","guaranteed",".","..","seealso",":",":",":","meth",":","`","~.TSWAP.eigvals","`","Returns",":","array",":","eigenvalues","*","*","Example","*","*",">",">",">","print","(","qml.TSWAP.compute_eigvals","(",")",")","[","1",".","-1",".","1",".","-1",".","1",".","-1",".","1",".","1",".","1",".","]"]
code: def compute_eigvals():
      r"""Eigenvalues of the operator in the computational basis (static method).
  
      If :attr:`diagonalizing_gates` are specified and implement a unitary :math:`U^{\dagger}`,
      the operator can be reconstructed as
  
      .. math:: O = U \Sigma U^{\dagger},
  
      where :math:`\Sigma` is the diagonal matrix containing the eigenvalues.
      Otherwise, no particular order for the eigenvalues is guaranteed.
  
      .. seealso:: :meth:`~.TSWAP.eigvals`
  
      Returns:
          array: eigenvalues
  
      **Example**
  
      >>> print(qml.TSWAP.compute_eigvals())
      [ 1. -1.  1. -1.  1. -1.  1.  1.  1.]
      """
      return np.array([1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, 1.0, 1.0])
  
imports: import numpy
  from pennylane.operation import Operation, AdjointUndefinedError
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling the TSWAP obj's underlying member method code with example usage: obj.compute_eigvals() and returns: np