The quantum bit error rate(QBER) based on the weak coherent pulse′s quantum key distribution is analyzed.It is indicates that the coefficient of QBER is not a constant but is increased exponentially with the transmission distances.Based on the three experiments data,the function fitting has been done.We discover that these fitting functions have the same function form.Subsequently we use these functions to optimize the mean photon number for the BB84 quantum key distribution with decoy states.It...