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