3.6.9. qupulse.pulses.parameters¶
This module defines parameters and parameter declaration for usage in pulse modelling.
- Classes:
Parameter: A base class representing a single pulse parameter.
ConstantParameter: A single parameter with a constant value.
MappedParameter: A parameter whose value is mathematically computed from another parameter.
ParameterNotProvidedException.
-
class
qupulse.pulses.parameters.
Parameter
[source]¶ Bases:
object
A parameter for pulses.
Parameter specifies a concrete value which is inserted instead of the parameter declaration reference in a PulseTemplate if it satisfies the minimum and maximum boundary of the corresponding ParameterDeclaration. Implementations of Parameter may provide a single constant value or obtain values by computation (e.g. from measurement results).
-
abstract property
requires_stop
¶ Query whether the evaluation of this Parameter instance requires an interruption in execution/sequencing, e.g., because it depends on data that is only measured in during the next execution.
- Return type
- Returns
True, if evaluating this Parameter instance requires an interruption.
-
abstract property
-
class
qupulse.pulses.parameters.
ConstantParameter
(value)[source]¶ Bases:
qupulse.pulses.parameters.Parameter
Deprecated since version 0.5.
A pulse parameter with a constant value.
- Parameters
value (
Union
[Real
,ndarray
,Expression
,str
,Expr
]) – The value of the parameter
-
__init__
(value)[source]¶ Deprecated since version 0.5.
A pulse parameter with a constant value.
- Parameters
value (
Union
[Real
,ndarray
,Expression
,str
,Expr
]) – The value of the parameter- Return type
None
-
property
requires_stop
¶ Implements
requires_stop
.- Return type
-
exception
qupulse.pulses.parameters.
ParameterNotProvidedException
(parameter_name)[source]¶ Bases:
KeyError
Indicates that a required parameter value was not provided.
-
property
parameter_name
¶
-
property
-
exception
qupulse.pulses.parameters.
ParameterConstraintViolation
(constraint, parameters)[source]¶ Bases:
Exception
-
class
qupulse.pulses.parameters.
ParameterConstraint
(relation)[source]¶ Bases:
qupulse.serialization.AnonymousSerializable
A parameter constraint like ‘t_2 < 2.7’ that can be used to set bounds to parameters.
-
get_serialization_data
()[source]¶ Return all data relevant for serialization as a JSON compatible type that is accepted as constructor argument
- Return type
- Returns
A JSON compatible type that can be used to construct an equal object.
-
is_fulfilled
(parameters, volatile=frozenset({}))[source]¶ - Parameters
parameters (
Mapping
[str
,Any
]) – These parameters are checked.volatile (
AbstractSet
[str
]) – For each of these parameters a warning is raised if they appear in a constraint
- Raises
qupulse.parameter_scope.ParameterNotProvidedException – if a parameter is missing
Warning
ConstrainedParameterIsVolatileWarning: if a constrained parameter is volatile
- Return type
-
property
sympified_expression
¶ - Return type
Expr
-