Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

TensoredFilter

class TensoredFilter(cal_matrices, substate_labels_list)

GitHub

Tensored measurement error mitigation filter.

Produced from a tensored measurement calibration fitter and can be applied to data.

Initialize a tensored measurement error mitigation filter using the cal_matrices from a tensored measurement calibration fitter.

Parameters

  • cal_matrices (matrix) – the calibration matrices for applying the correction.
  • substate_labels_list (list) – for each calibration matrix a list of the states (as strings, states in the subspace)

Attributes

cal_matrices

Return cal_matrices.

nqubits

Return the number of qubits. See also MeasurementFilter.apply()

qubit_list_sizes

Return _qubit_list_sizes.

substate_labels_list

Return _substate_labels_list


Methods

apply

TensoredFilter.apply(raw_data, method='least_squares')

Apply the calibration matrices to results.

Parameters

  • raw_data (dict or Result) –

    The data to be corrected. Can be in one of two forms:

    • A counts dictionary from results.get_counts
    • A Qiskit Result
  • method (str) –

    fitting method. The following methods are supported:

    • ’pseudo_inverse’: direct inversion of the cal matrices.
    • ’least_squares’: constrained to have physical probabilities.
    • If None, ‘least_squares’ is used.

Returns

The corrected data in the same form as raw_data

Return type

dict or Result

Raises

QiskitError – if raw_data is not in a one of the defined forms.

Was this page helpful?
Report a bug or request content on GitHub.