Module: cirq_google.serialization.arg_func_langs

Functions

arg_from_proto(...): Extracts a python value from an argument value proto.

arg_to_proto(...): Writes an argument value into an Arg proto.

float_arg_from_proto(...): Extracts a python value from an argument value proto.

float_arg_to_proto(...): Writes an argument value into an FloatArg proto.

Type Aliases

ARG_LIKE: The central part of internal API.

FLOAT_ARG_LIKE: The central part of internal API.

FLOAT_TYPES (<class 'float'>, <class 'int'>, <class 'sympy.core.numbers.Integer'>, <class 'sympy.core.numbers.Float'>, <class 'sympy.core.numbers.Rational'>, <class 'sympy.core.numbers.NumberSymbol'>)
LANGUAGE_ORDER ['', 'linear', 'exp']
MOST_PERMISSIVE_LANGUAGE 'exp'
SUPPORTED_FUNCTIONS_FOR_LANGUAGE

{
 '': frozenset(),
 'exp': frozenset({'mul', 'pow', 'add'}),
 'linear': frozenset({'mul', 'add'}),
 None: frozenset({'mul', 'pow', 'add'})
}

SUPPORTED_SYMPY_OPS (<class 'sympy.core.symbol.Symbol'>, <class 'sympy.core.add.Add'>, <class 'sympy.core.mul.Mul'>, <class 'sympy.core.power.Pow'>)