3.7.5. qupulse.pulses.interpolation¶
This module defines strategies for interpolation between points in a pulse table or similar.
- Classes:
InterpolationStrategy: Interface for interpolation strategies.
LinearInterpolationStrategy: Interpolates linearly between two points.
HoldInterpolationStrategy: Interpolates by holding the first point’s value.
JumpInterpolationStrategy: Interpolates by holding the second point’s value.
Classes
An InterpolationStrategy that interpolates by holding the value of the start point for the entire intermediate space. |
|
Defines a strategy to interpolate values between two points. |
|
An InterpolationStrategy that interpolates by holding the value of the end point for the entire intermediate space. |
|
An InterpolationStrategy that interpolates linearly between two points. |
- class qupulse.pulses.interpolation.HoldInterpolationStrategy[source]¶
Bases:
qupulse.pulses.interpolation.InterpolationStrategy
An InterpolationStrategy that interpolates by holding the value of the start point for the entire intermediate space.
- constant_value(start: Tuple[float, float], end: Tuple[float, float]) Optional[float] [source]¶
The value of the interpolation if it is constant.
- Parameters
start – The start point of the interpolation as (time, value) pair.
end – The end point of the interpolation as (time, value) pair.
- Returns
The value of the interpolation if it is constant
- property expression: qupulse.expressions.sympy.ExpressionScalar¶
Returns a symbolic expression of the interpolation strategy using (v0,t0) and (v1, t1) to represent start and end point and t as free variable. Note that the expression is only valid for values of t between t0 and t1.
- property integral: qupulse.expressions.sympy.ExpressionScalar¶
Returns the symbolic integral of this interpolation strategy using (v0,t0) and (v1,t1) to represent start and end point.
- class qupulse.pulses.interpolation.InterpolationStrategy[source]¶
Bases:
object
Defines a strategy to interpolate values between two points.
- constant_value(start: Tuple[float, float], end: Tuple[float, float]) Optional[float] [source]¶
The value of the interpolation if it is constant.
- Parameters
start – The start point of the interpolation as (time, value) pair.
end – The end point of the interpolation as (time, value) pair.
- Returns
The value of the interpolation if it is constant
- abstract evaluate_integral(t0, v0, t1, v1)[source]¶
Evaluate integral using arguments v0, t0, v1, t1
- abstract property expression: qupulse.expressions.sympy.ExpressionScalar¶
Returns a symbolic expression of the interpolation strategy using (v0,t0) and (v1, t1) to represent start and end point and t as free variable. Note that the expression is only valid for values of t between t0 and t1.
- abstract property integral: qupulse.expressions.sympy.ExpressionScalar¶
Returns the symbolic integral of this interpolation strategy using (v0,t0) and (v1,t1) to represent start and end point.
- class qupulse.pulses.interpolation.JumpInterpolationStrategy[source]¶
Bases:
qupulse.pulses.interpolation.InterpolationStrategy
An InterpolationStrategy that interpolates by holding the value of the end point for the entire intermediate space.
- constant_value(start: Tuple[float, float], end: Tuple[float, float]) Optional[float] [source]¶
The value of the interpolation if it is constant.
- Parameters
start – The start point of the interpolation as (time, value) pair.
end – The end point of the interpolation as (time, value) pair.
- Returns
The value of the interpolation if it is constant
- property expression: qupulse.expressions.sympy.ExpressionScalar¶
Returns a symbolic expression of the interpolation strategy using (v0,t0) and (v1, t1) to represent start and end point and t as free variable. Note that the expression is only valid for values of t between t0 and t1.
- property integral: qupulse.expressions.sympy.ExpressionScalar¶
Returns the symbolic integral of this interpolation strategy using (v0,t0) and (v1,t1) to represent start and end point.
- class qupulse.pulses.interpolation.LinearInterpolationStrategy[source]¶
Bases:
qupulse.pulses.interpolation.InterpolationStrategy
An InterpolationStrategy that interpolates linearly between two points.
- constant_value(start: Tuple[float, float], end: Tuple[float, float]) Optional[float] [source]¶
The value of the interpolation if it is constant.
- Parameters
start – The start point of the interpolation as (time, value) pair.
end – The end point of the interpolation as (time, value) pair.
- Returns
The value of the interpolation if it is constant
- property expression: qupulse.expressions.sympy.ExpressionScalar¶
Returns a symbolic expression of the interpolation strategy using (v0,t0) and (v1, t1) to represent start and end point and t as free variable. Note that the expression is only valid for values of t between t0 and t1.
- property integral: qupulse.expressions.sympy.ExpressionScalar¶
Returns the symbolic integral of this interpolation strategy using (v0,t0) and (v1,t1) to represent start and end point.