3.6.2. qupulse.program.transformation¶
Functions
|
|
|
|
|
|
|
|
|
|
|
Creates a LinearTransformation object out of a pandas data frame. |
Classes
|
|
|
|
|
Adds an offset to each channel specified in offsets. |
|
Set channel values to given values regardless their former existence. |
|
|
- class qupulse.program.transformation.ChainedTransformation(*transformations: qupulse.program.transformation.Transformation)[source]¶
Bases:
qupulse.program.transformation.Transformation
- chain(next_transformation) qupulse.program.transformation.Transformation [source]¶
- property compare_key: Tuple[qupulse.program.transformation.Transformation, ...]¶
Implements
compare_key
.
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_input_channels()
.
- get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_output_channels()
.
- property transformations: Tuple[qupulse.program.transformation.Transformation, ...]¶
- class qupulse.program.transformation.IdentityTransformation[source]¶
Bases:
qupulse.program.transformation.Transformation
- chain(next_transformation: qupulse.program.transformation.Transformation) qupulse.program.transformation.Transformation [source]¶
- property compare_key: None¶
Implements
compare_key
.
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_input_channels()
.
- get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_output_channels()
.
- class qupulse.program.transformation.LinearTransformation(transformation_matrix: numpy.ndarray, input_channels: Sequence[Union[str, int]], output_channels: Sequence[Union[str, int]])[source]¶
Bases:
qupulse.program.transformation.Transformation
- Parameters
transformation_matrix – Matrix describing the transformation with shape (output_channels, input_channels)
input_channels – Channel ids of the columns
output_channels – Channel ids of the rows
- __init__(transformation_matrix: numpy.ndarray, input_channels: Sequence[Union[str, int]], output_channels: Sequence[Union[str, int]])[source]¶
- Parameters
transformation_matrix – Matrix describing the transformation with shape (output_channels, input_channels)
input_channels – Channel ids of the columns
output_channels – Channel ids of the rows
- property compare_key: Tuple[Tuple[Union[str, int]], Tuple[Union[str, int]], bytes]¶
Implements
compare_key
.
- from_pandas() qupulse.program.transformation.LinearTransformation ¶
Creates a LinearTransformation object out of a pandas data frame.
- Parameters
transformation (pandas.DataFrame) – The pandas.DataFrame object out of which a LinearTransformation will be formed.
- Returns
the created LinearTransformation instance
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_input_channels()
.
- get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_output_channels()
.
- class qupulse.program.transformation.OffsetTransformation(offsets: Mapping[Union[str, int], Union[numbers.Real, qupulse.expressions.sympy.ExpressionScalar]])[source]¶
Bases:
qupulse.program.transformation.Transformation
Adds an offset to each channel specified in offsets.
Channels not in offsets are forewarded
- Parameters
offsets – Channel -> offset mapping
- __init__(offsets: Mapping[Union[str, int], Union[numbers.Real, qupulse.expressions.sympy.ExpressionScalar]])[source]¶
Adds an offset to each channel specified in offsets.
Channels not in offsets are forewarded
- Parameters
offsets – Channel -> offset mapping
- property compare_key: Hashable¶
Implements
compare_key
.
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_input_channels()
.
- get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_output_channels()
.
- class qupulse.program.transformation.ParallelChannelTransformation(channels: Mapping[Union[str, int], Union[numbers.Real, qupulse.expressions.sympy.ExpressionScalar]])[source]¶
Bases:
qupulse.program.transformation.Transformation
Set channel values to given values regardless their former existence. The values can be time dependent expressions.
- Parameters
channels – Channels present in this map are set to the given value.
- __init__(channels: Mapping[Union[str, int], Union[numbers.Real, qupulse.expressions.sympy.ExpressionScalar]])[source]¶
Set channel values to given values regardless their former existence. The values can be time dependent expressions.
- Parameters
channels – Channels present in this map are set to the given value.
- property compare_key: Hashable¶
Implements
compare_key
.
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_input_channels()
.
- get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_output_channels()
.
- class qupulse.program.transformation.ScalingTransformation(factors: Mapping[Union[str, int], Union[numbers.Real, qupulse.expressions.sympy.ExpressionScalar]])[source]¶
Bases:
qupulse.program.transformation.Transformation
- property compare_key: Hashable¶
Implements
compare_key
.
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_input_channels()
.
- get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Implements
get_output_channels()
.
- class qupulse.program.transformation.Transformation[source]¶
Bases:
qupulse.comparable.Comparable
- chain(next_transformation: qupulse.program.transformation.Transformation) qupulse.program.transformation.Transformation [source]¶
- get_constant_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
- abstract get_input_channels(output_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Channels that are required for getting data for the requested output channel
- abstract get_output_channels(input_channels: AbstractSet[Union[str, int]]) AbstractSet[Union[str, int]] [source]¶
Return the channel identifiers
- qupulse.program.transformation.chain_transformations(*transformations: qupulse.program.transformation.Transformation) qupulse.program.transformation.Transformation [source]¶