class_docstr: Single excitation rotation with positive phase-shift outside the rotation subspace.
  
  .. math:: U_+(\phi) = \begin{bmatrix}
              e^{i\phi/2} & 0 & 0 & 0 \\
              0 & \cos(\phi/2) & -\sin(\phi/2) & 0 \\
              0 & \sin(\phi/2) & \cos(\phi/2) & 0 \\
              0 & 0 & 0 & e^{i\phi/2}
          \end{bmatrix}.
  
  **Details:**
  
  * Number of wires: 2
  * Number of parameters: 1
  * Number of dimensions per parameter: (0,)
  * Gradient recipe: :math:`\frac{d}{d\phi}f(U_+(\phi)) = \frac{1}{2}\left[f(U_+(\phi+\pi/2)) - f(U_+(\phi-\pi/2))\right]`
    where :math:`f` is an expectation value depending on :math:`U_+(\phi)`.
  
  Args:
      phi (float): rotation angle :math:`\phi`
      wires (Sequence[int] or int): the wires the operation acts on
      id (str or None): String representing the operation (optional)
class_docstr_tok: ["Single","excitation","rotation","with","positive","phase-shift","outside","the","rotation","subspace",".","..","math",":",":","U_+","(","\\phi",")","=","\\begin","{","bmatrix","}","e^","{","i\\phi\/2","}","&","0","&","0","&","0","\\\\","0","&","\\cos","(","\\phi\/2",")","&","-\\sin","(","\\phi\/2",")","&","0","\\\\","0","&","\\sin","(","\\phi\/2",")","&","\\cos","(","\\phi\/2",")","&","0","\\\\","0","&","0","&","0","&","e^","{","i\\phi\/2","}","\\end","{","bmatrix","}",".","*","*","Details",":","*","*","*","Number","of","wires",":","2","*","Number","of","parameters",":","1","*","Number","of","dimensions","per","parameter",":","(","0",",",")","*","Gradient","recipe",":",":","math",":","`","\\frac","{","d","}","{","d\\phi","}","f","(","U_+","(","\\phi",")",")","=","\\frac","{","1","}","{","2","}","\\left","[","f","(","U_+","(","\\phi+\\pi\/2",")",")","-","f","(","U_+","(","\\phi-\\pi\/2",")",")","\\right","]","`","where",":","math",":","`","f","`","is","an","expectation","value","depending","on",":","math",":","`","U_+","(","\\phi",")","`",".","Args",":","phi","(","float",")",":","rotation","angle",":","math",":","`","\\phi","`","wires","(","Sequence","[","int","]","or","int",")",":","the","wires","the","operation","acts","on","id","(","str","or","None",")",":","String","representing","the","operation","(","optional",")"]
docstr: Representation of the operator as a canonical matrix in the computational basis (static method).
  
  The canonical matrix is the textbook matrix representation that does not consider wires.
  Implicitly, this assumes that the wires of the operator correspond to the global wire order.
  
  .. seealso:: :meth:`~.SingleExcitationPlus.matrix`
  
  
  Args:
    phi (tensor_like or float): rotation angle
  
  Returns:
    tensor_like: canonical matrix
  
  **Example**
  
  >>> qml.SingleExcitationPlus.compute_matrix(torch.tensor(0.5))
  tensor([[ 0.9689+0.2474j,  0.0000+0.0000j,  0.0000+0.0000j,  0.0000+0.0000j],
          [ 0.0000+0.0000j,  0.9689+0.0000j, -0.2474+0.0000j,  0.0000+0.0000j],
          [ 0.0000+0.0000j,  0.2474+0.0000j,  0.9689+0.0000j,  0.0000+0.0000j],
          [ 0.0000+0.0000j,  0.0000+0.0000j,  0.0000+0.0000j,  0.9689+0.2474j]])
docstr_tok: ["Representation","of","the","operator","as","a","canonical","matrix","in","the","computational","basis","(","static","method",")",".","The","canonical","matrix","is","the","textbook","matrix","representation","that","does","not","consider","wires",".","Implicitly",",","this","assumes","that","the","wires","of","the","operator","correspond","to","the","global","wire","order",".","..","seealso",":",":",":","meth",":","`","~.SingleExcitationPlus.matrix","`","Args",":","phi","(","tensor_like","or","float",")",":","rotation","angle","Returns",":","tensor_like",":","canonical","matrix","*","*","Example","*","*",">",">",">","qml.SingleExcitationPlus.compute_matrix","(","torch.tensor","(","0.5",")",")","tensor","(","[","[","0.9689+0.2474j",",","0.0000+0.0000j",",","0.0000+0.0000j",",","0.0000+0.0000j","]",",","[","0.0000+0.0000j",",","0.9689+0.0000j",",","-0.2474+0.0000j",",","0.0000+0.0000j","]",",","[","0.0000+0.0000j",",","0.2474+0.0000j",",","0.9689+0.0000j",",","0.0000+0.0000j","]",",","[","0.0000+0.0000j",",","0.0000+0.0000j",",","0.0000+0.0000j",",","0.9689+0.2474j","]","]",")"]
code: def compute_matrix(phi):  # pylint: disable=arguments-differ
      r"""Representation of the operator as a canonical matrix in the computational basis (static method).
  
      The canonical matrix is the textbook matrix representation that does not consider wires.
      Implicitly, this assumes that the wires of the operator correspond to the global wire order.
  
      .. seealso:: :meth:`~.SingleExcitationPlus.matrix`
  
  
      Args:
        phi (tensor_like or float): rotation angle
  
      Returns:
        tensor_like: canonical matrix
  
      **Example**
  
      >>> qml.SingleExcitationPlus.compute_matrix(torch.tensor(0.5))
      tensor([[ 0.9689+0.2474j,  0.0000+0.0000j,  0.0000+0.0000j,  0.0000+0.0000j],
              [ 0.0000+0.0000j,  0.9689+0.0000j, -0.2474+0.0000j,  0.0000+0.0000j],
              [ 0.0000+0.0000j,  0.2474+0.0000j,  0.9689+0.0000j,  0.0000+0.0000j],
              [ 0.0000+0.0000j,  0.0000+0.0000j,  0.0000+0.0000j,  0.9689+0.2474j]])
      """
      return _single_excitations_matrix(phi, 0.5j)
  
imports: import functools
  import numpy
  from scipy.sparse import csr_matrix
  import pennylane
  from pennylane.operation import Operation
label_desc: Use image node_id 3 for calling the SingleExcitationPlus obj's underlying member method code with example usage: obj.compute_matrix(phi) and returns: _single_excitations_matrix