parameters: (operator)
return_statement: return lo.LinOp(lo.TRACE, (1, 1), [operator], None)
docstring: Sum the diagonal entries of an operator.
  
      Parameters
      ----------
      expr : LinOp
          The operator to sum the diagonal entries of.
  
      Returns
      -------
      LinOp
          An operator representing the sum of the diagonal entries.
docstring_summary: Sum the diagonal entries of an operator.
docstring_tokens: Sum the diagonal entries of an operator .
function: def trace(operator):
      """Sum the diagonal entries of an operator.
  
      Parameters
      ----------
      expr : LinOp
          The operator to sum the diagonal entries of.
  
      Returns
      -------
      LinOp
          An operator representing the sum of the diagonal entries.
      """
      return lo.LinOp(lo.TRACE, (1, 1), [operator], None)
function_tokens: def trace ( operator ) : return lo . LinOp ( lo . TRACE , ( 1 , 1 ) , [ operator ] , None )