class_docstr: Default qutrit device for PennyLane.
  
  .. warning::
  
      The API of ``DefaultQutrit`` will be updated soon to follow a new device interface described
      in :class:`pennylane.devices.Device`.
  
      This change will not alter device behaviour for most workflows, but may have implications for
      plugin developers and users who directly interact with device methods. Please consult
      :class:`pennylane.devices.Device` and the implementation in
      :class:`pennylane.devices.DefaultQubit` for more information on what the new
      interface will look like and be prepared to make updates in a coming release. If you have any
      feedback on these changes, please create an
      `issue <https://github.com/PennyLaneAI/pennylane/issues>`_ or post in our
      `discussion forum <https://discuss.pennylane.ai/>`_.
  
  Args:
      wires (int, Iterable[Number, str]): Number of subsystems represented by the device,
          or iterable that contains unique labels for the subsystems as numbers (i.e., ``[-1, 0, 2]``)
          or strings (``['ancilla', 'q1', 'q2']``). Default 1 if not specified.
      shots (None, int): How many times the circuit should be evaluated (or sampled) to estimate
          the expectation values. Defaults to ``None`` if not specified, which means that the device
          returns analytical results.
class_docstr_tok: ["Default","qutrit","device","for","PennyLane",".","..","warning",":",":","The","API","of","``","DefaultQutrit","``","will","be","updated","soon","to","follow","a","new","device","interface","described","in",":","class",":","`","pennylane.devices.Device","`",".","This","change","will","not","alter","device","behaviour","for","most","workflows",",","but","may","have","implications","for","plugin","developers","and","users","who","directly","interact","with","device","methods",".","Please","consult",":","class",":","`","pennylane.devices.Device","`","and","the","implementation","in",":","class",":","`","pennylane.devices.DefaultQubit","`","for","more","information","on","what","the","new","interface","will","look","like","and","be","prepared","to","make","updates","in","a","coming","release",".","If","you","have","any","feedback","on","these","changes",",","please","create","an","`","issue","<","https",":","\/\/github.com\/PennyLaneAI\/pennylane\/issues",">","`","_","or","post","in","our","`","discussion","forum","<","https",":","\/\/discuss.pennylane.ai\/",">","`","_",".","Args",":","wires","(","int",",","Iterable","[","Number",",","str","]",")",":","Number","of","subsystems","represented","by","the","device",",","or","iterable","that","contains","unique","labels","for","the","subsystems","as","numbers","(","i.e.",",","``","[","-1",",","0",",","2","]","``",")","or","strings","(","``","[","'ancilla","'",",","'q1","'",",","'q2","'","]","``",")",".","Default","1","if","not","specified",".","shots","(","None",",","int",")",":","How","many","times","the","circuit","should","be","evaluated","(","or","sampled",")","to","estimate","the","expectation","values",".","Defaults","to","``","None","``","if","not","specified",",","which","means","that","the","device","returns","analytical","results","."]
docstr: Applies a ternary SWAP gate by performing a partial transposition along the
  specified axes. The ternary SWAP gate acts on the computational basis states like
  :math:`ert i, j
  angle 
  ightarrow ert j, i 
  angle`.
  
  Args:
      state (array[complex]): input state
      axes (List[int]): target axes to apply transformation
  
  Returns:
      array[complex]: output state
docstr_tok: ["Applies","a","ternary","SWAP","gate","by","performing","a","partial","transposition","along","the","specified","axes",".","The","ternary","SWAP","gate","acts","on","the","computational","basis","states","like",":","math",":","`","ert","i",",","j","angle","ightarrow","ert","j",",","i","angle","`",".","Args",":","state","(","array","[","complex","]",")",":","input","state","axes","(","List","[","int","]",")",":","target","axes","to","apply","transformation","Returns",":","array","[","complex","]",":","output","state"]
code: def _apply_tswap(
      self, state, axes, **kwargs
  ):  # pylint: disable=unused-argument
      """Applies a ternary SWAP gate by performing a partial transposition along the
      specified axes. The ternary SWAP gate acts on the computational basis states like
      :math:`\vert i, j\rangle \rightarrow \vert j, i \rangle`.
  
      Args:
          state (array[complex]): input state
          axes (List[int]): target axes to apply transformation
  
      Returns:
          array[complex]: output state
      """
      all_axes = list(range(len(state.shape)))
      all_axes[axes[0]] = axes[1]
      all_axes[axes[1]] = axes[0]
      return self._transpose(state, all_axes)
  
imports: import functools
  import numpy
  import pennylane
  from pennylane import QutritDevice, QutritBasisState, DeviceError
  from pennylane.wires import WireError
  from pennylane.devices.default_qubit_legacy import _get_slice
  from .._version import __version__
label_desc: Use image node_id 12 for calling the DefaultQutrit obj's underlying member method code with example usage: obj._apply_tswap(state, axes) and returns: self