qiskit_noise_learning.math.ComposedLinearMap
class qiskit_noise_learning.math.ComposedLinearMap(maps: list[LinearMap])
Bases: LinearMap[InputIndex, OutputIndex]
A linear map formed by composing a chain of maps.
Maps are stored in application order: maps[0] is applied first (innermost), maps[-1] is applied last (outermost).
Parameters
maps – The ordered sequence of maps to compose.
__init__
__init__(maps: list[LinearMap])
Methods
Column 1 | Column 2 |
|---|---|
__init__(maps) | |
compose(outer) | Post-compose: self maps I->O, outer maps O->C, result maps I->C. |
left_multiply(matrix) | Multiply on the left by an explicit matrix. |
pre_compose(inner) | Pre-compose: inner maps A->I, self maps I->O, result maps A->O. |
projected_output(output_indices, vector) | Compute a projection of the map applied to a vector. |
rows(output_indices) | Construct the sub-matrix whose rows are the given output indices. |
Attributes
Column 1 | Column 2 |
|---|---|
input_space | The input space. |
maps | The ordered list of maps in application order. |
output_space | The output space. |
maps
rows
rows(output_indices: Iterable[OutputIndex]) → IndexedMatrix[OutputIndex, InputIndex]
Construct the sub-matrix whose rows are the given output indices.
Parameters
output_indices – The labels for the desired rows of the matrix.
Returns
compose
compose(outer: LinearMap[OutputIndex, OtherOutput]) → ComposedLinearMap
Post-compose: self maps I->O, outer maps O->C, result maps I->C.
pre_compose
pre_compose(inner: LinearMap[OtherInput, InputIndex]) → ComposedLinearMap
Pre-compose: inner maps A->I, self maps I->O, result maps A->O.