code: def PSWAP(phi):
      r"""Phase SWAP gate
      .. math:: \mathtt{PSWAP}(\phi) = \begin{bmatrix}
              1 & 0 & 0 & 0 \\
              0 & 0 & e^{i \phi} & 0 \\
              0 & e^{i \phi} & 0 & 0 \\
              0 & 0 & 0 & 1
          \end{bmatrix}.
      Args:
          phi (float): rotation angle :math:`\phi`
      Returns:
          array[complex]: unitary 4x4 rotation matrix
      """
      e = math.exp(1j * phi)
      return math.array(
          [[1, 0, 0, 0], [0, 0, e, 0], [0, e, 0, 0], [0, 0, 0, 1]]
      )
  
imports: import pennylane
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 30 for calling a global function with example usage: PSWAP(phi) and returns: math