## Abstract

The so-called terahertz band of the electromagnetic spectrum falls in a spectral region where traditional electronic technologies fail to operate owing to the extremely short switching times required. In this paper, we demonstrate the design of three optical logic gates fabricated by three-dimensional printing, which can perform the OR, AND, and XOR logic operations at 130 GHz. In order to optimize our designs we used a finite element electromagnetic simulation. The amplitude spectra of the experimental measurements of the three devices are presented where good agreement between the numerical results and experimental data can be seen. These results lead to the possibility of building more complex logic circuits based on these three photonic logic gates.

© 2020 Optical Society of America

## 1. INTRODUCTION

The ultrahigh speed signal processing required for the data flow that has grown dramatically over the past three decades has stimulated extensive work on high-speed device and circuit design [1–3]. In order to overcome the difficulties of optical digital information processing in the future and to avoid optical-electrical-optical conversion, photonic logic devices are necessary [3–5].

As part of these efforts, important progress has been made in the development of photonic components for communications over the terahertz (THz) band. For instance, dielectric rectangular waveguides, splitters, filters, and couplers [6–9] have been introduced recently. All of this has been motivated because these novel THz optical components are key to the successful development of high-speed short-range wireless communication in this spectral range in the near future [10–12]. Recently, optical logic gates have been demonstrated based on various techniques and materials. For instance, electromagnetic simulations of optical logic gates in metal slot waveguides have been proposed in [13–15] for the near infrared spectrum. Furthermore, logic gates based on two-dimensional (2D) photonic crystals [16–18], graphene nanoribbons[19,20], and semiconductor optical amplifiers [21,22] have been proposed and numerically investigated by finite difference time-domain (FDTD) simulations. Additionally, logic operations at THz frequencies with a reconfigurable geometry based on micro/nano electromechanical systems has been proposed in [23]. Here, we propose simple, low cost solutions to perform logic operations at THz frequencies using three-dimensional (3D) printing technology.

In this work, we propose the design of three optical logic gates fabricated by 3D printing for the logic operations OR, AND, and XOR at 130 GHz, yet, the same geometries can be reconfigured for other frequencies by simply geometrically re-scaling them. The 130 GHz frequency was chosen since the signal-to-noise ratio of our spectrometer is good in this region, and the resolution required for fabrication is easily achievable with our 3D printer. We used a finite element electromagnetic simulation in order to optimize the dimensions of our designs. The operation of the photonic logic gates is based on optimization of waveguide structures, where constructive or destructive interference between the incoming beams determine the state of transmission to the output ports of the devices. The experimental characterization was carried out by using THz time-domain spectroscopy (TDS). The simulation and experimental measurement results for the three devices are presented. Good agreement between the numerical results and experiments is observed.

## 2. DESIGN AND MODELING

The structures presented in this article consist of two input waveguides that couple radiation in such a way that it interferes appropriately in order to obtain the logical operations OR, AND, and XOR. Figure 1 shows the printed geometry of these logic gates. Each logic gate can be operated with four input combinations on/off, where “on/off” indicates radiation coupled/not-coupled through the corresponding input waveguide. The output signal is the radiation amplitude that results from the interference of the radiation from the two inputs.

In order to optimize the waveguide geometry in which the operations previously mentioned are achieved, we used COMSOL Multiphysics to evaluate the electric-field (E-field) distribution of the OR, AND, and XOR logic gates at 130 GHz. COMSOL is an analysis software based on the finite element method. In this study, COMSOL is used for approximating the solution of frequency-domain electromagnetic wave propagation in a 2D geometry previously drawn in the computer aided design (CAD) interface of the software. Materials defined by their electromagnetic properties are assigned to each domain, which in turn are discretized into a subwavelength mesh. The appropriate closed-surface boundary conditions are carefully defined according to the experimental conditions. Input and output ports are defined at each end of the waveguide as TE10 waveguide modes with an out-of-plane E-field vector direction. Finally, the dependence of the transmitted and reflected waves on the frequency is calculated. The geometries of the OR and XOR logic gates are similar. Both of them have an input arm of length of 27 mm and output arm length of 5 mm, the waveguides are 1.5 mm wide, and the height of the devices is 1.5 mm. The other input has a path length difference of $\lambda / 3$ and $\lambda / 2$, respectively, in comparison to the first input arm. We were careful to maintain the radius of curvature of the waveguides larger than $2\lambda $ in order to prevent undesirable leakage [24,25]. The AND geometry consists of two inputs with a length of 20 mm, a rectangle with a base equal to 13.2 mm, a width of 8.5 mm, and an output waveguide length of 10 mm. The inputs and output cross section of the three logic gates have a width and height of 1.5 mm.

The simulation results for the four input states of the OR gate are shown in Fig. 2. As observed in the colormap of Fig. 2(a), the field is mostly distributed inside the two input arms, as the wave propagates with similar amplitudes for each arm through slightly different path lengths. In order to obtain the OR operation, the obvious geometry would be to simply keep the lengths of both input waveguides the same. However, the principle of superposition of waves shows that the intensity of the resulting output in the on–on input state would be twice as high as that of the resulting outputs of the on–off and off–on input states. The introduction of a path difference of lambda/3 between the input arms allows to appropriately dim down the output amplitude of the on–on state without any measurable effect on the other output states. As seen in Figs. 2(b) and 2(c), which correspond to the on–off and off–on states, respectively, the radiation field is mostly concentrated in the top (bottom) input waveguides. All of these previous combinations of input states produce an on state in the output. The colormap in Fig. 2(d) shows the simulation results for the off–off input state, which corresponds to a zero amplitude across the entire simulation space and an off output.

In Fig. 3, the simulations for the AND gate for the input states on–on, on–off, off–on, and off–off are presented. In this case, we designed a $2\times 1$ multi-mode interference waveguide in which the input waveguides direct the radiation to the wider waveguide rectangle in the center. The interference pattern of the on–on state is symmetric and has an amplitude antinode at the position where the wide waveguide meets the output arm, therefore, producing coupling of radiation towards the output port. The interference patterns of the on–off and off–on input states are asymmetric, and, as expected, one is the reflection of the other with respect to a horizontal line along the center of the figures. In these cases, a node is formed at the position where the wide waveguide meets the output arm, producing ${\lt}40 \%$ coupling of radiation, relative to the incoming radiation, although, not perfectly zero is low enough to be interpreted as an off-output state. The off–off input state shows zero amplitude for the entire simulation space.

Finally, in Figs. 4(a)–4(d), the same combinations of input states are presented for the XOR gate. Although, at first glance, the geometries of the OR and XOR gates might seem identical, they are not. The length of the two arms in this case was built such that the relative de-phasing of the two waves is $\lambda / 2$, which implies that the interference of the two waves at the merging point will be destructive, therefore achieving the off state when both arms are on. While Figs. 4(b)–4(d) are almost identical to those of Fig. 2, Fig. 4(a) is different; the amplitude in the output arm is very low, as expected, owing to the destructive interference. Yet it is interesting to notice that, in this case, while the interference of both input arms produces a very low output (1% of the input radiation) inside the waveguide, the energy is coupled out of the waveguide and “lost” in free space.

## 3. FABRICATION AND CHARACTERIZATION

Once the geometries were optimized by the simulations described in the previous section, they were fabricated. We used a Prusa i3 3D printer with a nozzle diameter of 0.4 mm to fabricate the three different devices to perform the OR, AND, and XOR operations according to the design simulations. The devices were made with Bendlay, which is a translucent filament commonly used in fused deposition modeling 3D printing [26] that has a refractive index of 1.54 and an absorption coefficient of $0.4 \; {\rm cm}^{-1}$ [27] at THz frequencies. For the printing process, we set a layer height of 0.1 mm, print speed of 25 mm/s, and nozzle and bed temperatures of 235°C and 60°C. The 3D geometries were designed in FreeCAD using the parameters from the simulation and exported to a stereolithography (STL) format; subsequently, the files were “sliced” using CURA software, which produced the G-code that was fed to the 3D printer.

The experimental characterization was carried out with a THz-TDS spectrometer in transmission configuration. The schematic of the experimental setup is illustrated in Fig. 5. In order to couple the THz beam into the two input ports, broadband THz pulses covering the band from about 50 GHz to about 1.2 THz were coupled to a 3D printed waveguide beam splitter (BS); this splitter divides the radiation intensity into two waveguides symmetrically. Between the beam splitter and the devices, we left a gap ${\sim}\lambda$, which we used to place a metallic sheet in order to block input 1 and input 2 or both so that we can test the logic input combinations. For combinations where just one input is on, we used an $x{-}y$ translational platform to move the metal sheet to the right or left in order to block one input and let the other one open. Finally, to perform the operation when both inputs are off, we moved the metallic sheet sufficiently to have input 1 and input 2 completely blocked.

Since the spectrometer provides electric amplitude measurements in arbitrary units from now on, for clarity and simplicity, we will refer to the amplitude in arbitrary units such that 1 corresponds to the amplitude of the output of the OR gate in the on–on state, and we will now call these normalized amplitudes. For logical purposes, we consider the amplitudes equal or greater than 0.5 as “on” and below 0.5 as “off,” where “on–off” indicate coupled/not-coupled radiation through the corresponding output waveguide. Figure 6 shows the amplitudes of the outputs for all of the input combinations in the three logic gates, as measured from the numerical calculations [panels (a)–(c)] and the experiment [panels (d)–(f)]. Each color in the graph represents an input combination of the logic gate devices. The horizontal dashed line is provided as a guide-to-the-eye of the amplitude threshold that defines an output “on” for values above and “off” for values below this line, as well as a blue vertical continuous line that indicates the position of 130 GHz, which is the design operation frequency.

It is worth mentioning that the theoretical curves are qualitatively similar to the experimental ones, yet some differences can be seen, in particular, in the form of frequency shifts or other differences in spectral behavior. The differences can be explained by a combination of three basic reasons. First, the theoretical curves assume a flat input spectrum, which is not the case for the real spectrometer, which has a characteristic spectral response. Second, the coupling efficiency into the waveguides is also wavelength dependent. Third, the rugosity of the 3D printed devices is added to the uncertainty in the printing dimensions (topically ${\sim}400 \; \unicode{x00B5}{\rm m}$), which affects their performance.

As seen in Fig. 6(a), the amplitudes of the OR gate for the on–on, on–off, and off–on input states, which are expected to produce an on-output state that is above 0.8, which is indeed an on-logic state according to the definitions given earlier. The experimental characterization of the AND gate is shown in Fig. 6(e), where the only input combination that produces an on-output state is the on–on input combination. The two on–off and off–on input states generate an output amplitude of ${\sim} 0.4$, which is an off-logic state, and the off–off input state produces an off-output state as expected. Finally, in Fig. 6(f), the results for the XOR gate are shown. The on–off and off–on input states both produce an output amplitude above 0.9, which is a clear on-logic state, while the on–on and off–off input combinations produce output amplitudes below 0.2, which in turn are clear off-logic states.

## 4. DISCUSSION AND CONCLUSIONS

We introduced three different photonic waveguide geometries designed to perform the OR, AND, and XOR logic operations at 130 GHz. It is worth mentioning that the XOR gate can be used as a NOT gate too when one of the arms is kept in the on state. The geometries were optimized by numerical simulations, fabricated by 3D printing and tested using THz-TDS. All three devices perform the logic operations successfully, and the OR and XOR gates show excellent contrast between the on- and off-output states in the correct input combinations. However, there is still room for improvement of the AND gate, which presents an output amplitude of 0.4 for the on–off and off–on input states; this relative amplitude value is below the threshold for an off-logic state as defined here, yet, a lower value would be desirable. Therefore, further improvement of that geometry should be explored in the future.

The geometries presented here have several advantages over other realizations of logic gates for frequencies in the THz band. First, they are easily rescalable for operation at higher or lower frequencies. Second, they are easy to mass produce by mold fabrication since they are made of plastic. Third, their cost of fabrication is extremely low in comparison to semiconductor-based devices. Fourth, their use for the production of large photonic circuit prototypes is very easy, since they can be integrated by 3D printing into complex geometries without requiring any additional fabrication technologies.

In conclusion, we think that these devices, or variations around them, could become the building blocks of digital communication systems for THz frequencies, or at least part of them, as well as other complex photonic circuitry for operation at THz frequencies.

## Funding

Alexander von Humboldt-Stiftung; Consejo Nacional de Ciencia y Tecnología (294440).

## Disclosures

The authors declare no conflicts of interest.

## REFERENCES

**1. **M. Jinno, H. Takara, Y. Sone, K. Yonenaga, and A. Hirano, “Multiflow optical transponder for efficient multilayer optical networking,” IEEE Commun. Mag. **50**(5), 56–65 (2012). [CrossRef]

**2. **A. E. Willner, “All-optical signal processing techniques for flexible networks,” in *Optical Fiber Communications Conference and Exposition (OFC)* (2018), pp. 1–47.

**3. **R. M. Younis, N. F. F. Areed, and S. S. A. Obayya, “Fully integrated AND and OR optical logic gates,” IEEE Photon. Technol. Lett. **26**, 1900–1903 (2014). [CrossRef]

**4. **Z. Li, Z. Chen, and B. Li, “Optical pulse controlled all-optical logic gates in SiGe/Si multimode interference,” Opt. Express **13**, 1033–1038 (2005). [CrossRef]

**5. **T. A. Ibrahim, K. Amarnath, L. C. Kuo, R. Grover, V. Van, and P.-T. Ho, “Photonic logic NOR gate based on two symmetric microring resonators,” Opt. Lett. **29**, 2779–2781 (2004). [CrossRef]

**6. **B. Zhang, W. Chen, Y. Wu, K. Ding, and R. Li, “Review of 3D printed millimeter-wave and terahertz passive devices,” Int. J. Antennas Propag. **2017**, 1–10 (2017). [CrossRef]

**7. **M. Weidenbach, D. Jahn, A. Rehn, S. F. Busch, F. Beltrán-Mejía, J. C. Balzer, and M. Koch, “3D printed dielectric rectangular waveguides, splitters and couplers for 120 GHz,” Opt. Express **24**, 28968–28976 (2016). [CrossRef]

**8. **I. F. Akyildiz, J. M. Jornet, and C. Han, “Teranets: ultra-broadband communication networks in the terahertz band,” IEEE Wireless Commun. **21**, 130–135 (2014). [CrossRef]

**9. **H. J. Tang, W. Hong, G. Q. Yang, and J. X. Chen, “Silicon based THz antenna and filter with mems process,” in *International Workshop on Antenna Technology (iWAT)* (2011), pp. 148–151.

**10. **H. Elayan, O. Amin, R. M. Shubair, and M. Alouini, “Terahertz communication: the opportunities of wireless technology beyond 5G,” in *International Conference on Advanced Communication Technologies and Networking (CommNet)* (2018), pp. 1–5.

**11. **I. F. Akyildiz, J. M. Jornet, and C. Han, “Terahertz band: next frontier for wireless communications,” Phys. Commun. **12**, 16–32 (2014). [CrossRef]

**12. **Z. Chen, X. Ma, B. Zhang, Y. Zhang, Z. Niu, N. Kuang, W. Chen, L. Li, and S. Li, “A survey on terahertz communications,” China Commun. **16**, 1–35 (2019). [CrossRef]

**13. **D. Pan, H. Wei, and H. Xu, “Optical interferometric logic gates based on metal slot waveguide network realizing whole fundamental logic operations,” Opt. Express **21**, 9556–9562 (2013). [CrossRef]

**14. **P. Sharma and V. D. Kumar, “All optical logic gates using hybrid metal insulator metal plasmonic waveguide,” IEEE Photon. Technol. Lett. **30**, 959–962 (2018). [CrossRef]

**15. **M. Moradi, M. Danaie, and A. A. Orouji, “Design of all-optical XOR and XNOR logic gates based on Fano resonance in plasmonic ring resonators,” Opt. Quantum Electron. **51**, 154 (2019). [CrossRef]

**16. **L. He, W. X. Zhang, and X. D. Zhang, “Topological all-optical logic gates based on two-dimensional photonic crystals,” Opt. Express **27**, 25841–25859 (2019). [CrossRef]

**17. **Y. Liu, F. Qin, Z.-M. Meng, F. Zhou, Q.-H. Mao, and Z.-Y. Li, “All-optical logic gates based on two-dimensional low-refractive-index nonlinear photonic crystal slabs,” Opt. Express **19**, 1945–1953 (2011). [CrossRef]

**18. **R. Ge, B. Yan, J. Xie, E. Liu, W. Tan, and J. Liu, “Logic gates based on edge states in gyromagnetic photonic crystal,” J. Magn. Magn. Mater. **500**, 166367 (2020). [CrossRef]

**19. **W. Su and Z. Geng, “Terahertz all-optical logic gates based on a graphene nanoribbon rectangular ring resonator,” IEEE Photon. J. **10**, 1–8 (2018). [CrossRef]

**20. **A. A. F. Aguiar, D. M. D. C. Neves, and J. A. B. R. Silva, “All-optical logic gates devices based on SPP coupling between graphene sheets,” J. Microw. Optoelectron. Electromag. Appl. **17**, 208–216 (2018). [CrossRef]

**21. **Z. Li, Y. Liu, S. Zhang, H. Ju, H. de Waardt, G. D. Khoe, H. J. S. Dorren, and D. Lenstra, “All-optical logic gates using semiconductor optical amplifier assisted by optical filter,” Electron. Lett. **41**, 1397–1399 (2005). [CrossRef]

**22. **G. Berrettini, A. Simi, A. Malacarne, A. Bogoni, and L. Poti, “Ultrafast integrable and reconfigurable XNOR, AND, NOR, and NOT photonic logic gate,” IEEE Photon. Technol. Lett. **18**, 917–919 (2006). [CrossRef]

**23. **M. Manjappa, P. Pitchappa, N. Singh, N. Wang, N. Zheludev, C. Lee, and R. Singh, “Reconfigurable MEMS Fano metasurfaces with multiple-input-output states for logic operations at terahertz frequencies,” Nat. Commun. **9**, 4056 (2018). [CrossRef]

**24. **A. Melloni, P. Monguzzi, R. Costa, and M. Martinelli, “Design of curved waveguides: the matched bend,” J. Opt. Soc. Am. A **20**, 130–137 (2003). [CrossRef]

**25. **R. Ghayour, M. T. Fathi, and A. Naseri Taheri, “Analysis and design of simple low-loss wide-angle waveguide bends,” Opt. Laser Technol. **40**, 697–702 (2008). [CrossRef]

**26. **J. Sun and F. Hu, “Three-dimensional printing technologies for terahertz applications: a review,” Int. J. RF Microw. Comput.-Aided Eng. **30**, e21983 (2020). [CrossRef]

**27. **E. Castro-Camus, M. Koch, and A. I. Hernandez-Serrano, “Additive manufacture of photonic components for the terahertz band,” J. Appl. Phys. **127**, 210901 (2020). [CrossRef]