  Quantum key distribution (QKD), ensuring the unconditional security of
information, attracts a significant deal of interest. An important task is to
design QKD systems as a platform for education as well as for research and
development applications and fast prototyping new QKD protocols. Here we
present a modular QKD setup driven by National Instruments (NI) cards with open
source LabView code, open source Python code for post-processing procedures,
and open source protocol for external applications. An important feature of the
developed apparatus is its flexibility offering possibilities to modify optical
schemes and verify novel QKD protocols. Another distinctive feature of the
developed setup is the implementation of the decoy-state protocol, which is a
standard tool for secure long-distance quantum communications. By testing the
plug-and-play scheme realizing BB84 and decoy-state BB84 QKD protocols, we
demonstrate that developed QKD setup shows a high degree of robustness beyond
laboratory conditions. We demonstrate the results of the use of the developed
modular setup for urban QKD experiments.
