## 2 Fundamentals of Ion-Exchanged Glass Waveguide Circuits  
There are excellents works on ion-exchanged glass waveguide circuits, but here we focus our attention on circuits formed by elements as channel waveguides, directional couplers and optical gratings (contradirectional couplers), and intended for classical and quantum optical sensing and communications. Channel waveguides are the pillar of integrated optics [17; 18; 19; 53; 54] and optical integrated gratings are also fundamental for the implementation of many devices, including integrated amplifiers and lasers in rare-earth doped glasses [19; 55]. Directional couplers and 1 \(\times\) N splitters, too, are based on channel waveguides and have been mainly intended for power derivation in optical fiber communication networks, but they also play an important role in optical sensing and in interferometry [31; 56], including applications to optical astronomy [57]. The fabrication of these devices in a glass substrate usually requires a lithographic process [18; 19] in order to allow a spatially selective ion-exchange. Let us refer to thermal ion exchange: first, a metallic film (Al or Ti) is deposited on the glass substrate, followed by the deposition of a photoresist film. After UV exposure through a given mask and a subsequent chemical etching, the mask pattern is transferred to the metal film, so that, when immersing the substrate in a molten salt, the ion exchange occurs only in the volume under the designed opening. This process produces surface channel guides, which can be slightly buried by a second thermal diffusion process or strongly buried by using an electrical field. In Figure 6, the design is shown of an integrated optical device of arbitrary dimension \(N\), that is, \(N\) optical paths (channel waveguides) coupled by concatenated directional couplers (DC) and phase shifters (PS). It represents a generic optical device able to implement different passive quantum operations. Active functions, such as optical generation and amplification, may also be added if hybrid glasses, with a portion doped by rare earth elements (on the left in Figure 6), are used. We must stress that hybrid glasses can be obtained by joining a block of a passive glass with a block of an active glass by a low temperature bonding technique [58; 59]; alternatively, the hybrid glass can be also implemented by bonding an active glass superstrate to a passive glass substrate [60]. Consequently, integrated lasers having optical gratings (OG) resonators can also be included in the integrated circuit, as sketched in Figure 6; they are pumped by an external signal P\({}_{j}\) (\(j=1,\ldots,N\)), which can generate classical and/or quantum light states [61]. The optical gratings can be fabricated by laser writing or by the same photolithographic procedure described above [17; 18; 19]. In short, Figure 6 shows a general ion-exchanged hybrid glass integrated optical circuit highly intended for classical/quantum communications (or even classical/quantum optical sensing) and that can be adapted for implementing different devices as wavelength multiplexers, quantum states generators, quantum states projectors and so on, as is shown in some detail in Sections 3 and 4. The total refractive index profile of the above ion-exchanged hybrid glass integrated optical circuit can be represented, in a good approximation, as follows  
\[n(x,y,z)=n_{s}+\sum_{j}\Delta n_{j}(x,y,z;p_{j1},\ldots,p_{jq}) \tag{1}\]  
where \(n_{s}\) is the substrate index, and \(\Delta n_{j}(x,y,z;p_{j1},\ldots,p_{jq})\), \(j=1,\ldots,N\) are functions describing the refractive index profile obtained in each ion-exchanged channel waveguide with parameters \(p_{j1},\ldots,p_{jq}\), that is, ion-exchanged parameters as effective depth \(d\), maximum refractive index change \(\Delta n\),..., geometrical lithographic parameters as width \(w\) of a channel guide, separation \(s\) between channel guides,...and so on.