TensoredMeasFitter

class TensoredMeasFitter(results, mit_pattern, substate_labels_list=None, circlabel='')[source]

Measurement correction fitter for a tensored calibration.

Initialize a measurement calibration matrix from the results of running the circuits returned by measurement_calibration_circuits.

Parameters
  • results (Union[Result, List[Result]]) – the results of running the measurement calibration circuits. If this is None, the user will set calibration matrices later.

  • mit_pattern (List[List[int]]) – qubits to perform the measurement correction on, divided to groups according to tensors

  • substate_labels_list (Optional[List[List[str]]]) – for each calibration matrix, the labels of its rows and columns. If None, the labels are ordered lexicographically

  • circlabel (str) – if the qubits were labeled

Raises

ValueError – if the mit_pattern doesn’t match the substate_labels_list

Attributes

TensoredMeasFitter.cal_matrices

Return cal_matrices.

TensoredMeasFitter.filter

Return a measurement filter using the cal matrices.

TensoredMeasFitter.nqubits

Return _qubit_list_sizes.

TensoredMeasFitter.substate_labels_list

Return _substate_labels_list.

Methods

TensoredMeasFitter.add_data(new_results[, …])

Add measurement calibration data

TensoredMeasFitter.plot_calibration([…])

Plot one of the calibration matrices (2D color grid plot).

TensoredMeasFitter.readout_fidelity([…])

Based on the results, output the readout fidelity, which is the average of the diagonal entries in the calibration matrices.