pygsti.tools.mcfetools.success_probability_to_polarization#
- success_probability_to_polarization(s, n)#
Utility function for MCFE VBDataFrame creation.
Maps a success probability s for an n-qubit circuit to the polarization s, defined by p = (s - 1/2^n)/(1 - 1/2^n). For large n, the difference between p and s is negligible and the calculation of 2**n is prohibitive, so we impose a cutoff above which we assert p = s.
- Parameters:
s (float) – success probability for the circuit.
n (int) – number of qubits in the circuit.
- Returns:
circuit polarization.
- Return type:
float