3.9.3. qupulse.utils.sympy¶
Functions
|
|
|
Try to cast array to int64. |
|
|
|
|
|
|
|
|
|
Returns True (or False) if the two expressions are almost equal (or not). |
|
|
|
|
|
Evaluates Rational as TimeType. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Substitutes only sympy.Symbols. |
|
|
|
Cache sympify result for all hashable types |
|
Classes
|
Broadcast x to the specified shape using numpy.broadcast_to. |
|
Custom printer that translates sympy.Rational into TimeType |
|
Acts as a symbol lookup and determines which symbols in an expression a subscripted. |
|
Broadcast x to the specified shape using numpy.broadcast_to and index in the result. |
|
alias of |
Exceptions
|
- qupulse.utils.sympy.evaluate_lambdified(expression: Union[sympy.core.expr.Expr, numpy.ndarray], variables: Sequence[str], parameters: Dict[str, Union[numpy.ndarray, numbers.Number]], lambdified: Optional[Callable]) Tuple[Any, Any] [source]¶
- qupulse.utils.sympy.get_free_symbols(expression: sympy.core.expr.Expr) Sequence[sympy.core.symbol.Symbol] [source]¶
- qupulse.utils.sympy.get_most_simple_representation(expression: sympy.core.expr.Expr) Union[str, int, float] [source]¶
- qupulse.utils.sympy.recursive_substitution(expression: sympy.core.expr.Expr, substitutions: Dict[str, Union[sympy.core.expr.Expr, numpy.ndarray, str]]) sympy.core.expr.Expr [source]¶
- qupulse.utils.sympy.substitute_with_eval(expression: sympy.core.expr.Expr, substitutions: Dict[str, Union[sympy.core.expr.Expr, numpy.ndarray, str]]) sympy.core.expr.Expr [source]¶
Substitutes only sympy.Symbols. Workaround for numpy like array behaviour. ~Factor 3 slower compared to subs
- qupulse.utils.sympy.sympify(expr: Union[str, numbers.Number, sympy.core.expr.Expr, numpy.str_], **kwargs) sympy.core.expr.Expr [source]¶
- qupulse.utils.sympy.to_numpy(sympy_array: sympy.tensor.array.ndim_array.NDimArray) numpy.ndarray [source]¶