code: def U1(phi):
      r""" Return the matrix representation of the U1 gate.
  
      .. math:: U_1(\phi) = e^{i\phi/2}R_z(\phi) = \begin{bmatrix}
              1 & 0 \\
              0 & e^{i\phi}
          \end{bmatrix}.
  
      Args:
          phi (float): rotation angle :math:`\phi`
      """
      return math.array(
          [[1.0, 0.0], [0.0, math.exp(phi * 1j)]], like=phi
      )
  
imports: import pennylane
  from pennylane import numpy
  from pennylane import math
label_desc: Use image node_id 6 for calling a global function with example usage: U1(phi) and returns: math