Abstract
A full quantum secure direct communication system is implemented in MATLAB environment using linear optical devices and single-photon detectors. MATLAB has the advantage of integrating the simulation of the whole system, which has optical and electronic blocks, all together into one script. Each block of the system (transmitter, receiver, and security check) is physically and mathematically explained, and the idea behind the code is presented. Results from running the whole simulation are in accordance with those obtained either from the published practical systems or from using state-of-the-art commercially available optical simulators. Our approach opens the way to simulate with confidence hyperentangled systems where experimental data are not yet widely available. (C) 2021 Society of Photo-Optical Instrumentation Engineers (SPIE)