An optical computing system and method

CN122672625BActive Publication Date: 2026-10-09LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611161366.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-09
Estimated Expiration
2046-08-03

AI Technical Summary

Technical Problem

[0003]本申请提供了一种光学计算系统及方法,以至少解决相关技术中运算精度低、稳定性不足、可支持的运算位宽小的问题

Benefits of technology

本申请实施例提供了一种光学计算系统,通过第一马赫曾德尔干涉仪阵列将与二进制整数乘法对应的总扩展布尔向量所对应的电信号转换为光信号,通过第二马赫曾德尔干涉仪网络阵列表示二进制整数乘法对应的总扩展分块布尔矩阵,并利用光干涉效应完成该矩阵与总扩展布尔向量的乘法运算,使二进制整数乘法运算能够借助光学干涉的并行处理能力直接在光域内完成,有利于提升二进制整数乘法的运算效率;进一步地,通过第三马赫曾德尔干涉仪阵列将相乘运算光信号分为功率关系反映累加数值奇偶性的两路光信号,并由光电平衡探测器阵列计算两路光信号的差分结果直接得到取模运算后的光信号,通过对两路光信号功率是否平衡的判决确定取模运算后的光信号,降低了干扰因素对运算结果的影响,从而提高了二进制整数乘法运算的精度和稳定性;又由于总扩展布尔向量与总扩展分块布尔矩阵的维度可根据待运算二进制数的位数确定,使该光学计算系统可根据实际需要进行相应的扩展,从而支持更大的运算位宽。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122672625B_ABST
    Figure CN122672625B_ABST
Patent Text Reader

Abstract

The application discloses an optical computing system and method, which is applied to the technical field of optical computing and aims to solve the problems of low operation precision, insufficient stability and small supportable operation bit width of related solutions. A first Mach-Zehnder interferometer array is used to convert an electrical signal corresponding to a total extended Boolean vector corresponding to binary integer multiplication into an optical signal. A second Mach-Zehnder interferometer network array is used to represent a total extended block Boolean matrix corresponding to binary integer multiplication, and the multiplication operation of the total extended block Boolean matrix and the total extended Boolean vector is completed by using an optical interference effect to obtain a multiplication operation optical signal. A third Mach-Zehnder interferometer array is used to divide the multiplication operation optical signal into two optical signals and output the two optical signals. An optoelectronic balanced detector array is used to calculate the difference between the two optical signals and obtain a modulus operation optical signal. After bit sequence restoration, the modulus operation optical signal is used to obtain a product result of binary integer multiplication. The application improves the operation precision and stability and supports a large bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical computing technology, and in particular to an optical computing system and method. Background Technology

[0002] The rapid development of artificial intelligence technology has placed higher demands on computing power. However, binary integer multiplication, implemented using traditional electronic circuits, is a fundamental operation in AI scenarios such as neural networks and converter models, and generally suffers from high power consumption, high latency, and insufficient parallelism. To address this, various optical solutions for binary integer multiplication have been proposed, but existing solutions are mostly still in the simple prototype verification stage, exhibiting problems such as low computational accuracy, insufficient stability, and limited supported bit widths. Therefore, how to provide a high-precision, stable optical computing system capable of supporting larger bit widths to implement binary integer multiplication is a technical problem that needs to be solved in this field. Summary of the Invention

[0003] This application provides an optical computing system and method to at least solve the problems of low computational accuracy, insufficient stability, and small supported computational bit width in related technologies.

[0004] This application provides an optical computing system, including: The first Mach-Zehnder interferometer array is used to convert the electrical signal corresponding to the total extended Boolean vector corresponding to binary integer multiplication into an optical signal; The second Mach-Zehnder interferometer network array is used to represent the total extended block Boolean matrix corresponding to binary integer multiplication, and to perform the multiplication operation between the total extended block Boolean matrix and the total extended Boolean vector using the optical interference effect to obtain the multiplication operation optical signal; The third Mach-Zehnder interferometer array is used to split the multiplication operation optical signal into two optical signals and output them. The power relationship between the two optical signals is used to reflect the parity of the accumulated value corresponding to the multiplication operation optical signal. The photoelectric balanced detector array is used to calculate the difference between two optical signals to obtain the optical signal after modulo operation. The optical signal after modulo operation is restored to its bit order to obtain the product result of binary integer multiplication.

[0005] This application also provides an optical calculation method, including: The electrical signal corresponding to the total extended Boolean vector corresponding to binary integer multiplication is converted into an optical signal using the first Mach-Zehnder interferometer array; The total extended block Boolean matrix corresponding to binary integer multiplication is represented by a second Mach-Zehnder interferometer network array. The multiplication operation between the total extended block Boolean matrix and the total extended Boolean vector is completed by the optical interference effect through the second Mach-Zehnder interferometer network array, and the multiplication operation optical signal is obtained. The multiplication operation optical signal is split into two optical signals and output using a third Mach-Zehnder interferometer array. The power relationship between the two optical signals is used to reflect the parity of the accumulated value corresponding to the multiplication operation optical signal. The difference between the two optical signals is calculated using a photoelectric balanced detector array to obtain the optical signal after modulo operation. The optical signal after modulo operation is then restored to its bit order to obtain the product result of binary integer multiplication.

[0006] This application also provides an electronic device, including: any of the optical computing systems described above.

[0007] As can be seen from the above technical solution, the beneficial effects of the present invention are as follows: This application provides an optical computing system that converts the electrical signal corresponding to the total extended Boolean vector for binary integer multiplication into an optical signal using a first Mach-Zehnder interferometer array. A second Mach-Zehnder interferometer network array represents the total extended block Boolean matrix corresponding to binary integer multiplication, and the multiplication operation between this matrix and the total extended Boolean vector is performed using optical interference. This allows the binary integer multiplication operation to be completed directly in the optical domain using the parallel processing capabilities of optical interference, which is beneficial for improving the operational efficiency of binary integer multiplication. Furthermore, a third Mach-Zehnder interferometer array is used to convert the multiplication... The computational optical signal is divided into two optical signals whose power relationship reflects the parity of the accumulated value. The difference between the two optical signals is calculated by the photoelectric balanced detector array, and the optical signal after the modulo operation is directly obtained. The optical signal after the modulo operation is determined by judging whether the power of the two optical signals is balanced, which reduces the influence of interference factors on the operation result, thereby improving the accuracy and stability of binary integer multiplication. Furthermore, since the dimensions of the total extended Boolean vector and the total extended block Boolean matrix can be determined according to the number of bits of the binary number to be operated on, the optical computing system can be expanded accordingly as needed, thereby supporting a larger operation bit width.

[0008] Furthermore, the present invention also provides an optical calculation method, which has corresponding advantages. Attached Figure Description

[0009] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a schematic diagram of the structure of an optical computing system provided in an embodiment of this application; Figure 2 A schematic diagram illustrating the principle of binary integer multiplication 11×11 provided in this application embodiment; Figure 3 This is a schematic diagram of another optical computing system provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of a Mach-Zehnder interferometer provided in this application embodiment; Figure 5 This is a flowchart illustrating an optical calculation method provided in an embodiment of this application. Detailed Implementation

[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0012] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0013] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0014] It should be noted that optical computing uses light waves or photons as information carriers and leverages optical principles to perform data processing and computation. Its aim is to utilize the high speed and low energy consumption of light to achieve high-performance computing. Optical computing can be divided into analog optical computing and digital optical computing based on the type of optical signal processed. Analog optical computing processes continuously changing optical signals, performing calculations through physical effects such as light interference, diffraction, and propagation. However, analog optical computing is extremely sensitive to optical path noise and external interference, and errors accumulate with each computational step, making it difficult to significantly improve computational accuracy. Digital optical computing, on the other hand, processes discretely encoded optical signals. For example, optical logic computation uses binary signals for logical processing to complete calculations. It is naturally resistant to noise and easily suppresses errors, accurately compensating for the shortcomings of analog optical computing and representing the core direction for achieving high-precision, large-scale optical computing.

[0015] Binary integer multiplication is a fundamental unit in the field of AI (Artificial Intelligence), and its computational efficiency directly determines the running speed of AI algorithms, playing a crucial role in key scenarios such as neural networks and transformer architectures. As AI models iterate to scales of hundreds of billions and trillions of parameters, increasingly stringent requirements are placed on the parallelism, computational speed, and energy consumption control of binary integer multiplication. However, current binary integer multiplication operations mainly rely on traditional electronic computing technologies, which suffer from high power consumption, high latency, and insufficient parallelism, making them unsuitable for the rapid iteration needs of AI's pre-defined language models. Current research primarily employs optical logic computing architectures to implement logical computations. For example, one optical logic computing architecture uses eight high-speed microdisk modulators to implement a 4-bit optical carry propagation network, capable of performing various basic AI operations such as addition, subtraction, increment, decrement, comparison, and bitwise operations. Its dynamic power consumption at clock frequencies exceeding 20 GHz is one to two orders of magnitude lower than that of state-of-the-art transistor circuits, with significantly reduced latency, supporting 32-bit, 64-bit, and even larger bit-scale operations. Another optical logic computing architecture is based on a spatiotemporal multiplexing architecture and demonstrates a 32×2 digital multiplier, further extending the bit width of optical logic computing (Photonics Research, 12(3):499-504(2024)). However, current research on binary integer multiplication based on optical computing mainly focuses on the prototype verification of simple optical logic multiplication operations, and suffers from problems such as low computational accuracy, insufficient stability, and too small bit width.

[0016] Therefore, this invention proposes an optical computing system for implementing binary integer multiplication operations. Please refer to [reference needed]. Figure 1 The diagram shows a structural schematic of an optical computing system. This application will describe the optical computing system in detail using embodiments thereof. The optical computing system includes: The first Mach-Zehnder interferometer array 1 is used to convert the electrical signal corresponding to the total extended Boolean vector corresponding to binary integer multiplication into an optical signal; The second Mach-Zehnder interferometer network array 2 is used to represent the total extended block Boolean matrix corresponding to binary integer multiplication, and to use the optical interference effect to complete the multiplication operation between the total extended block Boolean matrix and the total extended Boolean vector to obtain the multiplication operation optical signal; The third Mach-Zehnder interferometer array 3 is used to split the multiplication operation optical signal into two optical signals and output them. The power relationship between the two optical signals is used to reflect the parity of the accumulated value corresponding to the multiplication operation optical signal. The photoelectric balanced detector array 4 is used to calculate the difference between the two optical signals to obtain the optical signal after modulo operation. After the bit order is restored, the product result of binary integer multiplication is obtained from the optical signal after modulo operation.

[0017] It should be noted that, as Figure 1 As shown, the coherent light emitted by the laser source is split and input to the first Mach-Zehnder interferometer array 1. Each Mach-Zehnder interferometer in the first Mach-Zehnder interferometer array 1 includes an input coupler, an output coupler, and phase shifters respectively set on the two optical paths. The input coupler splits the input light signal into two beams and sends them into the two optical paths respectively. The two phase shifters introduce a phase difference in their respective optical paths. The two beams are then recombined by the output coupler. Depending on the different phase differences between the two beams before merging, the output light may either have constructive or destructive interference. Based on this, the optical power transfer function of the Mach-Zehnder interferometer can be controlled by controlling the phase difference, thereby converting the corresponding electrical signal into an intensity-controllable optical signal.

[0018] In other words, the total extended Boolean vector in this embodiment is formed by concatenating the multiplicand vector and the multiplier vector corresponding to binary integers, and the dimension of the total extended Boolean vector is equal to the sum of the number of bits in the multiplicand and the number of bits in the multiplier. Each first Mach-Zehnder interferometer in the first Mach-Zehnder interferometer array 1 corresponds to an element in the total extended Boolean vector. By adjusting the phase difference of the first Mach-Zehnder interferometer, the intensity of its output optical signal is controlled, thereby mapping the logic zero or logic one of the electrical signal to the light-free state or the light-on state of the optical signal.

[0019] The second Mach-Zehnder interferometer network array 2 consists of a network structure composed of multiple rows and columns of second Mach-Zehnder interferometers. Each second Mach-Zehnder interferometer corresponds to an element in the total extended block Boolean matrix. By adjusting the phase difference of each second Mach-Zehnder interferometer, the output optical signal of the second Mach-Zehnder interferometer can represent the element value of the corresponding element in the total extended block Boolean matrix. In practical applications, the optical signal output from the first Mach-Zehnder interferometer array 1 is distributed to the second Mach-Zehnder interferometer network array 2. After phase adjustment, optical path interference, and merging of each second Mach-Zehnder interferometer in the second Mach-Zehnder interferometer network array 2, a multiplication optical signal that can characterize the result of multiplying the total extended block Boolean matrix and the total extended Boolean vector is obtained. This multiplication optical signal is then input to the third Mach-Zehnder interferometer array 3.

[0020] Each Mach-Zehnder interferometer in the third Mach-Zehnder interferometer array 3 is a single-input dual-output structure. After the multiplication optical signal is input into the third Mach-Zehnder interferometer array 3, it is split into two optical signals by the single-input dual-output Mach-Zehnder interferometers in the array. The power relationship between these two optical signals reflects the parity of the accumulated value corresponding to the multiplication operation. The two optical signals output from the single-input dual-output Mach-Zehnder interferometers are input into the photoelectric balanced detector array 4, which performs differential detection of the two optical signals, ultimately obtaining the product result of the binary integer multiplication.

[0021] In other words, the optical computing system in this application embodiment utilizes the natural parallelism of the propagation and interference of optical signals in the Mach-Zehnder interferometer network to transform the binary integer multiplication operation, which originally required sequential processing by electronic circuits bit by bit, into a total extended block Boolean matrix and total extended Boolean vector multiplication and differential decision operation that can be completed in one go in the optical domain. This can effectively reduce computational latency and improve parallel processing capabilities. Furthermore, by limiting the phase difference and decision method to several deterministic discrete states, it avoids continuous and high-precision numerical reading and calibration of the optical signal amplitude or phase, thereby improving computational accuracy and stability.

[0022] In one implementation, the system may further include: The data processor receives binary integers to be processed and generates a total extended Boolean vector and a total extended block Boolean matrix based on the binary integers.

[0023] It should be noted that the embodiments of this application may also include a data processor. The data processor performs the preprocessing function of converting the binary integers to be operated on into a data form suitable for optical processing in the entire optical computing system. It is a bridge connecting the electrical domain data input and the optical domain operation and processing. The data processor can be implemented in software or hardware and is used to complete the conversion from binary integer multiplication to the multiplication form of the total extended Boolean matrix and the total extended Boolean vector.

[0024] Understandably, after receiving the binary integer to be calculated, the data processor maps the binary integer to a total extended Boolean vector according to a preset encoding rule, and constructs a total extended block Boolean matrix based on the calculation logic of binary integer multiplication. The total extended Boolean vector and the total extended block Boolean matrix generated by the data processor are used to configure the first Mach-Zehnder interferometer array 1 and the second Mach-Zehnder interferometer network array 2, respectively. Through the preprocessing of the data processor, the user only needs to input the decimal or binary integer to be calculated into the system, and the system can automatically complete the subsequent optical calculation process without the user having to manually construct matrices and vectors, thus improving the ease of use of the system. In addition, after generating the total extended Boolean vector and the total extended block Boolean matrix, the data processor can also be used to control the phase difference of each Mach-Zehnder interferometer in the first Mach-Zehnder interferometer array 1 and the second Mach-Zehnder interferometer network array 2, respectively, based on the total extended Boolean vector and the total extended block Boolean matrix.

[0025] In one implementation, a data processor is configured to determine the multiplicand and multiplier based on the binary integer to be operated on, convert the binary number corresponding to the multiplicand into a first Boolean vector, convert the binary number corresponding to the multiplier into a second Boolean vector, and generate a total extended Boolean vector formed by concatenating the first Boolean vector and the second Boolean vector; wherein the dimension of the first Boolean vector is equal to the number of bits in the multiplicand, the dimension of the second Boolean vector is equal to the number of bits in the multiplier, and the dimension of the total extended Boolean vector is equal to the sum of the number of bits in the multiplicand and the number of bits in the multiplier.

[0026] It is understandable that binary integer multiplication can be broken down into two steps: generating partial products and summing with carry. An N×N bit multiplication operation will generate N partial products, ultimately resulting in a 2N-bit result. The principle calculation diagram for 11×11 binary integer multiplication is shown below. Figure 2As shown, the data processor, based on the mapping rule between binary integers and vectors, converts the multiplicand and its corresponding binary number into a first Boolean vector and a second Boolean vector, respectively. These two vectors are then concatenated into a single extended Boolean vector, thus unifying the encoding of two independent binary numbers into a single vector and providing a unified data structure for subsequent matrix processing. The mapping rule between the binary integer and vector is as follows: the least significant bit of the binary number corresponds to the first row of elements in the vector, and the most significant bit of the binary number corresponds to the last row of elements in the vector.

[0027] For example, for an N-bit binary number x=x N x N-1 x2 x1, whose corresponding N-position column vector is x=(x1,x2,…,x N-1 ,x N ) T That is, the least significant bit x1 is the first element of the vector, and the most significant bit x1 is the first element of the vector. N As the last element of the vector. For example, for the two-bit binary number 11 (i.e., the decimal 3), with the least significant bit being 1 and the most significant bit being 1, the corresponding column vector is (1,1). T The data processor converts the binary number corresponding to the multiplier into a first Boolean vector 'a', converts the binary number corresponding to the multiplier into a second Boolean vector 'b', and then converts the first Boolean vector... a Second Boolean vector b By directly concatenating the elements, we obtain an N-dimensional total extended Boolean vector. The dimension of the total extended Boolean vector is equal to the sum of the number of bits in the multiplicand and the number of bits in the multiplier. For example, if the multiplicand is a two-bit binary number A = 11 and the multiplier is also a two-bit binary number B = 11, then the binary number corresponding to the multiplicand is converted into the first Boolean vector. a =(1,1) T The binary number corresponding to the multiplier is converted into a second Boolean vector. b =(1,1) T Total extended Boolean vector X total =(1,1,1,1) T .

[0028] In one implementation, the data processor can also be used to generate a total extended block Boolean matrix based on the number of bits in the multiplicand and the number of bits in the multiplier, wherein the number of rows and columns of the total extended block Boolean matrix are equal to the dimension of the total extended Boolean vector.

[0029] It should be noted that the dimension of the total extended block Boolean matrix is ​​uniquely determined by the number of bits in the multiplicand and multiplier, and is independent of the specific value of the binary number to be operated on. Therefore, the data processor in this embodiment can pre-generate the total extended block Boolean matrix structure of the corresponding dimension according to different operation bit widths. In actual operation, it is only necessary to determine the total extended Boolean vector according to the specific values ​​of the multiplicand and multiplier, thereby improving the efficiency of data preprocessing.

[0030] In one implementation, the total extended block Boolean matrix is ​​divided into an upper left submatrix, an upper right submatrix, a lower left submatrix, and a lower right submatrix; the upper left submatrix is ​​used to represent the partial product obtained by ANDing each bit of the multiplier with each bit of the multiplicand; the upper right submatrix is ​​used to represent the alignment result after shifting the partial product one bit to the higher bit; the lower left submatrix is ​​used to represent the result of carrying over when reaching two bits and passing it to the higher bit; and the lower right submatrix is ​​used to represent the summation result of carrying over.

[0031] It should be noted that the four key steps in binary integer multiplication are partial product generation, bit weight alignment, carry propagation, and result summation. These can be represented by four submatrices of the total extended block Boolean matrix: the top-left submatrix, the top-right submatrix, the bottom-left submatrix, and the bottom-right submatrix. Each submatrix is ​​designed according to its corresponding logical function. Taking a multiplicand and multiplier both being binary 11 (i.e., decimal 3) as an example, their corresponding first and second Boolean vectors are both (1,1). T The concatenation yields the total extended Boolean vector X. total =(1,1,1,1) T After constructing the corresponding total extended block Boolean matrix according to the functions of the four sub-matrices mentioned above, multiplying this total extended block Boolean matrix with the total extended Boolean vector, and performing modulo-2 operations and bit order restoration, yields the binary product result 1001 (i.e., the decimal number 9), which is consistent with the result of 11 × 11 = 1001. This demonstrates that any binary integer multiplication can be converted into the product of a total extended block Boolean matrix and its corresponding total extended Boolean vector. It can be understood that by using a block matrix approach, the carry relationships that originally required sequential bit processing are uniformly expressed as fixed mapping relationships between matrix elements, allowing binary multiplication to be completed in one step using matrix and vector multiplication. This lays the mathematical foundation for subsequently transferring this operation to an optical system.

[0032] It is understandable that for a total extended block Boolean matrix M of dimension 2N×2N, total It can be divided into four 2N×2N sub-matrices according to function, that is ; Where, m 11The top-left submatrix (i.e., the partial product generating submatrix) represents the partial product obtained by ANDing each bit of the multiplier with each bit of the multiplicand, m. 11 It can be the identity matrix I; m 12 The top-right submatrix represents the alignment result after shifting a partial product one bit higher. 12 In other words, the bit-weighted alignment submatrix is ​​used to implement the alignment rule of shifting the partial product one bit to the right to match the bit width offset of binary multiplication; m 21 The lower left submatrix (also known as the carry propagation submatrix) is used to represent the carry generation and propagation results when carrying occurs at 2; m 22 The lower right submatrix (also known as the result summation submatrix) is used to represent the summation result with carry.

[0033] Following the example above, the multiplicand vector Sum of multiplier vectors The corresponding total extended block Boolean matrix is: .

[0034] Then, by multiplying the total extended block Boolean matrix by the total extended Boolean vector, the result can be obtained by modulo 2 calculation and positional restoration. For example, the multiplicand vector Sum of multiplier vectors The corresponding total extended block Boolean matrix M total Multiply by the total extended Boolean vector We can obtain: ; In this process, the bit order restoration pointer is converted back to its binary representation. Specifically, the first row of the vector represents the least significant bit, and the last row represents the most significant bit. This allows us to obtain binary integer multiplication. .

[0035] In practical applications, every binary integer multiplication can be transformed into the product of a total extended block Boolean matrix and the corresponding total extended Boolean vector. It should also be noted that, in practical applications, the top-left submatrix can be set as an identity matrix. Since, after bit-alignment, the partial product obtained by ANDing the corresponding bits of the multiplicand and multiplier directly corresponds numerically to the value of the multiplicand vector itself, without requiring other linear transformations, the identity matrix can accurately represent this mapping relationship. Furthermore, the identity matrix has the simplest structure. Correspondingly, in optical implementation, the phase state setting of the Mach-Zehnder interferometer representing this submatrix in the second Mach-Zehnder interferometer network array 2 is more regular and easier to uniformly control.

[0036] In one embodiment, the second Mach-Zehnder interferometer network array 2 includes multiple rows of second Mach-Zehnder interferometers M21. The outputs of each row of second Mach-Zehnder interferometers M21 are combined to obtain a multiplication optical signal. The third Mach-Zehnder interferometer array 3 includes multiple single-input dual-output Mach-Zehnder interferometers M31. Each single-input dual-output Mach-Zehnder interferometer M31 is used to receive one multiplication optical signal corresponding to a row of second Mach-Zehnder interferometers M21 in the second Mach-Zehnder interferometer network array 2.

[0037] It should be noted that, in this embodiment, the number of rows in the total extended block Boolean matrix corresponds to the number of rows of second Mach-Zehnder interferometers M21 in the second Mach-Zehnder interferometer network array 2. The output optical signals of each second Mach-Zehnder interferometer M21 in each row are naturally superimposed on the optical path, which is equivalent to directly performing the summation operation after multiplying the elements of that row with the corresponding elements of the total extended Boolean vector in the optical domain, resulting in one multiplication operation optical signal. In this embodiment, the single-input dual-output Mach-Zehnder interferometers M31 in the third Mach-Zehnder interferometer array 3 correspond one-to-one with the rows of the second Mach-Zehnder interferometer network array 2, receiving and processing the multiplication operation optical signals path by path.

[0038] like Figure 3 As shown, this embodiment of the application takes two-bit binary integer multiplication (i.e., both the multiplicand and multiplier are two-bit binary numbers) as an example for illustration. The total dimension of the extended Boolean vector is four, and the second Mach-Zehnder interferometer network array 2 consists of sixteen second Mach-Zehnder interferometers M21 in four rows and four columns. The outputs of the four second Mach-Zehnder interferometers M21 in each row are combined through an optical waveguide to form a multiplication optical signal, which carries the accumulated result corresponding to that row. The third Mach-Zehnder interferometer array 3 includes four single-input dual-output Mach-Zehnder interferometers M31. The input of each single-input dual-output Mach-Zehnder interferometer M31 is connected to the output merging terminal of the corresponding row in the second Mach-Zehnder interferometer network array 2 to receive the multiplication optical signal corresponding to that row. Each second Mach-Zehnder interferometer M21 can be individually modulated according to the corresponding matrix element value. The optical signals between rows are independent and propagate in parallel, thereby realizing the simultaneous output of multiple results and effectively improving the parallelism of the operation.

[0039] It is understood that the embodiments of this application adopt a row-by-row merging and path-by-path corresponding processing method, which can realize the orderly transmission of the operation results of each row of the matrix to the subsequent decision circuit without the need to set up additional adders and multiplexers in the electrical domain. This simplifies the system structure and provides a basis for subsequent parity determination by row.

[0040] In one embodiment, the first Mach-Zehnder interferometer array 1 includes a plurality of first Mach-Zehnder interferometers M11, the output of each first Mach-Zehnder interferometer M11 being connected to the input of all second Mach-Zehnder interferometers M21 in the same column of the second Mach-Zehnder interferometer network array 2.

[0041] It is understood that each element in the total extended Boolean vector in the embodiments of this application corresponds to a first Mach-Zehnder interferometer M11 in the first Mach-Zehnder interferometer array 1. The optical signal output by the first Mach-Zehnder interferometer M11 is simultaneously distributed to all the second Mach-Zehnder interferometers M21 in the same column of the second Mach-Zehnder interferometer network array 2. That is, one input corresponds to one column multiplication, so that the matrix elements represented by the column can all be multiplied with the same input component.

[0042] Please refer to the following: Figure 3 In this embodiment, taking two-bit binary integer multiplication as an example, the first Mach-Zehnder interferometer array 1 includes four first Mach-Zehnder interferometers M11, corresponding to the four elements of the total extended Boolean vector. The output of each first Mach-Zehnder interferometer M11 is connected to the input of four second Mach-Zehnder interferometers M21 in the same column of the second Mach-Zehnder interferometer network array 2 after passing through a splitter. For example, the output of the first first Mach-Zehnder interferometer M11 is connected to the input of the four second Mach-Zehnder interferometers M21 in the first column, the output of the second first Mach-Zehnder interferometer M11 is connected to the input of the four second Mach-Zehnder interferometers M21 in the second column, and so on. Through this connection method, each optical signal output from the first Mach-Zehnder interferometer array 1 is broadcast to all rows of the corresponding column in the second Mach-Zehnder interferometer network array 2, realizing parallel multiplication of the input vector elements with the corresponding elements in each row of the matrix.

[0043] The connection method in this embodiment fully utilizes the characteristic that optical signals can be multi-channeled without loss, avoiding the additional circuit overhead caused by needing to copy and distribute input data separately for each matrix element in the electrical domain, and realizing efficient parallel distribution of vector elements to each element of the matrix.

[0044] In one implementation, the number of Mach-Zehnder interferometers in the first Mach-Zehnder interferometer array 1 is equal to the dimension of the total extended Boolean vector; the number of Mach-Zehnder interferometers in the second Mach-Zehnder interferometer network array 2 is equal to the product of the number of rows and columns of the total extended block Boolean matrix; and the number of single-input dual-output Mach-Zehnder interferometers in the third Mach-Zehnder interferometer array 3 is equal to the number of rows of the total extended block Boolean matrix.

[0045] It should be noted that the above-mentioned quantitative relationships in the embodiments of this application are directly determined based on the dimensions of the total extended Boolean vector and the total extended block Boolean matrix. When designing the optical computing system, those skilled in the art can convert the specific dimensions of the total extended Boolean vector and the total extended block Boolean matrix according to the number of bits of the binary integer to be operated on, and then determine the number of Mach-Zehnder interferometers required for the first Mach-Zehnder interferometer array 1, the second Mach-Zehnder interferometer network array 2, and the third Mach-Zehnder interferometer array 3, respectively, without the need for additional complex design.

[0046] For example, if the number of bits in the multiplicand is N and the number of bits in the multiplier is N, then the dimension of the total extended Boolean vector is 2N, and the total extended block Boolean matrix is ​​a square matrix with 2N rows and 2N columns. The number of first Mach-Zehnder interferometers M11 in the first Mach-Zehnder interferometer array 1 is 2N, each used to encode one of the 2N elements of the total extended Boolean vector. The number of second Mach-Zehnder interferometers M21 in the second Mach-Zehnder interferometer network array 2 is (2N) × (2N), or 4N², each used to represent one of the 4N² elements of the total extended block Boolean matrix. The number of single-input dual-output Mach-Zehnder interferometers M31 in the third Mach-Zehnder interferometer array 3 is 2N, each used to determine the parity of the 2N multiplication optical signals. Furthermore, in this embodiment of the application, taking two-bit multiplication (N=2) as an example, the first Mach-Zehnder interferometer array 1 has 4 elements, the second Mach-Zehnder interferometer network array 2 has 16 elements, and the third Mach-Zehnder interferometer array 3 has 4 elements.

[0047] Understandably, it is precisely because there is a clear correspondence between the number of components in this optical computing system and the number of bits in the binary number to be computed that the system can flexibly expand the scale of each array according to the actual computational bit width requirements, thereby supporting a larger computational bit width.

[0048] In one embodiment, the photoelectric balance detector array 4 includes multiple photoelectric balance detectors. The positive input terminal and negative input terminal of each photoelectric balance detector are respectively connected to the two output terminals of a corresponding single-input dual-output Mach-Zehnder interferometer M31 in the third Mach-Zehnder interferometer array 3.

[0049] It should be noted that each single-input dual-output Mach-Zehnder interferometer M31 in the third Mach-Zehnder interferometer array 3 of this application embodiment has two output ports, which output a first optical signal and a second optical signal, respectively. The corresponding photoelectric balance detector in the photoelectric balance detector array 4 has a positive input terminal and a negative input terminal. The positive input terminal is connected to the first output port of the single-input dual-output Mach-Zehnder interferometer M31, and the negative input terminal is connected to the second output port of the single-input dual-output Mach-Zehnder interferometer M31. After the first optical signal and the second optical signal output by the single-input dual-output Mach-Zehnder interferometer M31 are transmitted to the positive input terminal and the negative input terminal of the corresponding photoelectric balance detector, respectively, the photoelectric balance detector performs differential detection on the two input optical signals to obtain the difference result of the two optical signals. The difference result is the difference between the optical power at the positive input terminal and the optical power at the negative input terminal.

[0050] It is understood that in this embodiment, by connecting two optical signals with a specific power relationship to the positive and negative input terminals of the photoelectric balance detector, the photoelectric balance detector can directly output an electrical signal reflecting the power difference between the two optical signals. This eliminates the need to first measure the absolute light intensity of each optical signal and then subtract the values, thus simplifying the signal processing flow. Furthermore, this differential detection method in this embodiment effectively eliminates common-mode noise (such as light intensity changes caused by fluctuations in light source power and changes in ambient temperature), thereby improving the accuracy of the decision and the system's anti-interference capability.

[0051] In one implementation, the number of photoelectric balance detectors in the photoelectric balance detector array 4 is equal to the number of single-input dual-output Mach-Zehnder interferometers M31 in the third Mach-Zehnder interferometer array 3.

[0052] Understandably, since each single-input dual-output Mach-Zehnder interferometer M31 in the third Mach-Zehnder interferometer array 3 corresponds to the operation result of one row of the total extended block Boolean matrix, the photoelectric balanced detectors in the photoelectric balanced detector array 4 are set up one-to-one with the single-input dual-output Mach-Zehnder interferometers M31. This ensures that the operation result of each row of the matrix can be independently and in parallel to complete the modulus decision, and there will be no situation where multiple rows of results interfere with each other or are omitted from processing, thus ensuring the integrity and parallel efficiency of the entire operation process.

[0053] For example, if the total number of rows in the expanded block Boolean matrix is ​​2N, then the number of single-input dual-output Mach-Zehnder interferometers M31 in the third Mach-Zehnder interferometer array 3 is 2N, and the number of photoelectric balanced detectors in the photoelectric balanced detector array 4 is also 2N. Each photoelectric balanced detector performs differential detection on the two output optical signals of its corresponding single-input dual-output Mach-Zehnder interferometer M31, outputting one decision result. All 2N photoelectric balanced detectors work in parallel, simultaneously outputting 2N-bit decision results, thus achieving parallel processing of the modulo operation.

[0054] In one embodiment, each of the first Mach-Zehnder interferometer array 1, the second Mach-Zehnder interferometer network array 2, and the third Mach-Zehnder interferometer array 3 includes an input coupler, an output coupler, and a first phase shifter and a second phase shifter respectively disposed on two optical paths.

[0055] It's important to note that a Mach-Zehnder interferometer (MZI) is an optical silicon-based device that performs specific functions based on the principle of optical interference, such as optical switches and modulators, and has wide applications in optical computing and optical communication. The core function of an MZI lies in its ability to precisely control the amplitude and phase of an optical signal, thereby performing complex mathematical operations. In practical applications, MZIs can be used to perform matrix and vector multiplication. By combining multiple MZIs into an optical network matrix, the input optical signal can be encoded as a vector, and the phase modulation of the MZIs corresponds to the weight values ​​of the matrix. When the optical signal passes through the MZI network matrix, the interference effect of the light naturally completes the matrix-vector multiplication operation, and the result is presented in the form of an output optical signal. Due to the high speed and parallelism of light, this optical implementation is more efficient than traditional electronic computing when processing large-scale data.

[0056] In practical applications, each Mach-Zehnder interferometer (i.e., silicon-based MZI) can be composed of two couplers and two phase shifters, such as... Figure 4As shown, both the input and output couplers can be referred to as 2×2 couplers. First, the input coupler splits the light from a single light source into two beams. Each beam passes through two different phase-shifting arms, generating a certain phase difference. Finally, these two beams are combined into one beam by a beam combiner, forming an interference signal. Based on the phase difference, constructive or destructive interference of the light amplitudes can be achieved. MZI (Metal-Zehnder Interferometer) has advantages such as simple working principle, mature manufacturing process, and high reliability. Furthermore, its manufacturing process is compatible with CMOS (Complementary Metal-Oxide-Semiconductor) technology, facilitating large-scale integration. It is the fundamental unit for the large-scale implementation of the Mach-Zehnder interferometer arrays in the embodiments of this application.

[0057] It should also be noted that the second-order transfer unitary matrix of silicon-based MZI can be written as follows: Among them, E in1 E is the first input terminal of the input coupler. in2 E is the second input terminal of the input coupler. 01 E is the first output terminal of the output coupler. 02 The second output terminal of the output coupler has a phase difference Δ. = 1- 2, of which, 1 represents the phase of the first phase shifter. 2 represents the phase of the first phase shifter.

[0058] According to the relation of the second-order transfer unitary matrix, when only E in1 Port input optical signal, E in2 =0, at which point it is possible to calculate from E in1 Enter into E 01 The output optical power transfer function is: .

[0059] In one implementation, the operating point of each single-input dual-output Mach-Zehnder interferometer M31 in the third Mach-Zehnder interferometer array 3 is offset at a preset orthogonal operating point. The power of the two optical signals is equal when the sum of the values ​​corresponding to the multiplication operation is even, and the power is not equal when the sum of the values ​​corresponding to the multiplication operation is odd. When the difference result is zero, the modulo operation result is zero; when the difference result is not zero, the modulo operation result is one.

[0060] It should be noted that when each Mach-Zehnder interferometer receives an optical signal from one input port and no optical signal from the other input port, the optical power transfer function T from that input port to a certain output port is... MZI There is a definite trigonometric function relationship between the phase difference between the two optical paths of the Mach-Zehnder interferometer, and the optical power transfer function ranges from 0 to 1. When the phase difference is zero, the optical power transfer function is 1, corresponding to constructive interference between the two optical paths, and the optical signal is almost entirely output from this output port, which is the all-pass state; when the phase difference is half the phase difference corresponding to the modulation period (i.e., π), the optical power transfer function is 0, corresponding to destructive interference between the two optical paths, and the optical signal is almost not output from this output port, which is the all-blocking state.

[0061] It is understandable that for any total expanded block Boolean matrix M∈R N×N Each element in the total extended block Boolean matrix takes a value that is either 0 or 1. Therefore, for any element in the total extended block Boolean matrix that takes a value of 0 or 1, the optical power transfer function T of the corresponding second Mach-Zehnder interferometer M21 in the second Mach-Zehnder interferometer network array 2 can be set. MZI This makes each element in the total extended block Boolean matrix correspond to an optical power transfer function T of a second Mach-Zehnder interferometer M21. MZI , that is, Here, il represents the element in the i-th row and l-th column of the matrix. By adjusting the phase difference of the second Mach-Zehnder interferometer M21 to one of the two preset phase states mentioned above, the optical power transfer function of the Mach-Zehnder interferometer is directly equal to the value of the matrix element, thereby achieving a precise mapping of the matrix element to the optical state of the Mach-Zehnder interferometer. This is the physical basis for the embodiment of this application to directly represent the value of Boolean matrix elements using optical devices. In practical applications, the phase difference of the second Mach-Zehnder interferometer M21 can be adjusted using either the thermo-optic effect or the electro-optic effect. The thermo-optic effect adjusts the phase difference by changing the waveguide temperature to affect the effective refractive index, while the electro-optic effect adjusts the phase difference by applying a voltage to control the optical properties of the material.

[0062] It should also be noted that the accumulated value corresponding to the multiplication operation optical signal in the embodiments of this application refers to the number of light intensity units corresponding to the convergence of the output optical signals of each second Mach-Zehnder interferometer M21 in a certain row of the second Mach-Zehnder interferometer network array 2. Its value reflects the result of the accumulation after multiplying the matrix elements of that row with the corresponding elements of the total extended Boolean vector. In this embodiment, the preset orthogonal operating point can specifically be a π / 4 orthogonal operating point. That is, the operating point of each single-input dual-output Mach-Zehnder interferometer M31 in the third Mach-Zehnder interferometer array 3 is biased at the π / 4 orthogonal operating point. At this operating point, the single-input dual-output Mach-Zehnder interferometer M31 in the third Mach-Zehnder interferometer array 3 further introduces a small phase bias to construct a decision threshold sensitive to the parity of the input light intensity. In the ideal case without the introduction of this small phase bias, the output light power of the two paths is exactly equal when the input light intensity is an even number of light intensity units. In order to make this equality relationship stably recognized by the photoelectric balance detector array 4 and to make the imbalance corresponding to an odd number of light intensity units sufficiently significant for easy distinction, it is necessary to introduce this small phase bias to finely adjust the operating point. This ensures that the power of the two paths is highly balanced in the even case, while making the power of the two paths produce a difference that can be effectively detected in the odd case. Therefore, when the input light intensity corresponds to an even number of light intensity units, the two output light powers are strictly equal, and the difference result calculated by the photoelectric balance detector is 0, corresponding to a modulo operation result of 0; when the input light intensity corresponds to an odd number of light intensity units, the two output light powers are slightly unbalanced, the difference result is not 0, and the corresponding modulo operation result is 1.

[0063] It is understandable that using this method of biased orthogonal operating point combined with differential decision to complete the modulo-2 operation essentially transforms the numerical modulo calculation into a decision on the relative physical quantity of whether the power of the two optical signals is balanced. This decision method is not sensitive to common-mode factors such as optical path loss and detector response, and can effectively improve the accuracy of the modulo operation results. This is also the key to improving the accuracy and stability of binary integer multiplication operations in this application.

[0064] It should also be noted that, in the embodiments of this application, the phase difference of each second Mach-Zehnder interferometer M21 in the second Mach-Zehnder interferometer network array 2 is adjusted to one of two preset phase states to represent the value of the corresponding element in the total extended block Boolean matrix; wherein, one preset phase state corresponds to zero phase difference, and the other preset phase state corresponds to the phase difference corresponding to half a modulation period.

[0065] Since the elements in the total extended block Boolean matrix only take the values ​​0 or 1, the dynamic representation of the matrix element values ​​can be achieved simply by adjusting the phase difference of the corresponding Mach-Zehnder interferometer to one of two preset states: zero phase difference (i.e., 0) or the phase difference corresponding to half a modulation period (i.e., π). It is understandable that the phase difference is limited to these two discrete states, rather than continuously adjusted to other values, because simply driving the phase change to 0 or π is sufficient to stably achieve these two preset phase states. High-precision calibration and continuous adjustment of intermediate phase states are unnecessary. Compared to continuous amplitude and phase modulation schemes, this binary control method significantly reduces device power consumption and integration complexity, while improving the system's ability to resist phase noise, reducing signal distortion caused by environmental disturbances, and further ensuring the accuracy and stability of the operation.

[0066] Furthermore, the phase difference of the second Mach-Zehnder interferometer M21 can be adjusted using either the thermo-optical effect or the electro-optical effect. The thermo-optical effect refers to changing the effective refractive index of the waveguide in the Mach-Zehnder interferometer by altering its temperature, thereby changing the phase of the optical signal propagating in that optical path. The electro-optical effect refers to applying a voltage to the Mach-Zehnder interferometer to modulate the optical properties of the waveguide material, thus changing the phase of the optical signal propagating in that optical path. Those skilled in the art can choose one or a combination of these two phase adjustment methods based on the actual integration process and response speed requirements.

[0067] Of course, the phase adjustment of the first Mach-Zehnder interferometer in the first Mach-Zehnder interferometer array 1 and the single-input dual-output Mach-Zehnder interferometer in the third Mach-Zehnder interferometer can be achieved using the aforementioned thermo-optical effect or electro-optical effect, which will not be elaborated further in this embodiment. Based on the above embodiments, it should also be noted that the binary integer multiplication result output by the optical computing system in this embodiment can be further applied to practical computing scenarios in the field of artificial intelligence. Specifically, the convolution operation in the neural network or the matrix multiplication operation in the Transformer model can be converted into multiple binary integer multiplication operations, which are then input into the aforementioned optical computing system for computation to obtain the results of the convolution operation or matrix multiplication operation. Taking convolution as an example, the input image can be converted into binary form (0 / 1). That is, the input image can be binarized (for example, by setting a grayscale threshold, where pixel values ​​above the threshold are recorded as 1 and those below the threshold as 0), resulting in a binary input matrix that is expanded into a one-dimensional vector, serving as the vector corresponding to the multiplicand. The convolution kernel matrix is ​​then binarized to obtain a Boolean convolution kernel matrix, which is expanded into a one-dimensional vector, serving as the vector corresponding to the multiplier. The optical computing system described above then performs the corresponding binary integer multiplication operations window by window. After traversing all windows of the image, the complete calculation result can be obtained. It is understood that since the convolution operation of artificial intelligence neural networks and the matrix multiplication operation of transformer models both have the characteristics of dense multiplication and addition, which match the parallel computing characteristics of the optical computing system in this application embodiment, decomposing the above operations into parallel executable binary multiplication and addition sequences and inputting them into the optical computing system for processing can reduce redundant operations, achieve efficient collaboration between optical computing hardware and artificial intelligence algorithms, and provide efficient and low-power computing support for the rapid iteration of artificial intelligence preset language models.

[0068] It should be noted that, taking the image edge extraction task as an example, in the image edge extraction task, the grayscale image is binarized. In the implementation process, a grayscale threshold (e.g., 128) can be preset. Pixels in the input image with pixel values ​​higher than the threshold are recorded as 1, and pixels with pixel values ​​lower than the threshold are recorded as 0, thus obtaining a binary input matrix. This binary input matrix is ​​then expanded into a one-dimensional vector by row, which serves as the vector corresponding to the multiplicand. Assuming the threshold is 128, pixel values ​​higher than 128 are recorded as 1, and pixels lower than 128 are recorded as 0, thus obtaining a binary input matrix and expanding it into a one-dimensional vector.

[0069] For example, a binary input matrix The corresponding one-dimensional binary vector is It can be viewed as a multiplicand vector.

[0070] In practical applications, the classic Sobel edge detection kernel can be selected. Based on a given Boolean convolution kernel matrix, the binary input matrix is ​​converted into a Boolean convolution kernel matrix that retains only 0 and 1 values. It is also expanded into a one-dimensional vector, which serves as the vector corresponding to the multiplier.

[0071] For example, a 3×3 Boolean convolution kernel matrix is Similarly, it can be expanded into a corresponding one-dimensional binary vector. It can be viewed as a multiplier vector.

[0072] By inputting the binary integer multiplication of the multiplicand vector and the multiplier vector into the aforementioned optical computing system for calculation, the edge extraction result at the location of the convolution window can be obtained. For example... After performing the above process sequentially on each convolution window (e.g., 3×3) of the input image, a complete binary edge extraction image can be obtained. It is understood that this application example further illustrates that the optical computing system in this application embodiment can flexibly support the intensive computational needs in practical artificial intelligence application scenarios such as image processing and feature extraction, using binary integer multiplication operations as the basic unit.

[0073] It should be noted that in practical applications, the optical signal input to the first Mach-Zehnder interferometer array 1 originates from a laser source (such as...). Figure 3 As shown in the diagram, the coherent light emitted by the laser source is split and input to each Mach-Zehnder interferometer in the first Mach-Zehnder interferometer array 1. The light intensity of each branch can be pre-normalized to an equal unit light intensity, so that the cumulative value corresponding to the convergence of each row of light signals in the second Mach-Zehnder interferometer network array 2 can accurately reflect the number of elements in that row whose effective multiplication result is 1. This provides a physical basis for the subsequent parity determination of the third Mach-Zehnder interferometer array 3 and the photoelectric balance detector array 4.

[0074] It should also be noted that the optical computing system provided in this application embodiment converts binary integer multiplication into the multiplication of a total extended block Boolean matrix and a total extended Boolean vector through a data processor, providing a unified mathematical foundation for the optical implementation of this multiplication operation; the matrix and vector multiplication operations are completed by optical interference through the first Mach-Zehnder interferometer array 1 and the second Mach-Zehnder interferometer network array 2, allowing the operation to be completed directly in the optical domain by taking advantage of the parallel propagation of optical light, reducing computational latency and improving parallel processing capabilities; by limiting the phase difference and decision method of the Mach-Zehnder interferometer to deterministic discrete states, the power consumption of the devices and the integration difficulty are reduced, and the noise immunity of the system is improved; furthermore, the modulo-2 operation is completed by the third Mach-Zehnder interferometer array 3 combined with the photoelectric balanced detector array 4 in the form of differential balanced detection, which improves the accuracy of the modulo operation results, thereby improving the overall accuracy and stability of binary integer multiplication operations, and supporting flexible expansion of the system scale according to the actual operation bit width.

[0075] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0076] Based on the above embodiments, this application also provides an optical calculation method, which can be found in [reference needed]. Figure 5 The method includes: S110: The electrical signal corresponding to the total extended Boolean vector corresponding to binary integer multiplication is converted into an optical signal using the first Mach-Zehnder interferometer array 1; S120: The total extended block Boolean matrix corresponding to binary integer multiplication is represented by the second Mach-Zehnder interferometer network array 2, and the multiplication operation between the total extended block Boolean matrix and the total extended Boolean vector is completed by the optical interference effect through the second Mach-Zehnder interferometer network array 2 to obtain the multiplication operation optical signal; S130: The multiplication operation optical signal is split into two optical signals and output using the third Mach-Zehnder interferometer array 3. The power relationship between the two optical signals is used to reflect the parity of the accumulated value corresponding to the multiplication operation optical signal. S140: The difference between the two optical signals is calculated using the photoelectric balanced detector array 4 to obtain the optical signal after modulo operation. The optical signal after modulo operation is restored by bit order to obtain the product result of binary integer multiplication.

[0077] It should be noted that the optical computing method provided in this application embodiment has the same beneficial effects as the optical computing system in the above embodiments. For descriptions of the features corresponding to the optical computing method in the embodiments, please refer to the relevant descriptions of the embodiments corresponding to the optical computing system; these will not be repeated here. Based on the above embodiments, this application embodiment also provides an electronic device, including: the optical computing system as described in the above embodiments.

[0078] It should be noted that the electronic device in this application embodiment can be a server, a computing accelerator card, or other computing device capable of carrying out artificial intelligence inference or training tasks. By integrating the optical computing system in the above embodiment into the electronic device, the electronic device can achieve higher computing accuracy, stability, and lower computing power consumption than traditional electronic circuits when performing artificial intelligence tasks involving a large number of binary integer multiplication operations. It has the same beneficial effects as the optical computing system in the above embodiment. For a detailed description of the optical computing system involved in this embodiment, please refer to the above embodiments. The embodiments of this application will not be repeated here.

[0079] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.

[0080] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0081] The optical computing system and method provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. An optical computing system, characterized in that, include: The first Mach-Zehnder interferometer array is used to convert the electrical signal corresponding to the total extended Boolean vector corresponding to binary integer multiplication into an optical signal; The second Mach-Zehnder interferometer network array is used to represent the total extended block Boolean matrix corresponding to the binary integer multiplication, and to perform the multiplication operation between the total extended block Boolean matrix and the total extended Boolean vector using the optical interference effect to obtain the multiplication operation optical signal; The third Mach-Zehnder interferometer array is used to split the multiplication operation optical signal into two optical signals and output them. The power relationship between the two optical signals is used to reflect the parity of the accumulated value corresponding to the multiplication operation optical signal. A photoelectric balanced detector array is used to calculate the difference between the two optical signals to obtain the optical signal after modulo operation. The optical signal after modulo operation is restored to its bit order to obtain the product result of the binary integer multiplication. The second Mach-Zehnder interferometer network array includes multiple rows of second Mach-Zehnder interferometers. The outputs of each row of second Mach-Zehnder interferometers are combined to obtain a multiplication optical signal. The third Mach-Zehnder interferometer array includes multiple single-input dual-output Mach-Zehnder interferometers. Each single-input dual-output Mach-Zehnder interferometer is used to receive a multiplication optical signal corresponding to a row of second Mach-Zehnder interferometers in the second Mach-Zehnder interferometer network array. The operating point of each single-input dual-output Mach-Zehnder interferometer in the third Mach-Zehnder interferometer array is offset at a preset orthogonal operating point. The two optical signals have equal power when the sum of the values ​​corresponding to the multiplication optical signals is even, and unequal power when the sum of the values ​​corresponding to the multiplication optical signals is odd. When the difference result is zero, the modulo operation result is zero; when the difference result is not zero, the modulo operation result is one.

2. The optical computing system according to claim 1, characterized in that, The first Mach-Zehnder interferometer array includes multiple first Mach-Zehnder interferometers, and the output of each first Mach-Zehnder interferometer is connected to the input of all second Mach-Zehnder interferometers in the same column of the second Mach-Zehnder interferometer network array.

3. The optical computing system according to claim 1, characterized in that, The number of Mach-Zehnder interferometers in the first Mach-Zehnder interferometer array is equal to the dimension of the total extended Boolean vector; the number of Mach-Zehnder interferometers in the second Mach-Zehnder interferometer network array is equal to the product of the number of rows and columns of the total extended block Boolean matrix; the number of single-input dual-output Mach-Zehnder interferometers in the third Mach-Zehnder interferometer array is equal to the number of rows of the total extended block Boolean matrix.

4. The optical computing system according to claim 1, characterized in that, The photoelectric balanced detector array includes multiple photoelectric balanced detectors. The positive input terminal and negative input terminal of each photoelectric balanced detector are respectively connected to the two output terminals of a corresponding single-input dual-output Mach-Zehnder interferometer in the third Mach-Zehnder interferometer array.

5. The optical computing system according to claim 4, characterized in that, The number of photoelectric balanced detectors in the photoelectric balanced detector array is equal to the number of single-input dual-output Mach-Zehnder interferometers in the third Mach-Zehnder interferometer array.

6. The optical computing system according to claim 1, characterized in that, Each of the first Mach-Zehnder interferometer array, the second Mach-Zehnder interferometer network array, and the third Mach-Zehnder interferometer array includes an input coupler, an output coupler, and a first phase shifter and a second phase shifter respectively disposed on two optical paths.

7. The optical computing system according to claim 1, characterized in that, The phase difference of each second Mach-Zehnder interferometer in the second Mach-Zehnder interferometer network array is adjusted to one of two preset phase states to represent the value of the corresponding element in the total extended block Boolean matrix; wherein, one preset phase state corresponds to zero phase difference, and the other preset phase state corresponds to the phase difference corresponding to half a modulation period.

8. The optical computing system according to any one of claims 1 to 7, characterized in that, Also includes: A data processor is configured to receive a binary integer to be processed and generate the total extended Boolean vector and the total extended block Boolean matrix based on the binary integer.

9. The optical computing system according to claim 8, characterized in that, The data processor is configured to determine the multiplicand and multiplier based on the binary integer to be operated on, convert the binary number corresponding to the multiplicand into a first Boolean vector, convert the binary number corresponding to the multiplier into a second Boolean vector, and generate a total extended Boolean vector formed by concatenating the first Boolean vector and the second Boolean vector; wherein the dimension of the first Boolean vector is equal to the number of bits in the multiplicand, the dimension of the second Boolean vector is equal to the number of bits in the multiplier, and the dimension of the total extended Boolean vector is equal to the sum of the number of bits in the multiplicand and the number of bits in the multiplier.

10. The optical computing system according to claim 9, characterized in that, The data processor is further configured to generate the total extended block Boolean matrix based on the number of bits in the multiplicand and the number of bits in the multiplier, wherein the number of rows and columns of the total extended block Boolean matrix are both equal to the dimension of the total extended Boolean vector.

11. The optical computing system according to claim 10, characterized in that, The total extended block Boolean matrix is ​​divided into an upper left submatrix, an upper right submatrix, a lower left submatrix, and a lower right submatrix. The upper left submatrix is ​​used to represent the partial product obtained by ANDing each bit of the multiplier with each bit of the multiplicand. The upper right submatrix is ​​used to represent the alignment result after shifting the partial product one bit to the higher bit. The lower left submatrix is ​​used to represent the result of carrying over when reaching two bits and passing it to the higher bit. The lower right submatrix is ​​used to represent the summation result of carrying over.

12. The optical computing system according to claim 11, characterized in that, The top-left submatrix is ​​an identity matrix.

13. An optical calculation method, characterized in that, include: The electrical signal corresponding to the total extended Boolean vector corresponding to binary integer multiplication is converted into an optical signal using the first Mach-Zehnder interferometer array; The total extended block Boolean matrix corresponding to the binary integer multiplication is represented by a second Mach-Zehnder interferometer network array, and the multiplication operation between the total extended block Boolean matrix and the total extended Boolean vector is completed by the optical interference effect through the second Mach-Zehnder interferometer network array to obtain the multiplication operation optical signal; The multiplication optical signal is split into two optical signals and output using a third Mach-Zehnder interferometer array. The power relationship between the two optical signals is used to reflect the parity of the accumulated value corresponding to the multiplication optical signal. The difference between the two optical signals is calculated using a photoelectric balanced detector array to obtain the modulo-division optical signal. The modulo-division optical signal is then restored to its bit order to obtain the product of the binary integer multiplication; wherein: The second Mach-Zehnder interferometer network array includes multiple rows of second Mach-Zehnder interferometers. The outputs of each row of second Mach-Zehnder interferometers are combined to obtain a multiplication optical signal. The third Mach-Zehnder interferometer array includes multiple single-input dual-output Mach-Zehnder interferometers. Each single-input dual-output Mach-Zehnder interferometer is used to receive a multiplication optical signal corresponding to a row of second Mach-Zehnder interferometers in the second Mach-Zehnder interferometer network array. The operating point of each single-input dual-output Mach-Zehnder interferometer in the third Mach-Zehnder interferometer array is offset at a preset orthogonal operating point. The two optical signals have equal power when the sum of the values ​​corresponding to the multiplication optical signals is even, and unequal power when the sum of the values ​​corresponding to the multiplication optical signals is odd. When the difference result is zero, the modulo operation result is zero; when the difference result is not zero, the modulo operation result is one.

Citation Information

Patent Citations

  • Method and system for realizing optical neural network

    CN113657588A

  • Mach-Zehnder interferometer network for optical real number matrix calculation

    CN115905792A