---
title: ComposedLinearMap (latest version)
description: API reference for qiskit_noise_learning.math.ComposedLinearMap in the latest version of qiskit-noise-learning
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-noise-learning/generated/math-composed-linear-map
---

# qiskit\_noise\_learning.math.ComposedLinearMap

*class* `qiskit_noise_learning.math.ComposedLinearMap(maps: list[LinearMap])`

[GitHub](https://github.com/Qiskit/qiskit-noise-learning/tree/stable/0.1/qiskit_noise_learning/math/linear_map.py)

Bases: [`LinearMap`](/docs/api/qiskit-noise-learning/generated/math-linear-map "qiskit_noise_learning.math.linear_map.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

|                                                                                                                                              |                                                                   |
| -------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`__init__`](#qiskit_noise_learning.math.ComposedLinearMap.__init__ "qiskit_noise_learning.math.ComposedLinearMap.__init__")(maps)           |                                                                   |
| [`compose`](#qiskit_noise_learning.math.ComposedLinearMap.compose "qiskit_noise_learning.math.ComposedLinearMap.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`](#qiskit_noise_learning.math.ComposedLinearMap.pre_compose "qiskit_noise_learning.math.ComposedLinearMap.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`](#qiskit_noise_learning.math.ComposedLinearMap.rows "qiskit_noise_learning.math.ComposedLinearMap.rows")(output\_indices)            | Construct the sub-matrix whose rows are the given output indices. |

## Attributes

|                                                                                                                  |                                                |
| ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| `input_space`                                                                                                    | The input space.                               |
| [`maps`](#qiskit_noise_learning.math.ComposedLinearMap.maps "qiskit_noise_learning.math.ComposedLinearMap.maps") | The ordered list of maps in application order. |
| `output_space`                                                                                                   | The output space.                              |

### maps

Type: [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`LinearMap`](/docs/api/qiskit-noise-learning/generated/math-linear-map "qiskit_noise_learning.math.linear_map.LinearMap")]

The ordered list of maps in application order.

### 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**

[`IndexedMatrix`](/docs/api/qiskit-noise-learning/generated/math-indexed-matrix "qiskit_noise_learning.math.IndexedMatrix")

### 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.
