iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb.compute_polarizations

iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb.compute_polarizations#

iqm.benchmarks.randomized_benchmarking.mirror_rb.mirror_rb.compute_polarizations(num_qubits: int, noisy_counts: list[dict[str, int]], ideal_counts: list[dict[str, int]], num_circ_samples: int, num_pauli_samples: int) list[float]#

Estimates the polarization for a list of noisy counts with respect to corresponding ideal counts.

The polarization here is a rescaling of the average fidelity, that corrects for few-qubit effects

Parameters:
  • num_qubits (int) – The number of qubits being benchmarked

  • noisy_counts (list[dict[str, int]]) – The list of counts coming from real execution

  • ideal_counts (list[dict[str, int]]) – The list of counts coming from simulated, ideal execution

  • num_circ_samples (int) – The number circuit of samples used to estimate the polarization

  • num_pauli_samples (int) – The number of pauli samples per circuit sample used to estimate the polarization

Returns:

The polarizations for each circuit sample of the given sequence length

Return type:

list[float]