  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.
