  We present Stochastic Optical Quantum Circuit Simulator (SOQCS) C++/Python
library for the simulation of quantum optical circuits, and we provide its
implementation details. SOQCS offers a framework to define, simulate and study
quantum linear optical circuits in the presence of various imperfections. These
come from partial distinguishability of photons, lossy propagation media,
unbalanced beamsplitters and non-ideal emitters and detectors for example.
SOQCS is developed as a series of different modules which provide quantum
circuits, different simulator cores and tools to analyze the output. Quantum
circuits can be defined from basic components, including emitters, linear
optical elements, delays and detectors. Post-selection can be configured
straightforwardly as part of detector definitions. An important attribute of
SOQCS is its modularity which allows for its further development in the future.
