def pauli_error(self) -> float:
        r"""Returns the Pauli error inferred from randomized benchmarking.

        If sequence fidelity $F$ decays with number of gates $m$ as

        $$F = A p^m + B,$$

        where $0 < p < 1$, then the Pauli error $r_p$ is given by

        $$r_p = (1 - 1/d^2) * (1 - p),$$

        where $d = 2^{N_Q}$ is the Hilbert space dimension and $N_Q$ is the number of qubits.
        """
        opt_params, _ = self._fit_exponential()
        p = opt_params[2]
        return (1.0 - 1.0 / 4.0) * (1.0 - p)
Returns the Pauli error inferred from randomized benchmarking.

        If sequence fidelity $F$ decays with number of gates $m$ as

        $$F = A p^m + B,$$

        where $0 < p < 1$, then the Pauli error $r_p$ is given by

        $$r_p = (1 - 1/d^2) * (1 - p),$$

        where $d = 2^{N_Q}$ is the Hilbert space dimension and $N_Q$ is the number of qubits.
        
cirq-core/cirq/experiments/qubit_characterizations.py