def METHOD_NAME(fmax: float, fint: float, E_c: float,
                        t_run: float=1e-6, t_averaging: float=1.0,
                        t_gate: float=240e-9, A_flux_noise: float=6e-6):
    '''
    Calculate rms of phase error (in deg) due to flux noise at the
    interaction point of a CZ gate.
    Args:
        fmax (float):
            Sweet spot frequency of the qubit in Hz.
        fint (float):
            Frequency of the qubit at the interaction point of the CZ gate
            in Hz.
        E_c (float):
            Charging energy of the qubit in Hz.
        t_run (float):
            Duration of a single run of the circuit in s.
        t_averaging (float):
            Averaging time of the whole experiment in s.
        t_gate (float):
            Duration of the CZ gate in s.
        A_flux_noise (float):
            1/f noise magnitude.
    Returns:
        phase_rms: rms of the conditional phase error in deg.
    '''
    cosine = ((fint + E_c) / (fmax + E_c))**2
    beta = np.pi / 2 * (fint + E_c) * np.sqrt(1 - cosine**2) / cosine
    return (A_flux_noise * np.sqrt(np.log(t_averaging / t_run)) * t_gate *
            360 * beta)