Design and Simulation of Linear All-Optical Comparator Based on Square-Lattice Photonic Crystals

An optical comparator is an important logic circuit used in digital designs. Photonic crystals are among the platforms for implementing different kinds of gates and logic circuits. Photonic crystals are structures with alternating refractive indices. In digital optics, logical values “0” and “1” are dened based on the level of optical power. In this paper, an optical comparator based on square-lattice photonic crystals is designed and simulated. In the design of this comparator, a small-sized structure is used. The simulation results show that in the proposed comparator, there is a long distance between logical values “0” and “1”. Due to the small size of this comparator and the adequate distance between logical values “0” and “1”, this structure suits photonic integrated circuits with high accuracy.


Introduction
Electrons are considered the charge carriers in electronic circuits. In these circuits, a transistor serves as the base part. In other words, all circuits are designed using transistors. Since the movement of electrons in transistors is determined by the size of this part, the speed of the transistor circuits is limited by the size of the transistors. If electronic parts are replaced with optical parts, the photons will be the charge carriers. Given the high speed of photons, if optical parts are used, their speed will increase drastically. Therefore, it is better to use optical circuits in the design of high-speed integrated circuits (John 1987 Photonic crystals are among the platforms that suit the design of optical circuits. One of the reasons for paying more attention to this structure is that it is possible to design different types of circuits using photonic crystals. In the digital eld, many logic gates have been designed with photonic crystals (Olyaee Recently, several papers have been penned on the design of comparators. In 2017, Rathi et al. designed a small-sized structure for an optical comparator based on square-lattice photonic crystals. In this paper, it is shown that using optical power distribution the structure can act as a comparator and the output values are not determined quantitatively (Rathi et al. 2017). In 2018, Fakouri-Farid et al. used a squarelattice photonic crystal structure to design a comparator. The distance between the high and low logical values was acceptable in this comparator, but the size of the structure was extremely large. Moreover, due to the use of a ring resonator in the structure, the delay time of the circuit is increased (Fakouri-Farid and Andalib 2018).
Another comparator was designed by Serajmohammadi et al. in 2019. In this paper, the distance between the high and low logical values was satisfactory but the circuit size was large and a ring resonator is used (Serajmohammadi et al. 2019). In 2019, Surendar et al. used photonic crystals to design a comparator. In this comparator, an X-shaped resonator is used. In this structure, the distance between "0" and "1" values is su cient but the use of a resonator and the large size of this structure are among the In this paper, a photonic crystal structure with a square lattice is used to design an optical comparator. In the design of this structure, it is tried to select the small comparator size. Moreover, in this structure, the distance between the logical values "0" and "1" is also taken into account. Furthermore, it is tried to avoid the use of ring resonators to create a high-speed structure. Therefore, the circuit delay time is reduced and its speed is increased.

Design Of Optical Comparator
A basic photonic crystal structure consisting of silicon rods with a circular cross-section in the air context is used to design the comparator. There are 24×19 rods that form a two-dimensional square lattice. The refractive index of the rods is 3.46, which is designed for the approximately 1.55µm wavelength. The lattice constant, which is the distance between the centers of the rods, is set to a=0.6µm for this structure.
The radius of the silicon rods is also r=0.2a.
This alternating structure leads to the creation of an attribute called the photonic band gap (PBG). Based on this attribute, propagation of a range of wavelengths in the structure is not allowed. The band structure calculations are also used to calculate this wavelength range. The plane wave expansion (PWE) method is used to calculate the band structure. Figure 1 depicts the results of the band structure calculations.
As seen in Figure 1, no wavelength can enter the structure in the 0.28 to 0.42 normalized range. Since the normalized values are de ned as , the equivalent wavelength for this range is . Hence, this wavelength has to fall within the PGB range to select a suitable wavelength that can be controlled and directed in the structure. The 1.55µm is selected as the operating wavelength, which is within the aforementioned range.
A combination of linear and point defects is used to obtain the optical comparator. The A and B inputs are placed on the top and bottom of the structure and a constantly activated input called Ref is also placed on the left side of the structure. When both inputs are off, the output for their equality has to be activated. The Ref input serves this purpose. Moreover, to improve the structure performance, Ref source has a phase shift in relation to the two input references. Three outputs are also selected for three possible states, which include A<B, A=B, and A>B. The outputs of these three states also include F 1 (A<B), F 2 (A=B), and F 3 (A>B). Figure 2 depicts the arrangement of the inputs and outputs and the link between their paths.
As seen in Figure 2, linear defects are used to obtain the comparator and create the input and output paths. These defects are created by omitting all the rods. Point defects are also used at the intersection of the waveguide paths. The radius of the rods is changed for the point defects. Figure 2 shows the size of the radius of these rods. Some of the rods are also displaced as follows to improve comparator e ciency. The comparator is simulated in four input states and the optical power distribution in the structure is obtained in these states. Figure 3 also shows the simulation results. In Figure 3(a) shows power distribution for A=B=0. As seen in this gure, the F 2 output has considerable optical power and it could be considered the equivalent to logical value "1". The optical power in the output is supplied by Ref input.
In this state, the decrease in power in the outputs is caused by the interference of the waves emitted from the input source and Ref input at the intersection while optimal power is only distributed along path F 2 after colliding with the rods and the power level is very low in the other outputs. Figure 3 (b) depicts the optical power distribution in this state. Figure 3 (c) shows the results when the inputs are A=0, B=1. Since in this state A<B, the F 1 output is expected to be in the "1" state and the other outputs are expected to be zero. As seen in this gure, the power distribution in the F 1 output is signi cant and is equal to the logical value "1".
If the inputs are A =1, B =0, i.e. A> B, the F 3 output has to have high optical power and other outputs have to have very low power due to the symmetry of the circuit. Figure 3 (d) con rms this state. In other words, F 3 equals logical value "1" and the other outputs are in the "0" state. Figure 4 presents the time curve of the variations of the optical power range in the comparator outputs. As seen in this gure, when A=B=0, the normalized power in the F 2 output equals 0.67, and power in the other two outputs equals 0.01. In other words, the F 2 output equals logical value "1. In addition, when A=B=1, the power in the F 2 output equals 0.70 while in other outputs it is equal to 0.17. In other words, in this state, F 2 equals logical value "1" (see gures 4 (a) and 4 (b)). In this state, the optical power in the F 1 output is 0.66, which equals logical value "1". In the other two outputs, power equals 0.20, which equals logical value "0". The normalized power diagram for A=1, B=0 is also shown in Figure 4 (d). As seen in this gure, power in the F 3 output, which has to be in the logical state "1", equals 0.66, while in the other outputs the optical power is low and equals 0.20.
Several new articles are reviewed and their results are compared to compare the proposed structure with the previous studies. Table 1 shows the results of this comparison. It is worth noting that very few studies have been conducted on photonic crystal comparators. In Table 1, the size of this structure is compared to other papers. In addition, the worst value of each output in the "0" and "1" logical value states, i.e. the maximum power for "0" and the lowest power for "1", are shown in this , the values of "0" are not reported and the values of "1" are good logical values but the circuit size is large. In reference (Jalali et al. 2019), the logical value "0" is high and the structure is also large. Finally, in reference (Seraj et al. 2020), the structure is small, but two outputs are used simultaneously to compare the inputs. The value "1" in this circuit is also weak. In these circuits, the logical values "0" and "1" and the size of the structure are not optimized but in the proposed comparator the circuit size is small while the long distance between the two logical values is also taken into account.

Conclusion
In this study, a one-bit comparator is designed and simulated. This circuit can compare two input bits and put one of the three outputs in the logical state "1". One of the characteristics of the designed structure is its small size, which makes the comparator suitable for photonic integrated circuits. Moreover, the distance between two logical values is taken into account in designing the comparator to ensure the distance is relatively good. Another characteristic of this circuit is its simple design, which involves simple linear and point defects and does not include resonators that increase the circuit delay time.