  A linear optics network is a multimode interferometer system, where
indistinguishable photon inputs can create nonclassical interference that can
not be simulated with classical computers. Such nonclassical interference
implies the existence of entanglement among its subsystems, if we divide its
modes into different parties. Entanglement in such systems is naturally encoded
in multi-rail (multi-mode) quantum registers. For bipartite entanglement, a
generation and detection scheme with multi-rail encoding has been theoretically
proposed [NJP 19(10):103032, 2017] and experimentally realized [Optica,
7(11):1517, 2020]. In this paper, we will take a step further to establish a
theory for the detection of multi-rail-encoded discrete-variable genuine
multipartite entanglement (GME) in fixed local-photon-number subspaces of
linear optics networks. We also propose a scheme for GME generation with both
discrete-variable (single photons) and continuous-variable (squeezed states)
light sources. This scheme allows us to reveal the discrete-variable GME in
continuous-variable systems. The effect of photon losses is also numerically
analyzed for the generation scheme based on continuous-variable inputs.
