## 2 The Beginning of Integrated Quantum Photonics  
The main element of LOQC is the beam splitter (the directional coupler in waveguide terminology) with an arbitrary reflection coefficient, which superimposes the state of light, properly guided (see Box 1). The paths the photons might take are the degrees of freedom for encoding qubits. [PERSON] et al. [27] provided the first experimental verification of KLM gates by means of bulk optics. However, for scalability and miniaturization, the use of waveguides and directional couplers is preferred. Two approaches have been followed for this scope. One consists in focusing an intense laser on a doped silica layer or on a glass substrate, allowing the creation of arbitrary waveguide structures [28]. The other method, described for the first time in 2008 by [PERSON] et al. [29], is represented by silica-on-silicon-waveguides quantum circuits, where high-fidelity integrated implementations of key components of photonic quantum circuits are demonstrated. In their paper, the fabrication of several directional couplers with different splitting ratios was reported, in order to prove the reproducibility of such devices, which are the main building element of the integrated CNOT gate. The waveguides were made of a silica core doped with germanium and boron oxides. Degenerate photon pairs at \(804\,\mathrm{nm}\) were generated outside and injected into the chips. They also fabricated the first integrated CNOT gate, and experimentally tested its functionality by using only the four states of the computational basis (\(|0\rangle_{C}|0\rangle_{T}\), \(|0\rangle_{C}|1\rangle_{T}\), \(|1\rangle_{C}|0\rangle_{T}\), and \(|1\rangle_{C}|1\rangle_{T}\)) and measuring the probability of detecting each of the computational states at the output. The average fidelity for the logical basis was (\(94.3\pm 0.2\))%. For the first time, a single chip had the ability to implement all the elements necessary to realize an on-chip LOQC-based CNOT gate. However, by using only the states of the computational basis, it was not possible to demonstrate the entanglement/disentanglement property of the CNOT. Those limits were exceeded by including on-chip waveguide interferometers with variable phase shifters to precisely control the state of the qubits and to realize the entanglement of multi-photons directly on chip [30]. In the same year, the first [PERSON]'s factoring algorithm proof of principle using a SiO\({}_{2}\) chip with two CNOT gates was demonstrated [31], implementing a compiled version of [PERSON]'s algorithm for factorizing 15. With such preliminaries, in 2012, [PERSON] et al. [32] realized an integrated-quantum-photonic device comprising a two-qubit entangling gate, eight variable phase shifters, and many Hadamard-like gates. This device was able to characterize both arbitrary single-photon states with any amount of mixture and pure two-photon states with any amount of entanglement. High fidelity for thousands of randomly chosen configurations was achieved. However, the photon sources used for such tests were still bulk devices out of the chip. The first advancement (see Figure 1) towards a fully integrated chip for quantum circuit applications was achieved in 2013 [33]. A bright pump laser, coupled to the chip using a lens fiber and on-chip spot-size converters, and distributed between two spiraled waveguides, excited the \(\chi^{(3)}\) spontaneous four-wave mixing effect, to produce signal-idler photon pairs. The pairs generated in the two spiraled waveguides interfered on a coupler, to yield either splitting or bunching over the two output modes, depending on the phase, which was thermo-optically reconfigurable. This allowed, for the first time, an on-chip source of photons, although detection was still made outside the chip. The chip was realized on a silicon-on-insulator (SOI) photonic platform, to have full compatibility at telecom wavelength, and quantum interference up to (\(100\pm 0.4\))% was achieved.