pygsti.tools.mcfetools.polarization_to_fidelity

pygsti.tools.mcfetools.polarization_to_fidelity#

polarization_to_fidelity(p, n)#

Utility function for MCFE VBDataFrame creation.

Maps a polarization p for an n-qubit circuit to the process fidelity f, defined by f = 1 - (4**n - 1)*(1 - p)/4**n. 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 f = p.

Parameters:
  • p (float) – circuit polarization

  • n (int) – number of qubits in the circuit.

Returns:

circuit process fidelity.

Return type:

float