---
title: CompleteMeasFitter (v0.46)
description: API reference for qiskit.utils.mitigation.CompleteMeasFitter in qiskit v0.46
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/0.46/qiskit.utils.mitigation.CompleteMeasFitter
---

# CompleteMeasFitter

*class* `qiskit.utils.mitigation.CompleteMeasFitter(results, state_labels, qubit_list=None, circlabel='')`

[GitHub](https://github.com/qiskit/qiskit/tree/stable/0.46/qiskit/utils/mitigation/fitters.py)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

Deprecated: Measurement correction fitter for a full calibration

Initialize a measurement calibration matrix from the results of running the circuits returned by measurement\_calibration\_circuits

A wrapper for the tensored fitter

> **Warning**
>
> This class is not a public API. The internals are not stable and will likely change. It is used solely for the `measurement_error_mitigation_cls` kwarg of the [`QuantumInstance`](/docs/api/qiskit/0.46/qiskit.utils.QuantumInstance "qiskit.utils.QuantumInstance") class’s constructor (as a class not an instance). Anything outside of that usage does not have the normal user-facing API stability.

> **Deprecated since version 0.24.0**
>
> The class `qiskit.utils.mitigation.fitters.CompleteMeasFitter` is deprecated as of qiskit-terra 0.24.0. It will be removed in the Qiskit 1.0 release. For code migration guidelines, visit [https://qisk.it/qi\_migration](https://qisk.it/qi_migration).

**Parameters**

- **results** – the results of running the measurement calibration circuits. If this is None the user will set a calibration matrix later.
- **state\_labels** ([*List*](https://docs.python.org/3/library/typing.html#typing.List)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str)*]*) – list of calibration state labels returned from measurement\_calibration\_circuits. The output matrix will obey this ordering.
- **qubit\_list** ([*List*](https://docs.python.org/3/library/typing.html#typing.List)*\[*[*int*](https://docs.python.org/3/library/functions.html#int)*]*) – List of the qubits (for reference and if the subset is needed). If None, the qubit\_list will be created according to the length of state\_labels\[0].
- **circlabel** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) – if the qubits were labeled.

## Attributes

### cal\_matrix

Return cal\_matrix.

### filter

Return a measurement filter using the cal matrix.

### qubit\_list

Return list of qubits.

### state\_labels

Return state\_labels.

## Methods

### add\_data

`add_data(new_results, rebuild_cal_matrix=True)`

Add measurement calibration data

**Parameters**

- **new\_results** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)  *or*[*qiskit.result.Result*](/docs/api/qiskit/0.46/qiskit.result.Result "qiskit.result.Result")) – a single result or list of result objects.
- **rebuild\_cal\_matrix** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – rebuild the calibration matrix

### readout\_fidelity

`readout_fidelity(label_list=None)`

Based on the results, output the readout fidelity which is the normalized trace of the calibration matrix

**Parameters**

**label\_list** ([*bool*](https://docs.python.org/3/library/functions.html#bool)) – If None, returns the average assignment fidelity of a single state. Otherwise it returns the assignment fidelity to be in any one of these states averaged over the second index.

**Returns**

readout fidelity (assignment fidelity)

**Return type**

numpy.array

**Additional Information:**

The on-diagonal elements of the calibration matrix are the probabilities of measuring state ‘x’ given preparation of state ‘x’ and so the normalized trace is the average assignment fidelity

### subset\_fitter

`subset_fitter(qubit_sublist)`

Return a fitter object that is a subset of the qubits in the original list.

**Parameters**

**qubit\_sublist** ([*list*](https://docs.python.org/3/library/stdtypes.html#list)) – must be a subset of qubit\_list

**Returns**

**A new fitter that has the calibration for a**

subset of qubits

**Return type**

[CompleteMeasFitter](#qiskit.utils.mitigation.CompleteMeasFitter "qiskit.utils.mitigation.CompleteMeasFitter")

**Raises**

[**QiskitError**](/docs/api/qiskit/0.46/exceptions#qiskit.exceptions.QiskitError "qiskit.exceptions.QiskitError") – If the calibration matrix is not initialized
