pygsti.tools.mcfetools.effective_polarization

pygsti.tools.mcfetools.effective_polarization#

effective_polarization(hamming_distance_counts)#

Utility function for MCFE VBDataFrame creation.

Compute the effective polarization p of a circuit from its Hamming distance counts, according to the formula

p = (4**n * asp - 1)/(4**n - 1)

where asp is the adjusted success probability of the circuit.

Parameters:

hamming_distance_counts (np.ndarray[float]) – Array whose indices correspond to Hamming distances, and whose values at each index correspond to the number of counts of that Hamming distance in the circuit outcome data from which hamming_distance_counts was derived.

Returns:

polarization.

Return type:

float