iqm.benchmarks.readout_mitigation.apply_readout_error_mitigation

iqm.benchmarks.readout_mitigation.apply_readout_error_mitigation#

iqm.benchmarks.readout_mitigation.apply_readout_error_mitigation(backend_arg: str | IQMBackendBase, transpiled_circuits: List[IQMCircuit], counts: List[Dict[str, int]], mit_shots: int = 1000) List[tuple[Any, Any]] | List[tuple[QuasiCollection, list]] | List[QuasiCollection]#
Parameters:
  • backend_arg (str | IQMBackendBase) – the backend to calibrate an M3 mitigator against.

  • transpiled_circuits (List[QuantumCircuit]) – the list of transpiled quantum circuits.

  • counts (List[Dict[str, int]]) – the measurement counts corresponding to the circuits.

  • mit_shots (int) – number of shots per circuit.

Returns:

a list of dictionaries with REM-corrected quasiprobabilities for each outcome.

Return type:

tuple[Any, Any] | tuple[QuasiCollection, list] | QuasiCollection