3.7.10. qupulse.pulses.parameters

This module defines parameter constriants.

Classes

ParameterConstrainer(*, parameter_constraints)

A class that implements the testing of parameter constraints.

ParameterConstraint(relation)

A parameter constraint like 't_2 < 2.7' that can be used to set bounds to parameters.

Exceptions

ConstrainedParameterIsVolatileWarning(...)

InvalidParameterNameException(parameter_name)

ParameterConstraintViolation(constraint, ...)

class qupulse.pulses.parameters.ParameterConstraint(relation: Union[str, sympy.core.expr.Expr])[source]

Bases: qupulse.serialization.AnonymousSerializable

A parameter constraint like ‘t_2 < 2.7’ that can be used to set bounds to parameters.

property affected_parameters: Set[str]
get_serialization_data() str[source]

Return all data relevant for serialization as a JSON compatible type that is accepted as constructor argument

Returns

A JSON compatible type that can be used to construct an equal object.

is_fulfilled(parameters: Mapping[str, Any], volatile: AbstractSet[str] = frozenset({})) bool[source]
Parameters
  • parameters – These parameters are checked.

  • volatile – 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

property sympified_expression: sympy.core.expr.Expr
exception qupulse.pulses.parameters.ParameterConstraintViolation(constraint: qupulse.pulses.parameters.ParameterConstraint, parameters: Dict[str, numbers.Real])[source]

Bases: Exception

exception qupulse.pulses.parameters.ParameterNotProvidedException(parameter_name: str)[source]

Bases: KeyError

Indicates that a required parameter value was not provided.

property parameter_name