We study the measurement device independent quantum key distribution (MDIQKD)
in practice with limited resource, when there are only 3 different states in
implementing the decoy-state method and when there are basis dependent coding
errors. We present general formulas for the decoy-state method for two-pulse
sources with 3 different states, which can be applied to the recently proposed
MDIQKD with imperfect single-photon source such as the coherent states or the
heralded states from the parametric down conversion. We point out that the
existing result for secure QKD with source coding errors does not always hold.
We find that very accurate source coding is not necessary. In particular, we
loosen the precision of existing result by several magnitude orders for secure
QKD.Comment: Published version with Eq.(17) corrected. We emphasize that our major
result (Eq.16) for the decoy-state part can be applied to generate a key rate
very close to the ideal case of using infinite different coherent states, as
was numerically demonstrated in Ref.[21]. Published in PRA, 2013, Ja