original_docstring: Returns estimated passing threshold of qv_estimate object for nqubits.
docstring: Returns estimated passing threshold of qv_estimate object for nqubits.
docstring_tokens: Returns estimated passing threshold of qv_estimate object for nqubits .
code: def passing_error_estimate(qv_estimate,
                             nqubits: int,
                             threshold=2/3):
      """Returns estimated passing threshold of qv_estimate object for nqubits."""
      
      evals = list(qv_estimate.error_dict.keys())
      ndata = [np.mean(qv_estimate.act_success[nqubits, e]) for e in evals]
      cs = CubicSpline(evals, np.real(np.array(ndata) - threshold))
      
      return root_scalar(cs, x0=1e-4, x1=1e-3, method='secant').root
code_tokens: def passing_error_estimate ( qv_estimate , nqubits : int , threshold = 2 / 3 ) : evals = list ( qv_estimate . error_dict . keys ( ) ) ndata = [ np . mean ( qv_estimate . act_success [ nqubits , e ] ) for e in evals ] cs = CubicSpline ( evals , np . real ( np . array ( ndata ) - threshold ) ) return root_scalar ( cs , x0 = 1e-4 , x1 = 1e-3 , method = 'secant' ) . root
short_docstring: Returns estimated passing threshold of qv_estimate object for nqubits.
short_docstring_tokens: Returns estimated passing threshold of qv_estimate object for nqubits .
comment: """Returns estimated passing threshold of qv_estimate object for nqubits."""