flamingpy.cv.gkp.Z_err_cond(var, hom_val, var_num=10, replace_undefined=0, use_hom_val=False)[source]

Return phase error probabilities conditioned on homodyne outcomes.

Return the phase error probability for a list of variances var given homodyne outcomes hom_val, with var_num used to determine the number of terms to keep in the summation in the formula. By default, the fractional part of hom_val is used in the summation; if use_hom_val is True, use the entire homodyne value.

  • var (array) – the variances of the p quadrature.

  • hom_val (array) – the p-homodyne outcomes.

  • var_num (float) – number of variances away from the origin we include in the integral.

  • replace_undefined (float) – how to handle 0 denominators. If ‘bin_location’, return poor-man’s probability that ranges from 0 in the centre of a bin to 0.5 halfway between bins. Otherwise, sets it to the replace_undefined value (0 by default).

  • use_hom_val (bool) – if True, use the entire homodyne value hom_val in the expression; otherwise use the fractional part.


probability of Z (phase flip) errors for each variance,

contioned on the homodyne outcomes.

Return type





Using FlamingPy


Getting Help

Python API