3.1.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 Expression(*args, **kwargs)[source]¶
-
This protocol defines how Expressions are allowed to be used in qupulse.
- evaluate_in_scope(scope: Mapping) Real | 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]) Expression[source]¶
Substitute a part of the expression for another
- evaluate_time_dependent(scope: Mapping) Expression | Real | ndarray[source]¶
Evaluate to a time dependent expression or a constant.
- classmethod make(expression_or_dict, numpy_evaluation=None) Expression[source]¶
Backward compatible expression generation to allow creation from dict.
- class ExpressionVector(*args, **kwargs)[source]¶
Bases:
Expression,Protocol