3.2.1. qupulse.expressions.protocol¶
This module contains the interface / protocol descriptions of Expression
, ExpressionScalar
and
ExpressionVector
.
Classes
|
This protocol defines how Expressions are allowed to be used in qupulse. |
|
|
|
|
|
|
|
- class qupulse.expressions.protocol.Expression(*args, **kwargs)[source]¶
-
This protocol defines how Expressions are allowed to be used in qupulse.
- evaluate_in_scope(scope: Mapping) Union[numbers.Real, numpy.ndarray] [source]¶
Evaluate the expression by taking the variables from the given scope (typically of type Scope, but it can be any mapping.) :param scope:
Returns:
- evaluate_symbolic(substitutions: Mapping[str, Any]) qupulse.expressions.protocol.Expression [source]¶
Substitute a part of the expression for another
- evaluate_time_dependent(scope: Mapping) Union[qupulse.expressions.protocol.Expression, numbers.Real, numpy.ndarray] [source]¶
Evaluate to a time dependent expression or a constant.
- classmethod make(expression_or_dict, numpy_evaluation=None) qupulse.expressions.protocol.Expression [source]¶
Backward compatible expression generation to allow creation from dict.
- property underlying_expression: Any¶
Return some internal unspecified representation
- class qupulse.expressions.protocol.ExpressionScalar(*args, **kwargs)[source]¶
Bases:
qupulse.expressions.protocol.Expression
,qupulse.expressions.protocol.Scalar
,qupulse.expressions.protocol.Ordered
,Protocol