original_docstring: Safe parsing of string expression.
  
      Args:
          source: String expression to parse.
          partial_binding: Allow partial bind of parameters.
  
      Returns:
          PulseExpression: Returns a expression object.
  
      Example:
  
          expr = 'P1 + P2 + P3'
          parsed_expr = parse_string_expr(expr, partial_binding=True)
  
          # create new PulseExpression
          bound_two = parsed_expr(P1=1, P2=2)
          # evaluate expression
          value1 = bound_two(P3=3)
          value2 = bound_two(P3=4)
          value3 = bound_two(P3=5)
  
      
docstring: Safe parsing of string expression.
docstring_tokens: Safe parsing of string expression .
code: def parse_string_expr(source: str, partial_binding: bool = False):
      """Safe parsing of string expression.
  
      Args:
          source: String expression to parse.
          partial_binding: Allow partial bind of parameters.
  
      Returns:
          PulseExpression: Returns a expression object.
  
      Example:
  
          expr = 'P1 + P2 + P3'
          parsed_expr = parse_string_expr(expr, partial_binding=True)
  
          # create new PulseExpression
          bound_two = parsed_expr(P1=1, P2=2)
          # evaluate expression
          value1 = bound_two(P3=3)
          value2 = bound_two(P3=4)
          value3 = bound_two(P3=5)
  
      """
      subs = [("numpy.", ""), ("np.", ""), ("math.", ""), ("cmath.", "")]
      for match, sub in subs:
          source = source.replace(match, sub)
  
      return PulseExpression(source, partial_binding)
code_tokens: def parse_string_expr ( source : str , partial_binding : bool = False ) : subs = [ ( "numpy." , "" ) , ( "np." , "" ) , ( "math." , "" ) , ( "cmath." , "" ) ] for match , sub in subs : source = source . replace ( match , sub ) return PulseExpression ( source , partial_binding )
short_docstring: Safe parsing of string expression.
short_docstring_tokens: Safe parsing of string expression .
comment: """Safe parsing of string expression.
  
      Args:
          source: String expression to parse.
          partial_binding: Allow partial bind of parameters.
  
      Returns:
          PulseExpression: Returns a expression object.
  
      Example:
  
          expr = 'P1 + P2 + P3'
          parsed_expr = parse_string_expr(expr, partial_binding=True)
  
          # create new PulseExpression
          bound_two = parsed_expr(P1=1, P2=2)
          # evaluate expression
          value1 = bound_two(P3=3)
          value2 = bound_two(P3=4)
          value3 = bound_two(P3=5)
  
      """