Disclosure of Invention
Aiming at the problems in the prior art, the invention provides an all-optical logic exclusive-OR gate based on a gradient descent algorithm and an implementation method thereof.
One objective of the present invention is to provide an all-optical logic exclusive or gate based on a gradient descent algorithm.
The invention discloses an all-optical logic exclusive-OR gate based on a gradient descent algorithm, which comprises the following components: a first incident waveguide, a second incident waveguide, a light transmission device, and an exit waveguide; wherein the first and second incident waveguides are connected to the exit waveguide via the light transmission device, respectively; the light transmission device adopts two linear materials, the two-dimensional section of the light transmission device is divided into M multiplied by N periodically and closely arranged square basic units, M and N are both natural numbers which are more than or equal to 2, the phase difference pi of two paths of signal light at the port of the light transmission device, which is positioned at the exit waveguide, is obtained by calculation by utilizing a gradient descent algorithm and combining the linear superposition principle of light through changing the refractive index of each basic unit when the first incident waveguide and the second incident waveguide are both provided with signal light incidence, the refractive index of each basic unit is obtained by calculation, the refractive index value of each basic unit is dispersed into the refractive index values corresponding to two actual linear materials, and therefore the corresponding basic units adopt the linear materials corresponding to the calculated refractive index values; there are four cases of all-optical logic exclusive-or gates: when no signal light enters the first incident waveguide and the second incident waveguide, no signal light is output from the emergent waveguide; the signal light is incident from the first incident waveguide and no signal light is incident from the second incident waveguide, and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light; the signal light is incident from the second incident waveguide and no signal light is incident from the first incident waveguide, and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light; the signal light is simultaneously incident from the first incident waveguide and the second incident waveguide and transmitted to the light transmission device, and due to the linear superposition principle of the light, the phase difference pi of the two paths of signal light at the port of the light transmission device at the exit waveguide cancels the coherence, so that the light intensity is zero, no signal light is output from the exit waveguide, and the all-optical logic exclusive-or gate is realized.
The lower surface of the light transmission device is provided with a substrate layer, and the upper surface is an air layer. The substrate layer is made of one of silicon dioxide, titanium dioxide and quartz glass.
The two linear materials are two materials with the refractive index difference larger than 1.
The length and width of the two-dimensional size of the two-dimensional cross section of the light transmission device are 2-5 μm; the side length of each basic square unit is 40 nm-80 nm.
The invention also aims to provide a method for realizing the all-optical logic exclusive-or gate based on the gradient descent algorithm.
The invention discloses a method for realizing an all-optical logic exclusive-OR gate based on a gradient descent algorithm, which comprises the following steps of:
1) dividing the two-dimensional cross section of the light transmission device into M × N basic units of square with closely arranged period, wherein M and N are natural numbers not less than 2, and selecting two actual linear materials with refractive indexes N1And n2;
2) Setting an initial value of the refractive index of each basic cell to the same fixed value;
3) placing a first signal light source at the position of a first input waveguide, solving a Maxwell equation set by a Finite Difference Time Domain (FDTD) method, and calculating to obtain the electric field distribution of each basic unit in the optical transmission device;
4) placing a second signal light source at the position of a second input waveguide, solving Maxwell equations by an FDTD method, and calculating to obtain the electric field distribution of each basic unit in the optical transmission device, wherein the phase difference between the first signal light source and the second signal light source is pi;
5) placing an accompanying light source at the position of the emergent waveguide, solving Maxwell equation sets by an FDTD method, and calculating to obtain the electric field distribution of each basic unit in the optical transmission device;
6) solving the electric field distribution of the basic unit of the first signal light source and the electric field distribution of the basic unit of the accompanying light source, realizing that the electric field at the position of the emergent waveguide is zero when the first signal light source and the second signal light source are simultaneously incident on the all-optical logic exclusive-OR gate, the phase difference between the first signal light source and the second signal light source is pi, and the other parameters are the same, therefore, the opening of the all-optical logic exclusive-OR gate requires that the electric field is enlarged, the objective function is enlarged, and the gradient descent algorithm is utilized to obtain the first linear gradient G of each basic unit1(ii) a Solving the electric field distribution of the basic units of the second signal light source and the electric field distribution of the basic units of the accompanying light source, and obtaining a second linear gradient G of each basic unit by using a gradient descent algorithm2Will be the first linearityGradient G1And a second linear gradient G2Summing to obtain the final gradient G of each basic unit;
7) setting a bias factor beta, changing the refractive index of each basic unit along the final gradient direction, and controlling the speed and the magnitude of the change of the refractive index according to the bias factor, so that the discretization degree is controlled through the bias factor, and the calculation efficiency is improved; repeating the steps 3) -6) to obtain the current final gradient of each basic unit, and changing the refractive index of each basic unit under the control of the bias factor according to the current final gradient direction until the preset iteration times are finished to optimize the refractive index;
when the iteration times are reached, the refractive index of each basic unit is forced to approach the refractive index corresponding to the actual two linear materials;
8) obtaining the final refractive index of each basic unit, and discretizing the value of the final refractive index into the values n of the refractive indexes of the two linear materials1And n2;
9) The corresponding basic unit adopts two linear materials corresponding to the calculated refractive index value;
10) there are four cases of all-optical logic exclusive-or gates:
a) when no signal light enters the first incident waveguide and the second incident waveguide, no signal light is output from the emergent waveguide;
b) the signal light is incident from the first incident waveguide and no signal light is incident from the second incident waveguide, and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light;
c) the signal light is incident from the second incident waveguide and no signal light is incident from the first incident waveguide, and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light;
d) the signal light is simultaneously incident from the first incident waveguide and the second incident waveguide and transmitted to the light transmission device, and due to the linear superposition principle of the light, the phase difference pi of the two paths of signal light at the port of the light transmission device at the exit waveguide cancels the coherence, so that the light intensity is zero, and no signal light is output from the exit waveguide;
thereby realizing an all-optical logic exclusive-or gate.
Wherein, in step 1), the two-dimensional size of the two-dimensional cross section of the light transmission device is ML × NL, and the range is 2 μm to 5 μm; the side length of each basic square unit is L, and the range is 40 nm-80 nm.
In step 2), the initial value is the same fixed value, which is any positive real number.
In step 3), the first signal light source is a gaussian light source, and the central wavelength is a wavelength realized by the all-optical logic xor gate, usually in a communication band.
In step 4), the second signal light source is a gaussian light source, the central wavelength is a wavelength realized by the all-optical logic xor gate, and the phase of the second signal light source is different from the phase of the first signal light source by pi usually in a communication band.
In step 5), the companion light source is the same as the first signal light source.
In step 6), the gradient descent algorithm adopted comprises the following steps:
first linear gradient G is calculated1
i. Setting an objective function:
a function with an independent variable as an electric field is used as an objective function f ═ f (E (epsilon)1) Electric field E) is the dielectric constant ε at the calculation of the first linear gradient of the two-dimensional cross section of the set light-transmitting device1For the dielectric constant ε at the time of calculating the first linear gradient1Optimization is carried out, the opening of the all-optical logic exclusive-OR gate requires that an electric field is enlarged, a target function is enlarged, and a proper dielectric constant distribution needs to be found to enable the target function to be maximum;
the simplification problem:
the dielectric constant of each basic unit can be continuously changed, the idea of gradient descending is to make the dielectric constant descend by one step along the gradient direction, namely, the gradient is calculated according to an objective function, and the dielectric constant is iterated along the gradient direction:
wherein epsilon
1iCalculating the dielectric constant, ε, of the first linear gradient for the ith iteration
1i+1For the dielectric constant at which the first linear gradient is calculated for the (i + 1) th iteration, alpha is the step down,
value n of refractive index in two practical linear materials
1And n
2The range of the change between the two groups of the material,
for the gradient to be calculated, it is expressed as:
as an equivalent companion light source, in calculating the first linear gradient
As an equivalent first signal light source, a numerical calculation is performed to obtain an electric field E 'of a two-dimensional cross section of the light transmission device accompanying the incidence of the light source, and the electric field E' of the two-dimensional cross section of the light transmission device is obtained by the incidence of the first signal light source
1Obtaining a first linear gradient G of the ith iteration
1iComprises the following steps:
wherein epsilon1iThe dielectric constant at the time of calculating the first linear gradient for the ith iteration, ω is the frequency of the signal light source and the companion light source, μ0Is a vacuum magnetic conductivity;
when a predetermined number of iterations is reached, epsilon1A value n approaching to the set linear dielectric constant of the actual linear material1 2Or n2 2I.e. the square n of the refractive indices of the two practically linear materials1 2Or n2 2;
Obtaining a first linear gradient G for each elementary unit1Comprises the following steps:
second, calculating a second linear gradient G2
i. Setting an objective function:
a function with an independent variable as an electric field is used as an objective function f ═ f (E (epsilon)2) Electric field E) is the dielectric constant ε at the calculation of the second linear gradient of the two-dimensional cross section of the set light-transmitting device2For the dielectric constant ε in calculating the second linear gradient2Optimization is carried out, the opening of the all-optical logic exclusive-OR gate requires that an electric field is enlarged, a target function is enlarged, and a proper dielectric constant distribution needs to be found to enable the target function to be maximum;
the simplification problem:
the dielectric constant of each basic unit can be continuously changed, the idea of gradient descending is to make the dielectric constant descend by one step along the gradient direction, namely, the gradient is calculated according to an objective function, and the dielectric constant is iterated along the gradient direction:
wherein epsilon
2iFor the calculation of the second linear gradient of the ith iteration
2i+1For the dielectric constant at which the second linear gradient is calculated for the (i + 1) th iteration, alpha is the step down,
value n of refractive index in two practical linear materials
1And n
2The range of the change between the two groups of the material,
for the gradient to be calculated, it is expressed as:
as an equivalent secondary light source, in calculating the second linear gradient
As an equivalent second signal light source, a numerical calculation is performed to obtain an electric field E 'of the two-dimensional cross section of the light transmission device accompanying the incidence of the light source, and an electric field E' of the two-dimensional cross section of the light transmission device is obtained by the incidence of the second signal light source
2Obtaining a second linear gradient G of the ith iteration
2iComprises the following steps:
wherein epsilon2iFor the calculation of the second linear gradient for the ith iteration, ω is the frequency of the signal light source and the companion light source, μ0Is a vacuum magnetic conductivity;
when a predetermined number of iterations is reached, epsilon21A value n approaching to the set linear dielectric constant of the actual linear material1 2Or n2 2I.e. the square n of the refractive indices of the two practically linear materials1 2Or n2 2;
Obtaining a second linear gradient G for each elementary unit2Comprises the following steps:
summing the obtained first linear gradient and the second linear gradient to obtain a final gradient G of each basic unit:
G=G1+G2
therefore, the gradient of the objective function to the dielectric constant can be obtained only by three times of numerical calculation, namely, the electric field distribution of the two-dimensional section of the optical transmission device when the first and second signal light sources and the accompanying light source are incident is respectively solved by utilizing a time domain finite difference method.
In step 7), a bias factor β is set, the refractive index of each basic cell is changed in the final gradient direction, and the speed and magnitude of the change of the refractive index are controlled according to the bias factor, comprising the steps of:
a) setting the biased relative permittivity according to the bias factor
Wherein epsilon
jIs the relative permittivity of the basic cell of the jth iteration,
relative dielectric constant, ε, after bias of basic cell for jth iteration
mN is the maximum value of the relative dielectric constant, m is the center of the bias, j is 1
u-1;
b) Obtaining the relative dielectric constant epsilon of the j +1 th iteration according to the relative dielectric constant determined by the bias factor after the basic unit of the j th iteration is biased and the final gradient Gj+1:
Wherein the content of the first and second substances,
is composed of
For epsilon
jThe derived Jacobian matrix, alpha is the step length of descent, and the value is 10
-3~10
-2;
c) Relative permittivity ε for the (j + 1) th iterationj+1The root number is opened to obtain the refractive index of j +1 iteration.
The optimization of the refractive index is divided into a continuous optimization stage and a discrete optimization stage:
a) and (3) continuous optimization stage:
the early stage of iteration is a continuous optimization stage, and the bias factor beta is less than 5000; the earlier stages of the iteration are 1 to Nu/3~Nu/2,NuIs the iteration number;
b) a discrete optimization stage:
the later stage of iteration is a continuous optimization stage, the bias factor beta is greater than 5000, and the later stage of iteration is Nu/3~N u2 to Nu,NuIs the number of iterations.
The longer the iteration times, the better the optimization effect, but the longer the calculation time, the more the iteration times are set according to the calculation capacity of the server and the rationalization time requirement, and the iteration times are hundreds of generations, generally 200-500 generations. The bias factor is set to a number of values that monotonically increase to infinity, each value iterating on the order of tens of generations. The initial value of the bias factor is small and as the number of iterations increases, the bias factor increases. When the iteration times are less than 20 generations, setting the bias factor to be 0-50; when the iteration times are 20-40 generations, the bias factor is set to be 51-100; when the iteration times are 40-60 generations, the bias factor is set to be 101-200; when the iteration times are 60-80 generations, the bias factor is set to be 201-500; when the iteration times are 80-100 generations, the bias factor is set to be 501-1000; when the iteration times are 100-120 generations, the bias factor is set to be 1001-2000; when the iteration times are 120-200 generations, the bias factor is set to 2001 to positive infinity.
The invention has the advantages that:
the reverse design based on the gradient descent algorithm provides a general platform for the realized photonic device, and is beneficial to realizing the design and integration of the nano photonic device; the all-optical logic device is an important component in a photonic integrated circuit, and the all-optical logic exclusive-OR gate realized based on the linear optical principle has the advantages of ultra-fast speed and ultra-low energy consumption; the all-optical exclusive-OR gate is realized in a very small size range of 2 Mum multiplied by 2 Mum, and the realization of an ultra-compact and high-integration all-optical integrated circuit is facilitated; the design of the device structure by utilizing the gradient descent algorithm reduces the time for designing the device, improves the performance of the device, enriches the functions which can be realized by the device, reduces the size of the device and is beneficial to realizing an on-chip all-optical integrated circuit with ultra-fast response, ultra-low energy consumption and high integration level; the all-optical integrated device based on the reverse design has wide application prospect in the fields of advanced photonic circuits, all-optical information processing, optical communication and the like.
Detailed Description
The invention will be further elucidated by means of specific embodiments in the following with reference to the drawing.
As shown in fig. 1, the all-optical logic exclusive or gate based on the gradient descent algorithm of the present embodiment includes: a first incident waveguide 1, a second incident waveguide 2, a light transmission device 3, and an exit waveguide 4; wherein the first and second incident waveguides are connected to the exit waveguide via the light transmission device, respectively; the light transmission device adopts two linear materials, the two-dimensional section of the light transmission device is divided into a plurality of square basic units which are arranged in an M multiplied by N period in a compact way, the gradient descent algorithm is utilized, the linear superposition principle of light is combined, the refractive index of each basic unit is changed, when signal light enters the first incident waveguide and the second incident waveguide, the phase difference pi of the ports of the light transmission device, which are positioned at the emergent waveguide, is calculated to obtain the refractive index of each basic unit, the refractive index value of each basic unit is dispersed into the refractive index values corresponding to two actual linear materials, and therefore the corresponding basic units adopt the linear materials corresponding to the calculated refractive index values; there are four cases of all-optical logic exclusive-or gates: when no signal light enters the first incident waveguide and the second incident waveguide, no signal light is output from the emergent waveguide; the signal light is incident from the first incident waveguide and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light; the signal light enters from the second incident waveguide and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light; the signal light is input from the first incident waveguide and the second incident waveguide and transmitted to the light transmission device, and due to the linear superposition principle of the light, the phase difference pi of the two paths of signal light at the port of the light transmission device at the exit waveguide cancels the coherence, so that the light intensity is zero, no signal light is output from the exit waveguide, and the all-optical logic exclusive-or gate is realized.
In this embodiment, the lower surface of the light transmission device is a silicon dioxide substrate layer having a thickness of 2 μm, and the upper surface is an air layer. The light transmission device has a thickness of 220nm and a horizontal size of 2 μm × 2 μm, and is divided into 50 × 50 square basic units each of which is a square of 40nm × 40 nm. Silicon and air are used for the two linear materials respectively.
In this embodiment, MATLAB and logical FDTD Solutions are combined, and the structure of the optical transmission device is automatically calculated by a control program of the MATLAB by combining the superior algorithm function of the MATLAB with the efficient calculation of the finite difference time domain software.
The implementation method of the all-optical logic exclusive-or gate based on the gradient descent algorithm in the embodiment includes the following steps:
1) dividing a two-dimensional cross section of the light transmission device into 50 × 50 basic units of a square in which periods are closely arranged, each basic unit being 40nm × 40 nm; selecting two actual linear materials of silicon and air respectively, wherein the refractive index values of the two linear materials are 3.5 and 1 respectively;
2) setting the initial value of the refractive index of each basic cell to the same fixed value of 3.5;
3) placing a first signal light source at the position of a first input waveguide, adopting a Gaussian light source, setting the wavelength to be 1550nm, setting the full width at half maximum to be 200nm and setting the phase angle to be zero, solving a Maxwell equation set by an FDTD method, and calculating to obtain the electric field distribution of each basic unit in the optical transmission device;
4) placing a second signal light source at the position of a second input waveguide, adopting a Gaussian light source, setting the wavelength to be 1550nm, setting the full width at half maximum to be 200nm and setting the phase angle to be pi, solving a Maxwell equation set by an FDTD method, and calculating to obtain the electric field distribution of each basic unit in the optical transmission device;
5) placing an accompanying light source at the position of the emergent waveguide, adopting a Gaussian light source, setting the wavelength to be 1550nm, setting the full width at half maximum to be 200nm and setting the phase angle to be zero, solving a Maxwell equation set by an FDTD method, and calculating to obtain the electric field distribution of each basic unit in the optical transmission device;
6) solving the electric field distribution of the basic unit of the first signal light source and the electric field distribution of the basic unit of the accompanying light source, realizing that the electric field at the position of an emergent waveguide is zero when the first signal light source and the second signal light source are simultaneously incident when the all-optical logic exclusive-OR gate requires the first signal light source and the second signal light source to be simultaneously incident, setting the phase difference pi of the first signal light source and the second signal light source and the other parameters to be the same for the convenience of optimization, therefore, the opening of the all-optical logic exclusive-OR gate requires the electric field to be enlarged, the objective function to be enlarged, and obtaining the first linear gradient G of each basic unit by utilizing a gradient descent algorithm1(ii) a Solving the electric field distribution of the basic units of the second signal light source and the electric field distribution of the basic units of the accompanying light source, and obtaining a second linear gradient G of each basic unit by using a gradient descent algorithm2A first linear gradient G1And a second linear gradient G2Summing to obtain the final gradient of each elementary cell:
first linear gradient G is calculated1
i. Setting an objective function:
a function with an independent variable as an electric field is used as an objective function f ═ f (E (epsilon)1) Electric field E) is the dielectric constant ε at the calculation of the first linear gradient of the two-dimensional cross section of the set light-transmitting device1For the dielectric constant ε at the time of calculating the first linear gradient1Optimization is carried out, the opening of the all-optical logic exclusive-OR gate requires that an electric field is enlarged, a target function is enlarged, and a proper dielectric constant distribution needs to be found to enable the target function to be maximum;
the simplification problem:
the dielectric constant of each basic unit can be continuously changed, the idea of gradient descending is to make the dielectric constant descend by one step along the gradient direction, namely, the gradient is calculated according to an objective function, and the dielectric constant is iterated along the gradient direction:
wherein epsilon
1iCalculating the dielectric constant, ε, of the first linear gradient for the ith iteration
1i+1For the dielectric constant at which the first linear gradient is calculated for the (i + 1) th iteration, alpha is the step down,
value n of refractive index in two practical linear materials
1And n
2The range of the change between the two groups of the material,
for the gradient to be calculated, it is expressed as:
as an equivalent accompanying light source inWhen calculating the first linear gradient
As an equivalent first signal light source, a numerical calculation is performed to obtain an electric field E 'of a two-dimensional cross section of the light transmission device accompanying the incidence of the light source, and the electric field E' of the two-dimensional cross section of the light transmission device is obtained by the incidence of the first signal light source
1Obtaining a first linear gradient G of the ith iteration
1iComprises the following steps:
wherein epsilon1iThe dielectric constant at the time of calculating the first linear gradient for the ith iteration, ω is the frequency of the signal light source and the companion light source, μ0Is a vacuum magnetic conductivity;
when a predetermined number of iterations is reached, epsilon1The linear dielectric constant of the linear material is close to the set value of 1 or 3.52;
Obtaining a first linear gradient G for each elementary unit1Comprises the following steps:
second, calculating a second linear gradient G2
i. Setting an objective function:
a function with an independent variable as an electric field is used as an objective function f ═ f (E (epsilon)2) Electric field E) is the dielectric constant ε at the calculation of the second linear gradient of the two-dimensional cross section of the set light-transmitting device2For the dielectric constant ε in calculating the second linear gradient2Optimization is carried out, the opening of the all-optical logic exclusive-OR gate requires that an electric field is enlarged, a target function is enlarged, and a proper dielectric constant distribution needs to be found to enable the target function to be maximum;
the simplification problem:
the dielectric constant of each basic unit can be continuously changed, the idea of gradient descending is to make the dielectric constant descend by one step along the gradient direction, namely, the gradient is calculated according to an objective function, and the dielectric constant is iterated along the gradient direction:
wherein epsilon
2iFor the calculation of the second linear gradient of the ith iteration
2i+1For the dielectric constant at which the second linear gradient is calculated for the (i + 1) th iteration, alpha is the step down,
ranging between the values of the refractive indices n1 and n2 for two practical linear materials,
for the gradient to be calculated, it is expressed as:
as an equivalent secondary light source, in calculating the second linear gradient
As an equivalent second signal light source, a numerical calculation is performed to obtain an electric field E 'of the two-dimensional cross section of the light transmission device accompanying the incidence of the light source, and an electric field E' of the two-dimensional cross section of the light transmission device is obtained by the incidence of the second signal light source
2Obtaining a second linear gradient G of the ith iteration
2iComprises the following steps:
wherein epsilon2iThe dielectric constant at the time of calculating the first linear gradient for the ith iteration, ω is the frequency of the signal light source and the companion light source, μ0Is a vacuum magnetic conductivity;
when a predetermined number of iterations is reached, epsilon21The linear dielectric constant of the linear material is close to the set value of 1 or 3.52;
Obtaining a second linear gradient G for each elementary unit2Comprises the following steps:
summing the obtained first linear gradient and the second linear gradient to obtain a final gradient G of each basic unit:
G=G1+G2
therefore, only three times of numerical calculation are needed, namely, the electric field distribution of the two-dimensional section of the optical transmission device when the first signal light source and the accompanying light source are incident is respectively solved by utilizing a time domain finite difference method, and the gradient of the objective function to the dielectric constant is obtained;
7) setting a bias factor, changing the refractive index of each basic unit along the final gradient direction, controlling the speed and the size of the change of the refractive index according to the bias factor, and improving the calculation efficiency by controlling the discretization degree through the bias factor; and repeating the steps 3) to 6) to obtain the gradient of each current basic unit until the preset iteration times are finished, so as to realize the optimization of the refractive index:
optimizing the refractive index of each elementary cell by means of a bias factor beta
Wherein epsilon
jIs the relative permittivity of the basic cell of the jth iteration,
is the basis of the j iterationThe relative dielectric constant of the unit after bias is 1-3.5
2(3.5 is the refractive index of silicon at 1550 nm), m is the bias center, and 0.5 (1+ 3.5) is used in this example
2) Taking the square root of the relative dielectric constant to obtain the refractive index of each basic unit;
note that the gradient calculated in accordance with the above method is now f pairs
Gradient of (2)
To obtain
Using the chain law of derivation, multiplying
For epsilon
jDerived jacobian matrix
Finally, utilize
Obtaining the relative dielectric constant of the next iteration, wherein alpha is the descending step length and is 10
-3~10
-2。
Wherein the iteration frequency is 200 generations, and when the iteration frequency is less than 20 generations, the bias factor is set to be 50; when the iteration times are 20-40 generations, setting the bias factor as 100; when the iteration times are 40-60 generations, the bias factor is set to be 200; when the iteration times are 60-80 generations, the bias factor is set to be 500; when the iteration times are 80-100 generations, the bias factor is set to be 1000; when the iteration times are 100-120 generations, the bias factor is set to 2000; when the iteration times are 120-200 generations, the bias factor is set to be 5000;
when the iteration times are reached, the refractive index of each basic unit is forced to approach to the refractive index corresponding to the actual two linear materials, namely 1 or 3.5;
8) obtaining the final refractive index of each basic unit, and discretizing the value of the final refractive index into the values of the refractive indexes of the two linear materials, namely 1 or 3.5;
9) etching on the silicon, wherein the refractive index of the etched corresponding air is 1, the refractive index of the unetched corresponding silicon is 3.5, and the area needing etching meets the minimum requirement of a preparation process, namely the distance of 80 nm;
10) there are four cases of all-optical logic exclusive-or gates:
a) when no signal light enters the first incident waveguide and the second incident waveguide, no signal light is output from the emergent waveguide;
b) the signal light only enters from the first incident waveguide and is transmitted to the emergent waveguide through the light transmission device, and the emergent waveguide outputs the signal light, as shown in fig. 2, the transmittance is 33%;
c) the signal light only enters from the second incident waveguide and is transmitted to the exit waveguide through the light transmission device, and the exit waveguide outputs the signal light, as shown in fig. 3, the transmittance is 31%;
d) the signal light is transmitted to the light transmission device from the first incident waveguide and the second incident waveguide simultaneously, due to the linear superposition principle of light, the phase difference of the two paths of signal light is pi at the port of the light transmission device at the exit waveguide, so that the light intensity is zero, the exit waveguide does not output the signal light, as shown in fig. 4, the exit waveguide signal light is output weakly, and the transmittance is less than 2%;
thereby realizing an all-optical logic exclusive-or gate.
Finally, it is noted that the disclosed embodiments are intended to aid in further understanding of the invention, but those skilled in the art will appreciate that: various substitutions and modifications are possible without departing from the spirit and scope of the invention and the appended claims. Therefore, the invention should not be limited to the embodiments disclosed, but the scope of the invention is defined by the appended claims.