Exploiting Petri Nets for Graphical Modelling of Electromagnetic Pulse Switching Operations

Most of the current computing technology relies on semiconductor-based devices to perform fundamental switching/routing processes, however, recent advances in the ﬁeld of optical computing have demonstrated that interconnected waveguides (in a series and/or parallel conﬁguration) can enable high-speed switching and routing of transverse electromagnetic (TEM) square pulses, creating new paradigms for alternative solutions in computing. In this work, a new approach for the modelling of TEM square pulse switching and routing in interconnected waveguides is proposed by unleashing the potential of Petri-Nets (PNs). PNs are a highly regarded graphical modelling technique used in multiple scenarios ranging from industrial engineering, electronic circuits and even in chemical engineering for the study of chemical reactions. The fundamental principles of PNs along with their potential to graphically represent systems of equations are presented. These features are then exploited to represent the interaction of TEM square pulses in waveguide junctions using three or four interconnected waveguides (series and parallel conﬁgurations). This work represents a fundamental step toward allowing experts from multiple ﬁelds (such as computer science, electronics, and photonics) to contribute to the design of future computing systems by exploiting PNs in the design of electromagnetic wave-based computing systems.


Introduction
For decades, advances in the field of computing have been developed considering Moore's law, which estimates that the number of transistors on a computer chip will double every DOI: 10.1002/adts.202100429 two years. [1] As computing processes have become more complex, the number of individual elements forming computing systems has increased. This has inspired the scientific and industrial community to invest in the design and manufacturing of smaller computing processors containing a greater density of semiconductor-based elements (such as transistors). [2] The development of semiconductor elements has been key for computing systems to evolve to the performance we expect today, [3] a remarkable example in this context is the metal-oxide semiconductor field effect transistor (MOS-FET), with billions of them being utilized by leading silicon technologies today. [4,5] However, the continuous reduction in size of transistor dimensions is giving rise to fundamental obstacles such as challenges with energy dissipation/consumption, spatial interconnectivity, and even quantum tunneling effects. [6] Moreover, intrinsic parasitic capacitances in transistors can cause delays when performing switching processes. [7] This has prompted interest in a post Moore's law era where improvements in computing performance could come from improved software or reimagining of computing fundamentals. [8] In this context, photonic devices for electromagnetic (EM) wave-based computing have demonstrated themselves as great candidates to reimagine computing architectures. [9][10][11] In the future, photonic computers could leverage light-matter interactions to perform computing tasks, thereby removing dependence on charge-based devices. [12,13] In doing so, we would be dramatically enhancing the theoretical potential of processing speeds by removing vast energy requirements, and in turn, avoiding intrinsic delays involved in charging/discharging of semiconductor-based devices. [13] In recent years, EM wave-based computing has been revolutionized by the emergence of metamaterials, [14] allowing for unprecedented manipulation of fields and waves both in space and time. [15][16][17][18][19][20][21] Metamaterials have been used in multiple fields [22] such as lensing with super-resolution, [23] sensors, [24,25] and invisibility cloaking devices, [16,20,26] to name a few. They have also been demonstrated to solve mathematical operations and perform analogue computing. [9,27,28] In a recent work, we have also proposed solutions for highspeed transverse electromagnetic (TEM) pulse switching, [29] as switching processes are the fundamental pillar of computing. TEM pulse switching can be achieved by interconnecting waveguides [30] to form junctions such that incident TEM pulses can split/recombine after passing the connection point, enabling the creation of interference patterns which can be calculated using wave superposition (similar as the Huygens's principle of wave propagation [31] and Transmission Line Matrix, TLM [32,33] ). Interestingly, these works [29,30] demonstrated how perfect splitting of the incident signal can be achieved when the transversal cross section of the waveguides is very small compared to the wavelength of the incident signal, showing how the wavefront shape is preserved after passing the crossing region between waveguides. However, one may ask, is it possible to cascade such TEM pulse switches, thus closing the gap between fundamental switching processes and complex computations? In the context of waveguide junctions with TEM pulses, [29] research into the geometries required for performing Boolean tasks is under development and more research is needed to efficiently design them. The design of future complex devices using cascading switching elements may require complex modelling techniques. EM wavebased devices and systems can be modelled using computational electromagnetics methods for full-wave simulations such as Finite Difference Time Domain (FDTD). [34,35] Simulations are an important tool for designing photonic components, as well as to understand the physical phenomena governing them. [36] However, modelling full systems can require a heavy computational burden, [35,36] hence it is necessary to have simple and less computationally intensive models that can easily, and potentially visually, describe/simulate EM wave-based devices and systems. Waveguide junction geometries, such as those reported in, [29] present input-output relationships which can be mathematically predicted without the need of full wave numerical simulation. [37] In this context, graphical modelling may offer a faster and more accessible way to represent these systems.
One of the most successful graphical modelling technique was devised by Carl Adam Petri, known as Petri-Nets (PNs). [38] As a generalized modelling system which is based on Boolean logic, [39] PNs rely on the user and designer of each model having a shared understanding of the context for each element, hence it is a simple but highly general solution to modelling processes. [40] PNs have become a powerful tool in multiple scenarios, such as in chemistry to describe chemical reactions, [41,42] designing asynchronous circuits, [43,44] and in software design, [45] among other applications, thus demonstrating their strength in representing concurrent processes. [46] Inspired by the importance of switching devices for EM pulse-based computing, and the need to develop alternative, accessible, and efficient models to design them, in this work we explore a new approach to modelling EM switching structures by unleashing the potential of PNs. We begin by exploring PN representations of single 2D parallel plate waveguides, and subsequently present a general formulation of our modelling technique showing how equations, and then matrices, can be visually represented using PNs. These graphical representations are then extended to multiple interconnected junctions, namely three and four port waveguides both in series and parallel configurations. An in-depth description of the equivalent PN for each scenario is presented, showing how PNs can be a powerful tool for representing EM pulse switching processes in interconnected waveguides. In building a visual model for these waveguidebased structures, we also explore how expected characteristics, such as reciprocity, are intrinsically represented as part of the PN structure. We envision that PNs could represent a critical bridge for the future of computing with waves by allowing experts from multiple fields (such as computer science, electronics and photonics) to contribute to the design of future computing systems.

PNs: Basic Considerations
As briefly discussed in the introduction, PNs are a method for graphically modelling discreet event dynamic systems. [38] In practice, a PN is made up of four elements: places, tokens, transitions (t) and arcs. A schematic representation of the principles of operation of PNs is shown in Figure 1a. As observed in this figure, tokens (represented by black filled circles) may occupy places (represented as unfilled circles). Places with tokens within them are considered occupied, hence allowing connected transitions (represented as boxes) to be fired. This process occurs when all places feeding into a transition contain tokens. This movement of tokens inside a PN can be further explained by considering the simple scenario depicted in Figure 1a. As observed in the top panel, the token occupies an input place. This input place is connected to an output place via an intermediate transition (square) and two arcs (arrows). As it shown, there is only one arc connecting the input place and the transition, hence, as there is a token already occupying the input place, the conditions to fire the transitions are satisfied and then the token moves through the PN (middle panel from Figure 1a) until it reaches the output place (bottom panel from Figure 1a). Importantly, note that here a token reaches a single output place as there is only one place connected with the transition. However, as will be shown and further discussed later in this manuscript, transitions can be connected to multiple output places, and tokens being fired by such transitions can be distributed to all output places that the transition feeds into. Moreover, it is important to highlight that, it is not required for tokens to be conserved; hence transitions may distribute more tokens than they consume when fired. This will have interesting implications when exploiting PNs for the modelling of equations and EM switching processes in the following sections.
In the example shown in Figure 1a, we have considered a single token traveling from an input to an output place via a transition and arcs. Note that the commonly used semantic of PNs consider the firing process of removing/adding tokens from/to an input/output place as being an instantaneous action. However, in this paper we use an alternative interpretation where tokens "travel" within the PN, a feature that will allow us to link the PNs with "traveling" square pulses propagating within interconnected waveguides. An interesting feature of PNs, however, is the fact that arcs connecting different PN elements can be assigned a characteristic weight (w) which describes the number of tokens being transported by the arc. For example, if an input place feeds into a transition via an arc with a weight of w = 2, the transition will be fired if, and only if, there are two tokens present at the input place. Finally, it is important to mention that the use of an arc to connect two places or two transitions is not permitted. This is because such configurations would not allow for any transitions to fire. [47] In the following sections, we will exploit all these features of PNs with the final aim of using them to represent TEM pulses inside waveguide junctions. It will be shown how different characteristics are represented in the PN, such as the introduction of fractional weights, fractional tokens, and two categories of places for positive/negative polarity tokens.

PN Description of a Two-Port Waveguide
Without loss of generality, in all cases here, we assume waveguides constructed using a perfect electric conductor (PEC) with small transversal cross-sections to account for unchanged wavefronts after the incident signals pass the crossing region between waveguides. [29,30] The schematic representations of such junctions are shown in the left and right panels of Figure 1b where Ninterconnected waveguides are considered either in series or parallel configuration, respectively. [37] (Transmission Line, TL, representations).
As shown in Figure 1b, TEM square pulses are used as excitation signals from multiple ports having a positive (+) or negative (−) polarity. The details to define the polarity was presented in, [29] but we briefly discuss them here for completeness. For both junction types in Figure 1b we draw arrows starting at zero toward non-zero voltage. In the case of the series junction (left of Figure 1b), the rotation of these arrows in the clockwise/anticlockwise direction allows us to map the TEM pulses as having a positive/negative polarity, respectively. On the other hand, in the parallel configuration (right panel of Figure 1b) arrows directed from the bottom/top metal toward the top/bottom metals are mapped as TEM pulses with a positive/negative polarity, respectively.
Before using PNs to describe such junctions, let us first implement PNs to represent a simple two-port scenario using a 2D parallel plate waveguide (see top panel from Figure 1c) with port 1 and 2 being the input or output ports, respectively. In constructing a PN to represent this scenario, we must be able to translate all the characteristics of the propagating TEM pulse inside such 2D waveguide into a graph. The equivalent PN for a two-port 2D waveguide is shown at the bottom of Figure 1c. As it can be seen in this figure, there are four places on the left-hand-side of the PN: two for port 1 and two for port 2, meaning that a TEM pulse can be applied either from port 1 or port 2, respectively. The top and bottom places for each port are www.advancedsciencenews.com www.advtheorysimul.com used to represent the positive (+) or negative (−) polarities of the incident TEM pulse, respectively. A similar approach is then applied to the right-hand-side of the PN where again four places are included (two per output port), with the top and bottom places of each port representing a positive (+) or negative (−) polarity of the output TEM pulse, respectively. Note that each of the places representing the input states (left places in Figure 1c) are connected to a transition (squares) which, when fired, will distribute tokens to the output places that represent the state of the system after the TEM pulse has propagated along the waveguide.
As examples, let us consider the scenarios shown in Figure 1c,d where an input TEM pulse having a positive (+) or (−) polarity is applied from port 1, respectively. The equivalent PN of this initial state is shown at the bottom of Figure 1c,d. As observed, the top (red) and bottom (blue) places for port 1 have a token within them, meaning that the incident TEM pulse is at the left-hand-side of the waveguide and has a positive (+) or a negative (−) polarity, respectively. Now, as the occupied places are connected to a single transition via an arc, such transition will be fired and will move the tokens through the diagonal arcs toward the places on the right-hand-side of the PN (see the red and blue diagonal arrows representing these arcs in Figure 1c,d, respectively). This movement of tokens will then represent the propagation of the TEM pulse inside the 2D waveguide. In this context, the final state when a TEM pulse has reached port 2 can be represented by tokens that appear within the places on the righthand-side of the PN. This can be verified in Figure 1f,g where this final state is schematically represented in the 2D waveguide and the corresponding PN model. Importantly, note how the positive (+) and negative (−) polarities of the incident TEM pulses are preserved in both waveguides from Figure 1c,d and also in the PN models, as expected, due to the fact that TEM pulses travel inside a single waveguide. However, as it will be shown later in this manuscript, transition between positive (+) and negative (−) pulses will be considered when connecting multiple waveguides to form junctions, as shown in Figure 1b. For completeness, we can further expand our PN model by considering that the excitations are applied in the opposite direction, i.e., from port 2 toward port 1. An example of such scenario is shown in Figure 1e,h considering an incident TEM square pulse from port 2 having positive (+) polarity, demonstrating how it is possible to model TEM pulses traveling in simple 2D waveguides.

Graphical Representation of Linear Equations via PNs
As it is known, and as it will be further discussed in the following sections, wave-propagation in TLs can be modelled via scattering matrices allowing us to calculate its transmission/reflection characteristics. As such scattering matrices represent a system of equations, one may ask, would it be possible to represent such matrices using PNs? It has been shown that PNs can be written as matrices, and the dynamic movement of tokens inside a PN can allow users to visually analyze any changes in the matrix. [48] However, could we exploit PNs to represent linear equations? In this section we address this question demonstrating how, indeed, PNs can be applied as a graphical representation of equations as an important step toward unleashing the potential of PNs for the representation of TEM pulses propagating within N-waveguide junctions.
Let us first consider the equation shown in Figure 2a using a simple two variable equation. In all cases presented in this section we will assume that each token represents an integer contribution of 1. By looking at the PN model from Figure 2a, conversely to the PNs discussed in Figure 1, a weight for each arc has now been included, namely w 1 and w 2 . These weights will then correspond to the coefficients accompanying the x and y variables in the equation, respectively, i.e., w 1 x = w 2 y. Finally, the number of tokens in each place (left-hand-side of the PN) will represent the value of its corresponding variable (x, y). An example of such simple two variable equation is represented by the PN from Figure 2d where both arcs have a weight of one (w 1 = w 2 = 1), i.e., the PN in Figure 2d represents x = y. Hence, if a token is inserted on the place at the left-hand-side of the PN, it will fire the transition (t 1 , square) and the token will be moved toward the place on the right-hand-side.
We can further extend the number of variables and consider, for instance, a three-variable equation, as the one shown on top of Figure 2b, namely w 1 x + w 2 y + w 3 z = A. As it is observed in the same figure, the equivalent PN has three places on the left-handside, each of them representing x, y, and z variables, respectively. Interestingly, note how each of these places can be used to apply tokens to the PN which will then contribute to the single rightmost place, mapped as the answer A in the equation. Now, we have shown in Figure 1 how TEM pulses in 2D waveguides as TLs can have either a positive (+) or a negative (−) polarity. Hence, as we want to exploit PNs in multiple waveguide junctions, it is desirable to have the possibility to represent both positive (+) or a negative (−) tokens or results in the PN model for equations. For example, considering the equation presented in Figure 2b one can observe that if w 1 and w 2 are equal to zero (w 1 = w 2 = 0) A will be negative (A < 0) if w 3 < 0. However, the PN in Figure 2b can only account for positive values of A. Is there a way to improve such PN and be able to represent equations having both positive (+) and negative (−) values for their variables?
To achieve this, we can modify the PN such that negative contributions to the answer A can be allowed. Such modified PN is shown in Figure 2e where we have considered weights of: w 1 = 2, w 2 = 3, w 3 = 2. As observed, all the weights are positive, however, intermediate places representing either a set of positive (A+) or negative (A−) tokens are inserted in the PN to account for both types of values. In this scenario, the final answer for A will be simply the superposition of the tokens in the A+ and A− places representing tokens with positive or negative values, respectively. To avoid such a "manual" superposition of tokens, one could implement an extra transition (not shown here) connected to both A+ and A− places with arcs of equal (w = 1). This extra transition would allow the removal of one token from both positive (A+) and negative (A−) places each time it is fired. This process would continue until there are no more tokens left in one of the two positive (A+) and negative (A−) places (a condition that will not fulfil the requirement to fire the transition). Then, the resulting number of tokens will correspond to the answer A which will be either (+) or (−) depending on the number of tokens remaining in (A+) or (A−), respectively. Finally, we have shown in Figure 2a,b,d,e how PNs can be used to represent variables as a means of representing linear equations. Moreover, we have discussed in Figure 1 how PNs can also be used to represent the propagation of TEM pulses traveling inside 2D waveguides in the forward and backward direction (from port 1 toward port 2 and vice-versa, respectively). Based on this, one may ask: would it be possible to exploit PNs for the representation of equations in the backward direction?, i.e., would it be possible to start with an answer A and then define a PN such that the needed number of tokens are distributed toward some already defined places corresponding to the variables x, y, and z? The answer to this question can be found in Figure 2c, where a reversed PN model from the equation described by Figure 2b,e is presented. As in Figure 2c, the equation to be represented in a backward configuration is 2x + 3y − 2z = 8 (with w 1 = 2, w 2 = 3, w 3 = 2). Note that the arc weights have remained unchanged, but the arcs have been reversed such that tokens will be deposited in the places corresponding to the variables x, y, and z (left-hand-side places of the PN), at the end of the whole process. However, it is interesting to note that, to account for the negative values needed for the term −2z, such cases are treated as adding tokens to the answer place A. This is because one token is withdrawn to fire the transition t 3 connected to the z variable place, and in turn, 3 tokens (w 3 = 3) are re-deposited in place A, with one token being distributed to the z place (left-hand side of the PN). In this way, the overall transition t 3 will be adding two tokens to the answer place A and add 1 token to the z place each time it is fired. As in the previous examples, the result of the PN presented in Figure 2c Figure S1 of the Supporting Information. Note that, other positive integer solutions can be found by trial and error using this PN topology from Figure 2c, as the solution represented is dependent on the order in which the transitions are fired.
Here we have discussed how equations can be graphically represented using PNs and considered ideas in using PNs to represent solutions to equations. In the following section we exploit PNs and their ability to represent equations for the modelling of three-port and four-port waveguide junctions.

Modelling Three-Port Waveguide Junctions with PNs
As discussed in the introduction, interconnected waveguides have been recently proposed in different scenarios such as to control solitons propagation for logic gates [49] and also to perfectly split incoming surface plasmons polaritons using plasmonic networks. [30] Superposition and scattering of pulses inside such structures allow the routing of information from one waveguide port to another without the need of semiconductor technologies. [50] We have recently exploited a similar approach to achieve high-speed switching of TEM square pulses as a mechanism to unleash their potential in future computing applications. [29] In this section, we will demonstrate how PNs can be used to represent propagation, scattering, and superposition of TEM pulses in such configurations. Hence, we exploit the visual representation established in previous sections to describe more complex outputs.
First, let us consider the three-port waveguide junction shown in Figure 3. TEM pulses propagate into the crossing point of the junction where they encounter a change in impedance (due to the multiple waveguides connected to that point), the transmission and reflection of pulses can be studied using widely known TL techniques. [37] In [29] we have shown a detailed explanation of such method but we summarize it here for completeness. When considering a series configuration (see Figure 3), a pulse being applied from a waveguide with impedance Z 1 will observe a change of impedance equivalent to the sum of the impedances of the other waveguides connected at the crossing point Z i = Z 2 + Z 3 + ⋯ + Z N . Therefore, if all TLs are assumed to have equal impedance then: Z i = (N − 1)Z i with the reflection ( ) and a total transmission ( t ) coefficients calculated as follows, respectively [29] : where scattering matrix A = I − J in the series junction is shown in Figure 3, I and J are identity and all-ones matrices, respectively. Note that the diagonal and non-diagonal terms in Equation (2b) (considering a series crossing configuration with three waveguides) represent the reflection coefficient (defined in Equation (1a)) and the transmission coefficient (Equation (1b)), respectively. Finally, the transmission coefficient for each waveguide (again considering that all the waveguides have the same impedance is = t ∕(N − 1) = 2N −1 . Based on Equation (2b) we can describe how incoming TEM pulses will be transferred or redirected across the multiple waveguides present in the system. Interestingly, note that, as described in Equation (2b), the propagation characteristics of the interconnected waveguide junction in series is represented as a matrix. Therefore, considering the discussion in the previous section on representing equations using PNs, one may ask if it would be possible to use PNs to graphically represent the scattering matrix given in Equation (2b). If this is possible, we would potentially describe the performance of waveguide junctions in a simple manner using graphical methods, opening new opportunities for researchers from multiple fields to easily predict the performance of such switching elements and apply them in further and more complex computing processes.
To study this, consider again the three-port series waveguide junction from Figure 3a where a TEM square pulse is applied from port p 1 (left port). The equivalent PN representation is shown in Figure 3b. As observed, the incident pulse has a positive polarity, and this pulse is represented via a token within a PN in Figure 3b. In this scenario, the incident TEM pulses from each port are represented following the same setup as the example discussed in Section 3 with two places assigned per port (each place representing a positive or a negative polarity of the incident TEM pulse). Each set of places in the PN is labelled with its corresponding port, hence, a positive TEM pulse propagating from port p 1 (left port in Figure 3a) is represented by a token in the positive place of port p 1 of Figure 3b (top place for port p 1 ).
After the TEM pulse propagates and reaches the crossing point, it will scatter producing outgoing pulses traveling toward ports p 1 -p 3 with polarities depending on the scattering matrix defined in Equation (2b). As an example, we provide in Figure 3c a schematic representation of the scattered pulses produced by the incident pulse in Figure 3a Figure 3b, resulting in the distribution of tokens shown in Figure 3d. In this case, it is important to note that tokens in PNs may only be distributed in integer values, [40] hence we must develop a new token rule which allows for tokens to represent fractional outcomes.
In the three-port crossing case, we observe that all contributions to output places after scattering are multiples of 1/3 (i.e., some contributions are 1/3 and others are 2/3, see Equation (2b)). Therefore, we should define the value of each token being read from output places so that they can represent fractions. This can be achieved by defining all tokens scattered by transitions as representing a value of 1/3 (relative to input tokens which enable the transition to fire). Hence, in output port p 1 of Figure 3d we use a single token in the positive place to represent a scattered pulse of amplitude 1/3 as shown in the schematic of Figure 3c.
In order to represent output vectors of −2/3 from ports p 2 and p 3 (as shown in Figure 3c), two tokens are distributed (to negative places of port p 2 and p 3 ) using arc weights. The difference in arc weight is denoted with green and black arrows, as shown in Figure 3d, corresponding to arc weights representing values of 2/3 (two tokens) and 1/3 (one token), respectively. As a result, two tokens are observed in Figure 3d for both ports p 2 and p 3 located in the negative places, meaning that we have successfully represented TEM pulses of amplitudes of −2/3 to these ports. These results demonstrate how it is possible to extend our representation of TLs using PNs to account for fractional pulse amplitudes and scattering with unequal contributions to each port.

Four-Port Waveguide and Reciprocity
In the previous section we have shown how our PN representation can be used in three-port series waveguide junctions. For completeness, in this section we apply the same topology to the four-port series case, a configuration that we call Catt junction. [29] As this a symmetrical configuration, recent works have shown how these junctions can be used with TEM pulses to achieve perfect beam splitting, [29,30] with great potential to enable high speed optical switching.
Here, as in the previous section, Equations (1a), (1b) are used to find the reflection and transmission coefficients, respectively, for series junctions now considering N = 4 (four-port case). In accordance with Equation (2a), the scattering matrix of a fourport series waveguide junction can be defined as follows: The matrix from Equation (3) can be used to construct PNs representing four-port waveguide junctions. This PN is shown in Figure 4. We begin by observing an incoming positive pulse from port p 1 traveling toward the crossing of the four-port series junction, see Figure 4a for the TL representation. For the sake of completeness, we provide the numerical results (calculated using the transient solver of the commercial software CST Studio Suite®) in Figure 4b where a snapshot of the out-of-plane magnetic field (H y ) distribution is shown (full details about the setup used in the simulations can be found in the methods section). The results shown in Figure 4b are calculated at a time t = 1.5 ns (before the incident pulse reaches the crossing point). The equivalent PN of the four-port series junction at this initial state is presented in Figure 4e showing a token placed in the positive place for port p 1 (red circle in Figure 4e). After passing the crossing region, the incident TEM square pulse will generate four pulses, one traveling toward each port, as discussed in the previous sections. The expected result of this scattering (using Equation (3)) is schematically shown in Figure 4c along with the numerical results of H y in Figure 4d (calculated at a time t = 2.5 ns, after the incident pulse has passed the crossing region). After running the PN shown in Figure 4e, the resulting PN is the one presented in Figure 4f, showing an excellent agreement with the scattering matrix model from Equation (3) (presented as a schematic in Figure 4c) and with the numerical simulations in Figure 4d. Indeed, according to Equations (2)-(3), for a series junction with N = 4, input and output vectors are x = [1,0,0,0] and y = [+1/2, −1/2, −1/2, −1/2], respectively. This is corroborated in Figure 4d where it can be seen how a TEM square pulse is excited and propagates toward each port. Such scattering process is also observed in the PN from Figure 4f where one token is distributed to each output port. In this context, as in the previous section, each token in an output place (after scattering) is defined to have a value of 1/2 in order to represent fractional scattered pulse amplitudes. In this case, output tokens shown in Figure 4e are read as +1/2, −1/2, −1/2, −1/2 for ports p 1 to p 4 as stated previously. It is important to note that, unlike the three-port case, there is no need for varying arc weights in the four-port PN due to all elements in the scattering matrix being of equal value (1/2), therefore all token contributions to output places are equally weighted.
Interestingly, note that the arcs in the four-port junction PN form a topology which is symmetrical with respect to the vertical axis. Hence, it could be expected that reversing the direction of each arc in the PN would completely reverse the scattering process, i.e., a reciprocal performance. To explore this, let us study how the intrinsic reciprocity characteristics [51] in the fourport waveguide junctions can be graphically represented using PNs. An example of this performance is shown in Figure 5a,b,e where the four-port waveguide junction is excited using four incoming TEM square pulses (one per port p 1 -p 4 ). In this case, the polarity of the incident pulses are chosen to be the same as the output pulses produced by the scattering of a single incident square pulse from Figure 4c,d,f. For completeness, a snapshot of the H y field distribution and the equivalent PN representation of this state is shown in Figure 5b,e, respectively. Now, to fulfil reciprocity, [51] we would expect to obtain a single TEM square pulse traveling toward p 1 after all the incident pulses have passed the crossing region, i.e., we should be able to reconstruct the pulse shown in Figure 4a,b. The schematic TL representation and numerical results of the H y field distribution at a time (t = 2.5 ns) Figure 5. a,b) Schematic TL and numerical simulation of H y field distribution (t = 1.5 ns) for TEM excitations [1/2, −1/2, −1/2, −1/2] from p 1 to p 4 , respectively. e) PN representing the initial condition from (a,b). c,d) schematic TL and numerical simulation of H y field distribution (t = 2.5 ns) after scattering has taken place demonstrating the reciprocal characteristic of the junction. f) PN representation of the reciprocal scattering showing agreement with numerical simulation from (d).
after the incident pulses have passed the crossing region are presented in Figure 5c,d, respectively, demonstrating how, indeed, the structure is reciprocal. After running the PN from Figure 5e, the final state of the PN is the one shown in Figure 5f, demonstrating an excellent agreement with the numerical simulations from Figure 5d.
As observed in Figure 5e,f, in this reciprocal case we use the same PN with identical arc directions and weights as those used in Figure 4, however the initial location of tokens in the net has been changed to represent conditions consistent with the numerical simulation Figure 5b. Incident square pulses propagate toward the crossing from all four ports of the junction in Figure 5a,b, hence, tokens are present in all input ports of the PN in Figure 5e. Consequently, when the PN is run, transitions will distribute tokens to output places, this is denoted using highlighted arcs in Figure 5f, where red and blue arcs show tokens distributed to positive and negative polarity output places, respectively. Highlighted arcs toward p 2 -p 4 show that two positive and two negative polarity output tokens are distributed to these ports meaning that tokens cancel each-other out. For this reason, no tokens are present in the output places for p 2 -p 4 after the PN has run, i.e., no TEM square pulses traveling toward these ports. In agreement with numerical results in Figure 5d, it can be seen in Figure 5f that p 1 is the only port that contains output tokens. However, we have redefined output tokens to have a value of 1/2 after forward scattering to enable representation of fractional outputs. Subsequently, this process has been repeated in the reciprocal scattering case by taking the outputs of Figure 4f and using them as inputs to the PN from Figure 5e. Thus, each output token now represents a value of 1/4 in Figure 5f. Based on this, four tokens, each representing 1/4, in Figure 5f are read as representing an identical value to the original incident pulse amplitude of 1 in Figure 4a,b,e, fulfilling reciprocity. It is important to note that we have considered nondispersive materials for the sake of simplicity. However, when working at higher frequencies such as optical frequencies with short temporal Gaussian pulses propagating in multiple cascading junctions, this assumption would require further design considerations as dispersion becomes an important factor. This is an important scenario that will be a subject of study in the future.

Conclusion
By exploiting Petri-nets, our approach represents a powerful visual technique to represent systems of equations, a feature that can be exploited to provide physical insight into the switching and routing of TEM square pulses within waveguide junctions. In the future, our technique may enable the implementation such a Petri-net based approach to describe more complex waveguide junctions (such as cascaded devices) and design Boolean logic operators. The graphical modelling method presented here may enable a rapid prototyping approach that could potentially be used www.advancedsciencenews.com www.advtheorysimul.com by researchers from multiple fields (photonics, plasmonics, electronics, among others), thus helping to usher in a new paradigm of computing architectures.

Experimental Section
CST Simulation: Numerical simulations in this paper were carried out using the transient solver of the commercial software CST Studio Suite. The interconnected waveguides were excited using "waveguide ports" at their entrance. The incident TEM square pulses were modelled using analytical square functions with a "rising time" of 0.05 ns along with a second derivative to smooth the sharp edges and to ensure accurate results. The pulses had a duration of 0.5 ns in their non-zero state. These TEM pulses used as the excitation signals were generated externally and imported to CST Studio Suite. In order to reduce simulation time, magnetic and electric symmetries were applied on the xz plane for the series and parallel waveguide junctions, respectively. All metal plates were simulated assuming perfect electric conductors (PEC) and having a zero thickness. Each of the waveguides have transversal dimensions w = d = 10 mm, and a length of 245 mm.

Supporting Information
Supporting Information is available from the Wiley Online Library or from the author.