get_additive_error_factor

forest.benchmarking.robust_phase_estimation.get_additive_error_factor(M_j: float, max_additive_error: float) → float

Calculate the factor in Equation V.17 of [RPE].

This factor multiplies the number of trials at the jth iteration in order to maintain Heisenberg scaling with the same variance upper bound as if there were no additive error present. This holds as long as the actual max_additive_error in the procedure is no more than 1/sqrt(8) ~=~ .354 error present in the procedure

Parameters:
  • M_j – the number of shots in the jth iteration of RPE
  • max_additive_error – the assumed maximum of the additive errors you hope to adjust for
Returns:

A factor that multiplied by M_j yields a number of shots preserving Heisenberg Scaling