Non-linear data generation and processing method based on light quantum and light quantum computer
By constructing and adjusting optical quantum circuits, the energy consumption and implementation barriers of nonlinear function computation in existing technologies have been solved, realizing high-energy-efficiency nonlinear layer operations and neural network optimization, which are suitable for high-speed real-time decision-making tasks and high-performance computing clusters.
Patent Information
- Application Number
- CN202511439673.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-10-10
AI Technical Summary
In existing technologies, pure electric digital computing schemes and pure photonic computing schemes suffer from high energy consumption and implementation obstacles when realizing nonlinear functions, making it difficult to balance energy efficiency and performance.
By acquiring the nonlinear function and its attribute information of the nonlinear layer, an initial photonic quantum circuit is constructed, and the target photonic quantum circuit is determined through measurement and iterative adjustment. This enables computation on the input data of the nonlinear layer, combining the low-energy consumption characteristics of photonic computing, the nonlinear characteristics of photonic quantum computing, and the general programmability of electronic computing.
It achieves high-energy-efficiency nonlinear layer operations, improves the expressive power of nonlinear layers and the model accuracy and convergence speed of neural networks, is suitable for high-speed real-time decision-making tasks, and enhances hardware availability and practicality in the medium-scale quantum computing stage.
Smart Images

Figure CN120893592A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quantum machine learning, in particular to a method for generating and processing nonlinear data based on optical quanta and an optical quantum computer. BACKGROUND
[0002] In the field of high-performance computing, especially in applications for artificial intelligence (AI), signal processing and scientific simulation, the core computing task can be abstracted as applying a series of linear and nonlinear transformations to data streams. Linear transformations (such as matrix multiplication) have been significantly optimized in terms of energy efficiency, while the implementation of nonlinear functions (such as activation functions in neural networks, complex signal modulation, etc.) has become a key bottleneck restricting the overall performance and energy consumption of the system.
[0003] The prior art mainly solves this problem through pure electronic digital computing schemes and pure photonic computing schemes, but both of these two schemes have fundamental and irreconcilable limitations. SUMMARY
[0004] The present application aims to solve the problem of the limitations in the prior art by providing a method for generating and processing nonlinear data based on optical quanta and an optical quantum computer.
[0005] To achieve the above-mentioned purpose, the technical solutions adopted by the embodiments of the present application are as follows: In a first aspect, an embodiment of the present application provides a method for generating and processing nonlinear data based on optical quanta, which comprises: obtaining a nonlinear function of a nonlinear layer and attribute information of the nonlinear function, the attribute information at least including domain information; constructing an initial optical quantum circuit corresponding to the nonlinear function according to the number of frequency spectrums of the nonlinear function and the attribute information of the nonlinear function, the initial optical quantum circuit at least including a unitary matrix and a phase shifter; measuring the initial optical quantum circuit and determining a target function corresponding to the initial optical quantum circuit according to the measurement result; determining loss information of the target function and determining whether to apply the initial optical quantum circuit according to the loss information, if yes, taking the initial optical quantum circuit as a target optical quantum circuit, if not, iteratively adjusting the initial optical quantum circuit and taking the initial optical quantum circuit at the end of iteration as the target optical quantum circuit; operating on input data of the nonlinear layer based on the target optical quantum circuit to generate output data of the nonlinear layer.
[0006] Optionally, the constructing the initial optical quantum circuit corresponding to the nonlinear function according to the spectrum number of the nonlinear function and the attribute information of the nonlinear function comprises: determining an optical quantum parameter according to the spectrum number of the nonlinear function, the optical quantum parameter at least comprising a waveguide number, a phase shifter number and a photon number; constructing the initial optical quantum circuit according to the optical quantum parameter, the attribute information of the nonlinear function and a preset optical quantum circuit architecture.
[0007] Optionally, the determining the optical quantum parameter according to the spectrum number of the nonlinear function comprises: acquiring preset photon number preference information; determining the optical quantum parameter according to the spectrum number of the nonlinear function and the photon number preference information.
[0008] Optionally, the constructing the initial optical quantum circuit according to the optical quantum parameter, the attribute information of the nonlinear function and a preset optical quantum circuit architecture comprises: configuring an intermediate optical quantum circuit according to the optical quantum parameter and the preset optical quantum circuit architecture; secondarily configuring the intermediate optical quantum circuit according to the attribute information of the nonlinear function to obtain the initial optical quantum circuit.
[0009] Optionally, the secondarily configuring the intermediate optical quantum circuit according to the attribute information of the nonlinear function to obtain the initial optical quantum circuit comprises: determining an input variable of the intermediate optical quantum circuit according to the definition domain information; determining a phase of a phase shifter in the intermediate optical quantum circuit according to the input variable, and configuring the intermediate optical quantum circuit according to the phase of the phase shifter to obtain the initial optical quantum circuit.
[0010] Optionally, the determining the phase of the phase shifter in the intermediate optical quantum circuit according to the input variable comprises: determining the phase of the phase shifter in the intermediate optical quantum circuit according to the input variable and index information corresponding to the phase shifter in the intermediate optical quantum circuit.
[0011] Optionally, the measuring the initial optical quantum circuit to determine a target function corresponding to the initial optical quantum circuit according to a measurement result comprises: performing photon number resolving measurement on the initial optical quantum circuit to obtain a measurement result, the measurement result being used to indicate a multi-photon event probability distribution; The measurement results are weighted and summed to calculate a target function corresponding to the initial optical quantum circuit.
[0012] Optionally, the photon number resolving measurement on the initial optical quantum circuit to obtain the measurement results comprises: An input state is input into the optical quantum circuit to evolve to obtain an output state. The output state is subjected to photon number resolving measurement, and multi-photon events are counted to obtain the measurement results.
[0013] Optionally, the determination of whether to apply the initial optical quantum circuit according to the loss information comprises: If the loss information is less than a preset loss threshold, it is determined to apply the initial optical quantum circuit. If the loss information is greater than the preset loss threshold, the unitary matrix in the initial optical quantum circuit is adjusted according to the loss information.
[0014] In a second aspect, another embodiment of the present application provides an optical quantum-based nonlinear data generation and processing device, which comprises: An acquisition module is configured to acquire a nonlinear function of a nonlinear layer and attribute information of the nonlinear function, wherein the attribute information at least comprises domain information. A construction module is configured to construct an initial optical quantum circuit corresponding to the nonlinear function according to a frequency spectrum number of the nonlinear function and the attribute information of the nonlinear function, wherein the initial optical quantum circuit at least comprises a unitary matrix and a phase shifter. A determination module is configured to measure the initial optical quantum circuit and determine a target function corresponding to the initial optical quantum circuit according to measurement results. The determination module is further configured to determine loss information of the target function, determine whether to apply the initial optical quantum circuit according to the loss information, if yes, use the initial optical quantum circuit as a target optical quantum circuit, and if no, iteratively adjust the initial optical quantum circuit and use the initial optical quantum circuit at the end of iteration as the target optical quantum circuit. An operation module is configured to operate input data of the nonlinear layer based on the target optical quantum circuit to generate output data of the nonlinear layer.
[0015] Optionally, the construction module is specifically configured to: Determine optical quantum parameters according to the frequency spectrum number of the nonlinear function, wherein the optical quantum parameters at least comprise a waveguide number, a phase shifter number and a photon number. Construct the initial optical quantum circuit according to the optical quantum parameters, the attribute information of the nonlinear function and a preset optical quantum circuit architecture.
[0016] Optionally, the constructing module is specifically used for: acquiring preset photon number preference information; determining a light quantum parameter according to a spectrum number of the nonlinear function and the photon number preference information.
[0017] Optionally, the constructing module is specifically used for: configuring an intermediate light quantum circuit according to the light quantum parameter and a preset light quantum circuit architecture; secondarily configuring the intermediate light quantum circuit according to attribute information of the nonlinear function to obtain the initial light quantum circuit.
[0018] Optionally, the constructing module is specifically used for: determining an input variable of the intermediate light quantum circuit according to the definition domain information; determining a phase of a phase shifter in the intermediate light quantum circuit according to the input variable, and configuring the intermediate light quantum circuit according to the phase of the phase shifter to obtain the initial light quantum circuit.
[0019] Optionally, the constructing module is specifically used for: determining the phase of the phase shifter in the intermediate light quantum circuit according to the input variable and index information corresponding to the phase shifter in the intermediate light quantum circuit.
[0020] Optionally, the determining module is specifically used for: performing photon number resolving measurement on the initial light quantum circuit to obtain a measurement result, the measurement result being used for indicating a multi-photon event probability distribution; performing weighted summation on the measurement result to calculate a target function corresponding to the initial light quantum circuit.
[0021] Optionally, the determining module is specifically used for inputting a preset input state into the light quantum circuit to obtain an output state; performing photon number resolving measurement on the output state and counting a multi-photon event to obtain a measurement result.
[0022] Optionally, the determining module is specifically used for: if the loss information is less than a preset loss threshold, determining to apply the initial light quantum circuit; if the loss information is greater than the preset loss threshold, adjusting a unitary matrix in the initial light quantum circuit according to the loss information.
[0023] In a third aspect, another embodiment of the present application provides a light quantum computer, including the target light quantum circuit of any one of the first aspect.
[0024] In a fourth aspect, another embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to perform the steps of the method of any one of the above first aspect.
[0025] In a fifth aspect, another embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, when the computer program is run by a processor, performing the steps of the method of any one of the above first aspect.
[0026] The beneficial effects of the present application are: by obtaining the nonlinear function and attribute information of the nonlinear layer, and constructing an initial optical quantum circuit according to the frequency spectrum number of the nonlinear function and the attribute information, and measuring the initial optical quantum circuit, the target function can be determined according to the measurement result, and the target optical quantum circuit is obtained according to the loss information of the target function, so that the input data of the nonlinear layer can be operated based on the target optical quantum circuit, not only the target optical quantum circuit corresponding to the nonlinear layer of any complexity can be obtained equivalently and deterministically, the expression ability of the nonlinear layer is improved, but also the operation of the input data of the nonlinear layer can be completed in the optical domain, the energy consumption in the operation process of the nonlinear layer is reduced, that is, the low energy consumption characteristics of photonic computing, the nonlinear characteristics of optical quantum computing and the general programmable ability of electronic computing can be combined to perform high energy efficient computing on the input data of the nonlinear layer.
[0027] At the same time, the obtained target optical quantum circuit can also be used as a physical activation unit in a neural network, so that the neural network can autonomously "learn" and "evolve" the optimal activation function form for a specific task during the training process, which helps to significantly improve the model accuracy and convergence speed of the neural network, so that during the training of the network, the overall performance, efficiency and function can be maximized through the deep coupling of algorithm design and hardware implementation. And, due to the photonic properties of the target optical quantum circuit, the obtained target optical quantum circuit can also be applied to any time series task that requires high-speed real-time decision making, such as speech recognition, financial prediction, etc.
[0028] In addition, the target optical quantum circuit obtained by the application also has the advantages of smaller quantum circuit complexity and no need for the participation of nonlinear optical devices, and can significantly improve the usability, practicality and value of quantum hardware in actual applications in the current development stage of noisy and medium-scale quantum computing. In addition, the nonlinear data generation and processing method based on optical quantum provided by the application can also be applied to high-performance optical quantum computing clusters in parallel or distributed, and deployed to the fields of financial processing, logistics manufacturing and artificial intelligence through hyper-convergence and other ways. BRIEF DESCRIPTION OF DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the application, the drawings needed to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0030] Figure 1 A flowchart of the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 2 A flowchart of constructing an initial optical quantum circuit corresponding to a nonlinear function in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 3 A flowchart of determining optical quantum parameters in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 4 A flowchart of constructing an optical quantum circuit in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 5 A flowchart of obtaining an initial optical quantum circuit in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 6 A flowchart of determining a target function corresponding to an initial optical quantum circuit in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 7 A flowchart of obtaining a measurement result in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 8 A flowchart of determining whether to apply an initial optical quantum circuit in the nonlinear data generation and processing method based on optical quantum provided by the embodiments of the application; Figure 9A schematic diagram of a nonlinear data generation and processing device based on optical quanta is provided for an embodiment of the present application. Figure 10 An electronic device structure schematic diagram is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0031] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only intended to illustrate and describe the present application, and are not intended to limit the scope of the present application. In addition, it should be understood that the accompanying drawings are not drawn to scale. The flowcharts in the present application show the operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowcharts can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.
[0032] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application.
[0033] It should be noted that the term “comprising” will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0034] The prior art mainly solves the calculation problem related to nonlinear functions through a pure electric digital calculation scheme and a pure photon calculation scheme. The pure electric scheme can flexibly implement any nonlinearity, but at the cost of unsustainable high energy consumption and limited speed. The pure photon scheme has the potential of extremely low energy consumption and high speed, but there is a fundamental obstacle in implementing the core nonlinear calculation. Therefore, both schemes have fundamental and difficult to reconcile limitations.
[0035] Based on the above problems, the embodiment of the present application provides a nonlinear data generation and processing method based on optical quantum. The nonlinear function and attribute information of the nonlinear layer are obtained, the initial optical quantum circuit is constructed according to the frequency spectrum number of the nonlinear function and the attribute information, and the initial optical quantum circuit is measured, so that the target function can be determined according to the measurement result, and the target optical quantum circuit is obtained according to the loss information of the target function, so that the input data of the nonlinear layer can be operated based on the target optical quantum circuit, and the low energy consumption characteristics of photonic computing, the nonlinear characteristics of optical quantum computing and the general programmable ability of electronic computing can be combined to perform high energy efficient calculation on the input data of the nonlinear layer.
[0036] It can be understood that by performing the steps of the nonlinear data generation and processing method based on optical quantum provided by the embodiment of the present application, the expression mechanism of the nonlinear function can be realized at the physical layer, so that the low energy consumption characteristics of photonic computing, the nonlinear characteristics of optical quantum computing and the general programmable ability of electronic computing can be combined to perform high energy efficient calculation on the input data of the nonlinear layer.
[0037] The nonlinear data generation and processing method based on optical quantum provided by the embodiment of the present application will be described in detail in combination with multiple embodiments.
[0038] Figure 1 A flowchart of the nonlinear data generation and processing method based on optical quantum provided by the embodiment of the present application is shown in FIG. 1. Figure 1 As shown in FIG. 1, the execution subject of the method can be any electronic device with processing capability, and the method includes the following steps. S101, obtaining the nonlinear function of the nonlinear layer and the attribute information of the nonlinear function.
[0039] It can be understood that the nonlinear function of the nonlinear layer refers to the nonlinear function itself that is expected to be implemented in the optical quantum circuit.
[0040] The nonlinear function can be a nonlinear activation function, specifically, a nonlinear activation function used in a neural network, for example: ReLU, Tanh, Sigmoid or any composite function. The function form of the nonlinear function can be directly determined by a set of Fourier coefficients, and the set of Fourier coefficients are also used as trainable parameters when the nonlinear layer is used in the neural network.
[0041] Optionally, according to the structure of the neural network to be trained, the nonlinear function of the corresponding nonlinear layer and the attribute information of the nonlinear function are obtained.
[0042] The attribute information at least includes domain information. Specifically, the domain information refers to a value range of an input variable x of the nonlinear function, and the domain information can affect the effectiveness and convergence of the Fourier expansion and determine how to discretize the input variable x.
[0043] Optionally, the attribute information further includes Fourier spectrum characteristics of the nonlinear function, where the Fourier spectrum characteristics include how many independent frequency components are contained in the Fourier series expansion of the nonlinear function, amplitude and phase information of each frequency component, and whether the nonlinear function is a periodic function.
[0044] Optionally, the attribute information further includes nonlinear characteristics of the nonlinear function. The nonlinear characteristics can determine the training strategy and hardware selection, and the nonlinear characteristics include steep change characteristics, high-frequency oscillation characteristics, jump characteristics, and discontinuous characteristics. Specifically, the steep change characteristics are used to indicate whether the nonlinear function has a steep change, the high-frequency oscillation characteristics are used to indicate whether the nonlinear function has a high-frequency oscillation component, the jump characteristics are used to indicate whether the nonlinear function has a jump, and the discontinuous characteristics are used to indicate whether the nonlinear function has a discontinuous point.
[0045] Optionally, the attribute information further includes precision requirements, calculation speed requirements, noise tolerance, and the like.
[0046] In S102, an initial optical quantum circuit corresponding to the nonlinear function is constructed according to the spectrum number of the nonlinear function and the attribute information of the nonlinear function.
[0047] Optionally, after obtaining the nonlinear function, the spectrum number of the nonlinear function can be determined, and the initial optical quantum circuit corresponding to the nonlinear function is constructed according to the spectrum number of the nonlinear function and the attribute information.
[0048] The spectrum number refers to the number of independent frequency components contained in the Fourier series expansion of the nonlinear function in its domain.
[0049] For example, when the nonlinear function is a periodic function, the Fourier series expansion of the nonlinear function can be performed, and the number of all independent frequency components is extracted to obtain the spectrum number. When the nonlinear function is a non-periodic function, the Fourier approximation of the nonlinear function on a finite interval can be performed, and the first N main frequency components are retained, where N is the Fourier spectrum number, and N is a positive integer.
[0050] For example, when the nonlinear function is f(x) = sin(x) + cos(2x), the spectrum number can be 2.
[0051] Exemplarily, the complexity of the initial optical quantum circuit can be determined according to the spectral number of the nonlinear function, and the modulation range of the initial optical quantum circuit can be determined according to the attribute information of the nonlinear function, so as to construct the initial optical quantum circuit corresponding to the nonlinear function.
[0052] The initial optical quantum circuit, as a physical implementation of the nonlinear function, is a programmable photonic path network composed of multiple optical elements, which is used for controllable linear transformation and interference operation on the input photonic state, so as to realize the quantum information processing task. The initial optical quantum circuit at least includes a unitary matrix and a phase shifter.
[0053] Exemplarily, the initial optical quantum circuit can be implemented based on the architecture of unitary matrix-phase shifter-unitary matrix, which can realize any multimode unitary transformation. The initial optical quantum circuit is used for controllable linear transformation and interference operation on the input photonic state, and finally a function expression about the input variable x is obtained through the measurement of the photonic number distribution at the output end.
[0054] The input photonic state can be a Fock state, which specifically refers to an eigenstate describing a light field state with a certain number of photons. The Fock state is marked by the number of photons, which represents a quantum state with a specific number of photons in the light field.
[0055] The unitary matrix is used to represent the interference behavior of photons propagating between multiple waveguides, and can be realized by a cascaded structure of beam splitters and phase shifters. Specifically, it can be obtained by mapping a linear interference network composed of a series of beam splitters and phase shifters, for example, a combination of a series of 2x2 beam splitters and phase shifters. The parameters of the unitary matrix (such as beam splitter angle and phase shifter phase) can be optimized by gradient descent.
[0056] S103, measuring the initial optical quantum circuit, and determining the target function corresponding to the initial optical quantum circuit according to the measurement result.
[0057] Optionally, the initial optical quantum circuit can be evolved, and the output end of the initial optical quantum circuit can be measured by photonic number resolution to obtain a measurement result, so as to construct the target function corresponding to the initial optical quantum circuit according to the measurement result.
[0058] The measurement result can be the output probability distribution of the initial optical quantum circuit, and the output probability distribution of the initial optical quantum circuit is essentially a Fourier series expansion of the input phase.
[0059] The target function corresponding to the initial optical quantum circuit refers to a function obtained by inputting and evolving and measuring the quantum state of the initial optical quantum circuit. The target function can express the initial optical quantum circuit.
[0060] S104, determine the loss information of the target function, determine whether to apply the initial optical quantum circuit according to the loss information, if yes, take the initial optical quantum circuit as the target optical quantum circuit; if not, iteratively adjust the initial optical quantum circuit, and take the initial optical quantum circuit at the end of iteration as the target optical quantum circuit.
[0061] Optionally, after obtaining the target function, the loss information of the target function can be determined according to the preset loss function, and whether to apply the initial optical quantum circuit can be determined according to the loss information of the target function, if yes, the initial optical quantum circuit is taken as the target optical quantum circuit.
[0062] Optionally, if not, the initial optical quantum circuit is iteratively adjusted according to the loss information, and the target function and the loss information of the target function are re-determined until the iteration ends, and the initial optical quantum circuit at the end of iteration is taken as the target optical quantum circuit.
[0063] The loss information is used to indicate the difference between the target function and the nonlinear function.
[0064] Exemplarily, the target function can be calculated according to the preset loss function and the regularization term to obtain the loss information. The preset loss function can be mean square error, etc.
[0065] Exemplarily, the unitary matrix and the phase shifter in the initial optical quantum circuit can be adjusted, for example, the parameters of the unitary matrix can be adjusted, or the number of the phase shifter can be adjusted. The waveguide number and the photon number in the initial optical quantum circuit can also be adjusted.
[0066] S105, based on the target optical quantum circuit, the input data of the nonlinear layer is operated to generate the output data of the nonlinear layer.
[0067] Optionally, after obtaining the target optical quantum circuit, the input data of the nonlinear layer can be operated based on the target optical quantum circuit to generate the output data of the nonlinear layer.
[0068] Optionally, after obtaining the target optical quantum circuit, the target optical quantum circuit can be taken as an optical quantum chip to construct an optical quantum computer.
[0069] Exemplarily, the target optical quantum circuit can be taken as a physical activation unit in a neural network, so that the neural network can autonomously "learn" and "evolve" the optimal activation function form for a specific task in the training process, instead of passively using the preset ReLU or Sigmoid. It helps to significantly improve the model accuracy and convergence speed, and opens up a new paradigm of "algorithm-hardware co-design".
[0070] Exemplarily, the target optical quantum circuit can also be the core of a physical reservoir in a high-dimensional nonlinear dynamic system, and the target optical quantum circuit is used to map the input data of the nonlinear layer into a complex feature space with high performance to generate the output data of the nonlinear layer. In this process, the state evolution speed of the target optical quantum circuit is close to the speed of light, and the energy consumption is extremely low. The target optical quantum circuit can be applied to any time series task requiring high-speed real-time decision, such as speech recognition, financial prediction, etc.
[0071] In the embodiment, by obtaining the nonlinear function and the attribute information of the nonlinear layer, the initial optical quantum circuit is constructed according to the spectrum number of the nonlinear function and the attribute information, and the initial optical quantum circuit is measured, so that the target function can be determined according to the measurement result, and the target optical quantum circuit is obtained according to the loss information of the target function, so that the input data of the nonlinear layer can be operated based on the target optical quantum circuit. Not only can the target optical quantum circuit corresponding to the nonlinear layer of any complexity be determined equivalently and deterministically, but also the expression capability of the nonlinear layer is improved. The operation of the input data of the nonlinear layer in the optical domain is also completed, and the energy consumption in the operation process of the nonlinear layer is reduced. That is, the low-energy-consumption characteristic of photonic computing, the nonlinear characteristic of optical quantum computing, and the general programmable capability of electronic computing can be combined to perform high-energy-efficient computing on the input data of the nonlinear layer.
[0072] Meanwhile, the obtained target optical quantum circuit can also be used as a physical activation unit in a neural network, so that the neural network can autonomously 'learn' and 'evolve' the optimal activation function form for a specific task during the training process, which helps to significantly improve the model accuracy and convergence speed of the neural network. When training the network, the overall performance, efficiency and function can be maximized through the deep coupling of algorithm design and hardware implementation. Moreover, due to the photonic properties of the target optical quantum circuit, the obtained target optical quantum circuit can also be applied to any time series task requiring high-speed real-time decision, such as speech recognition, financial prediction, etc.
[0073] In addition, the target optical quantum circuit obtained by the present application has the advantages of smaller required quantum circuit complexity and no need for the participation of nonlinear optical devices, which can significantly improve the usability, practicality and value of quantum hardware in actual applications in the current development stage of noisy intermediate-scale quantum computing. In addition, the nonlinear data generation and processing method based on optical quantum provided by the present application can also be applied to parallel or distributed high-performance optical quantum computing clusters, and deployed to the fields of financial processing, logistics manufacturing and artificial intelligence through hyper-converged and other ways.
[0074] As a possible implementation manner, the process of constructing the initial optical quantum circuit corresponding to the nonlinear function is exemplarily described below. Figure 2A flowchart for constructing an initial optical quantum circuit corresponding to a nonlinear function in a method for generating and processing nonlinear data based on optical quanta provided by the embodiments of the present application is shown in FIG. 10. Referring to FIG. 10, the initial optical quantum circuit corresponding to the nonlinear function is constructed in S102 according to the spectral number of the nonlinear function and the attribute information of the nonlinear function, including: Figure 2 The initial optical quantum circuit corresponding to the nonlinear function is constructed in S102 according to the spectral number of the nonlinear function and the attribute information of the nonlinear function, including: S201, determining an optical quantum parameter according to the spectral number of the nonlinear function.
[0075] It can be understood that the more the spectral number of the nonlinear function, the higher the complexity of the optical quantum circuit.
[0076] Optionally, the optical quantum parameter can be matched from a preset mapping relationship between the spectral number and the optical quantum parameter according to the spectral number of the nonlinear function.
[0077] The optical quantum parameter at least includes the number of waveguides, the number of phase shifters, and the number of photons. The optical quantum parameter can also include the size of the unitary matrix.
[0078] For example, when the spectral number is 2, the number of waveguides can be 2, the number of photons can be 2, the number of phase shifters can be 1, and the size of the unitary matrix can be 2*2.
[0079] By determining the optical quantum parameter according to the spectral number of the nonlinear function, the expression ability of the obtained target optical quantum circuit can be matched with the complexity of the nonlinear function, thereby improving the expression ability of the obtained target optical quantum circuit for the nonlinear function.
[0080] S202, constructing an initial optical quantum circuit according to the optical quantum parameter, the attribute information of the nonlinear function, and a preset optical quantum circuit architecture.
[0081] Optionally, the initial optical quantum circuit can be constructed according to the obtained optical quantum parameter, the attribute information of the nonlinear function, and the preset optical quantum circuit architecture.
[0082] For example, the preset optical quantum circuit architecture can be obtained, and the optical quantum circuit architecture can be adjusted according to the information indicated by the optical quantum parameter and the attribute information of the nonlinear function, thereby obtaining the initial optical quantum circuit.
[0083] The preset optical quantum circuit architecture is the architecture of the unitary matrix-phase shifter-unitary matrix.
[0084] The light quantum parameter is determined through the spectrum quantity of the nonlinear function, so that the initial light quantum circuit is constructed according to the light quantum parameter, attribute information of the nonlinear function and a preset light quantum circuit architecture, which can improve the construction efficiency and stability of the light quantum circuit, reduce the training cost and improve the convergence success rate. Meanwhile, the low energy consumption characteristic of the photon computing, the nonlinear characteristic of the light quantum computing and the general programmable ability of the electronic computing can be fused to realize the nonlinear layer processing with high energy efficiency and high precision.
[0085] As a possible implementation manner, Figure 3 A flowchart for determining a light quantum parameter in a light quantum-based nonlinear data generation and processing method provided by an embodiment of the present application is shown in FIG. 2. Figure 3 As shown in FIG. 2, the determination of the light quantum parameter according to the spectrum quantity of the nonlinear function in S201 includes the following steps. S301: Obtain preset photon number preference information.
[0086] Optionally, the preset photon number preference information can be obtained.
[0087] The photon number preference information is used to indicate the expected initial input photon state when the initial light quantum circuit is constructed. For example, the photon number preference information can be 2, that is, the expected input photon state is a quantum state containing exactly two photons.
[0088] S302: Determine the light quantum parameter according to the spectrum quantity of the nonlinear function and the photon number preference information.
[0089] Optionally, the light quantum parameter can be determined according to the spectrum information of the nonlinear function, the photon number preference information and a preset light quantum parameter determination rule.
[0090] For example, the waveguide number can be the same as the spectrum quantity, the photon number can be determined according to the spectrum quantity, and the number of phase shifters can be the waveguide number minus 1. For example, when the spectrum quantity is 2, the waveguide number can be 2, the photon number can be 2, the number of phase shifters can be 1, and the size of the unitary matrix can be 2*2.
[0091] The light quantum parameter is determined through the spectrum quantity of the nonlinear function and the photon number preference information, which can match the expression ability of the light quantum circuit with the complexity of the nonlinear function, and can allocate the light quantum resources on demand, so as to improve the expression ability of the obtained target light quantum circuit to the nonlinear function on the premise of efficient utilization of the light quantum resources.
[0092] As a possible implementation manner, Figure 4 A flowchart for constructing a light quantum circuit in a light quantum-based nonlinear data generation and processing method provided by an embodiment of the present application is shown in FIG. 3. Figure 4As shown in the above, the initial optical quantum circuit is constructed according to the light quantum parameter, the attribute information of the nonlinear function, and the preset optical quantum circuit architecture in S202, including: S401, according to the light quantum parameter and the preset optical quantum circuit architecture, an intermediate optical quantum circuit is configured.
[0093] The preset optical quantum circuit architecture can include three layers, wherein the first layer is a unitary matrix, which is composed of a beam splitter and a phase shifter, and is used to construct an arbitrary unitary transformation, the second layer is a phase shifter, which is composed of an adjustable phase shifter, and is used to introduce a controllable relative phase, and the third layer is a unitary matrix, which is composed of a beam splitter and a phase shifter, and is used to adjust the output mode.
[0094] Optionally, the dimension of the initial optical quantum circuit can be determined according to the waveguide number, and the number of beam splitters and phase shifters required can be calculated according to the waveguide number, and the parameters of each beam splitter and phase shifter are configured, so as to obtain the intermediate optical quantum circuit.
[0095] Exemplarily, taking the waveguide number as 4, the photon number as 2, and the phase shifter number as 3 as an example, the 2*2 unitary matrix can be decomposed by using Clements to obtain the intermediate optical quantum circuit. The first layer of the intermediate optical quantum circuit includes six beam splitters and six phase shifters, the second layer includes three phase shifters, and the third layer includes six beam splitters and six phase shifters.
[0096] S402, according to the attribute information of the nonlinear function, the intermediate optical quantum circuit is configured again to obtain the initial optical quantum circuit.
[0097] Optionally, the input state of the intermediate optical quantum circuit can be encoded according to the attribute information of the nonlinear function, so as to realize the secondary configuration of the initial optical quantum circuit, and obtain the intermediate optical quantum circuit.
[0098] As a possible implementation manner, Figure 5 A flowchart for obtaining an initial optical quantum circuit in a nonlinear data generation and processing method based on optical quantum provided by the embodiment of the present application is shown in Figure 5 As shown in the above, the initial optical quantum circuit is constructed according to the light quantum parameter, the attribute information of the nonlinear function, and the preset optical quantum circuit architecture in S202, including: S501, according to the definition domain information, the input variable of the intermediate optical quantum circuit is determined.
[0099] Optionally, the definition domain information can be discretized to obtain the input variable of the intermediate optical quantum circuit according to the preset discretization granularity.
[0100] S502, determine the phase of the phase shifter in the intermediate optical quantum circuit according to the input variable, and configure the intermediate optical quantum circuit according to the phase of the phase shifter to obtain the initial optical quantum circuit.
[0101] Optionally, the input variable can be mapped to the phase of the phase shifter in the intermediate optical quantum circuit, and the intermediate optical quantum circuit is configured according to the phase of the phase shifter to obtain the initial optical quantum circuit.
[0102] Exemplarily, the input variable can be mapped to the phase of the phase shifter in the intermediate optical quantum circuit in the order of the input variable, and the phase angle of the phase shifter in the intermediate optical quantum circuit is adjusted according to the phase of the phase shifter to obtain the initial optical quantum circuit.
[0103] As a possible implementation, the determination of the phase of the phase shifter in the intermediate optical quantum circuit according to the input variable in S502 comprises: According to the input variable and the index information corresponding to the phase shifter in the intermediate optical quantum circuit, the phase of the phase shifter in the intermediate optical quantum circuit is determined.
[0104] Optionally, the phase of the phase shifter in the intermediate optical quantum circuit can be calculated according to the input variable and the index information corresponding to the phase shifter in the intermediate optical quantum circuit.
[0105] Exemplarily, taking the input variable x as an example, assuming that the current phase shifter is the i th phase shifter in the optical quantum circuit, the phase of the i th phase shifter can be calculated as i * x.
[0106] By inputting the variable and the index information corresponding to the phase shifter in the optical quantum circuit, the phase of the phase shifter in the optical quantum circuit can be determined, which can map the input variable to the parameters of multiple phase shifters, and the parameter of each phase shifter is proportional to its index, so that the influence of the input variable on the initial optical quantum circuit has linear expansion, thereby improving the number of Fourier spectrum and realizing the function expression and optimization capability of the optical quantum circuit.
[0107] The above describes the process of constructing the initial optical quantum circuit corresponding to the nonlinear function, and it can be understood that after the initial optical quantum circuit is constructed, the initial optical quantum circuit can be measured, and the target function corresponding to the initial optical quantum circuit is determined according to the measurement result, which will be described in detail below.
[0108] As a possible implementation, Figure 6 A flowchart for determining the target function corresponding to the initial optical quantum circuit in the optical quantum-based nonlinear data generation and processing method provided by the embodiments of the present application is provided with reference to Figure 6As shown, in S103 above, the initial quantum circuit is measured, and the objective function corresponding to the initial quantum circuit is determined based on the measurement results, including: S601. Perform photon number-resolved measurement on the initial photonic quantum circuit and obtain the measurement results.
[0109] Optionally, the initial photonic quantum circuit can be evolved multiple times, and the evolved initial photonic quantum circuit can be measured with photon number resolution. After each evolution, a multiphoton event is obtained, and the multiple multiphoton events obtained by sampling are statistically analyzed to obtain the measurement result.
[0110] The measurement results are used to indicate the probability distribution of multiphoton events.
[0111] S602. The measurement results are weighted and summed to calculate the objective function corresponding to the initial photonic quantum circuit.
[0112] Optionally, each event in the measurement results is assigned a preset weight corresponding to that event, and the weights are summed to calculate the objective function corresponding to the initial quantum circuit.
[0113] The weighted summation of the measurement results is essentially a Fourier series expansion of the input phase.
[0114] By performing photon number-resolved measurements on the initial quantum circuit, the measurement results are obtained, and the target function corresponding to the initial quantum circuit is calculated by weighted summation. Through measurement and statistics, the "physical output" of the initial quantum circuit can be transformed into a "mathematical function", so that the initial quantum circuit is no longer a "black box" but a mathematical function with a clear input-output mapping, thereby improving the interpretability and controllability of the initial quantum circuit.
[0115] As one possible implementation method, Figure 7 This is a schematic flowchart illustrating the process of obtaining measurement results in the nonlinear data generation and processing method based on photonics provided in this application embodiment, with reference to... Figure 7 As shown, the above-mentioned S601 performs photon number-resolved measurements on the initial optical quantum circuit and obtains the measurement results, including: S701. Input the preset input state into the initial photonic quantum circuit and evolve it to obtain the output state.
[0116] Optionally, a preset input state is input into the initial photonic quantum circuit, and the input state is transformed into an output photonic state through the evolution of optical elements in the initial photonic quantum circuit.
[0117] S702. Perform photon number resolution measurement on the output state and count multiphoton events to obtain the measurement results.
[0118] Optionally, the photon number resolving measurement is performed on the multiple output states by the detector, and statistical sampling is performed to obtain a sampling result, and the frequency of occurrence of each event is calculated according to the sampling result to obtain a measurement result.
[0119] The measurement result can be a probability distribution of the multi-photon event, and the probability distribution can reflect the distribution of the quantum state output by the initial optical quantum circuit in different modes under the current input state.
[0120] As a possible implementation, Figure 8 A flowchart for determining whether to apply an initial optical quantum circuit in a method for generating and processing nonlinear data based on optical quantum provided by an embodiment of the present application is shown in FIG. 8. Figure 8 As shown in FIG. 8, S104 determines whether to apply the initial optical quantum circuit according to the loss information, including: S801, if the loss information is less than a preset loss threshold, it is determined to apply the initial optical quantum circuit.
[0121] Optionally, if the loss information is less than the preset loss threshold, it can be determined to apply the initial optical quantum circuit.
[0122] S802, if the loss information is greater than the preset loss threshold, the unitary matrix in the initial optical quantum circuit is adjusted according to the loss information.
[0123] Optionally, if the loss information is greater than the preset loss threshold, the unitary matrix in the initial optical quantum circuit can be adjusted according to the loss information by using an end-to-end backpropagation algorithm, and S103-S104 can be re-executed.
[0124] The parameters of the unitary matrix in the initial optical quantum circuit can be updated according to the loss information, so that the target function can better approximate the nonlinear function.
[0125] For example, the parameters of the unitary matrix can be used as trainable variables, the gradient of the loss information with respect to the parameters of the unitary matrix can be calculated by backpropagation according to the loss information, and the parameters of the unitary matrix can be updated based on the gradient by using an optimizer such as Adam or RMSProp.
[0126] By adjusting the unitary matrix in the optical quantum circuit, the function output by the target optical quantum circuit can be approximated to the target function by controlling the photon interference path, so as to realize the physical expression of the nonlinear function.
[0127] Based on the same inventive concept, the embodiment of the present application also provides a light quantum-based nonlinear data generation and processing device corresponding to the light quantum-based nonlinear data generation and processing method. Since the principle of solving problems in the device of the embodiment of the present application is similar to the light quantum-based nonlinear data generation and processing method described above, the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.
[0128] With reference to Figure 9 as shown, Figure 9 A schematic diagram of a light quantum-based nonlinear data generation and processing device provided by the embodiment of the present application is shown in the figure. The device comprises an acquisition module 901, a construction module 902, a determination module 903 and an operation module 904. The acquisition module 901 is configured to acquire a nonlinear function of a nonlinear layer and attribute information of the nonlinear function, wherein the attribute information at least comprises domain information. The construction module 902 is configured to construct an initial light quantum circuit corresponding to the nonlinear function according to the spectral number of the nonlinear function and the attribute information of the nonlinear function, wherein the initial light quantum circuit at least comprises a unitary matrix and a phase shifter. The determination module 903 is configured to measure the initial light quantum circuit and determine a target function corresponding to the initial light quantum circuit according to a measurement result. The determination module 903 is further configured to determine loss information of the target function, determine whether to apply the initial light quantum circuit according to the loss information, if yes, take the initial light quantum circuit as a target light quantum circuit, and if not, iteratively adjust the initial light quantum circuit and take the initial light quantum circuit at the end of iteration as the target light quantum circuit. The operation module 904 is configured to operate input data of the nonlinear layer based on the target light quantum circuit to generate output data of the nonlinear layer.
[0129] Optionally, the construction module 902 is specifically configured to: determine a light quantum parameter according to the spectral number of the nonlinear function, wherein the light quantum parameter at least comprises a waveguide number, a phase shifter number and a photon number; construct the initial light quantum circuit according to the light quantum parameter, the attribute information of the nonlinear function and a preset light quantum circuit architecture.
[0130] Optionally, the construction module 902 is specifically configured to: acquire preset photon number preference information; determine the light quantum parameter according to the spectral number of the nonlinear function and the photon number preference information.
[0131] Optionally, the construction module 902 is specifically configured to: According to the light quantum parameter and the preset light quantum circuit architecture, an intermediate light quantum circuit is configured; According to the attribute information of the nonlinear function, the intermediate light quantum circuit is configured again to obtain an initial light quantum circuit.
[0132] Optionally, the configuration module 902 is specifically configured to: According to the domain information, an input variable of the intermediate light quantum circuit is determined; According to the input variable, a phase of a phase shifter in the intermediate light quantum circuit is determined, and the intermediate light quantum circuit is configured according to the phase of the phase shifter to obtain the initial light quantum circuit.
[0133] Optionally, the configuration module 902 is specifically configured to: According to the input variable and index information corresponding to the phase shifter in the intermediate light quantum circuit, the phase of the phase shifter in the intermediate light quantum circuit is determined.
[0134] Optionally, the determination module 903 is specifically configured to: Photon number resolving measurement is performed on the initial light quantum circuit to obtain a measurement result, and the measurement result is used to indicate a multi-photon event probability distribution; The measurement result is weighted and summed to calculate a target function corresponding to the initial light quantum circuit.
[0135] Optionally, the determination module 903 is specifically configured to A preset input state is input into the light quantum circuit to obtain an output state; Photon number resolving measurement is performed on the output state, and a multi-photon event is counted to obtain a measurement result.
[0136] Optionally, the determination module 903 is specifically configured to: If the loss information is less than a preset loss threshold, it is determined that the initial light quantum circuit is applied; If the loss information is greater than the preset loss threshold, a unitary matrix in the initial light quantum circuit is adjusted according to the loss information.
[0137] The description of the processing flow of each module in the device and the interaction flow between the modules can refer to the related description in the above method embodiments, and will not be described in detail here.
[0138] Embodiments of the present application also provide a light quantum computer, which comprises the above target light quantum circuit, a single photon source and a photon detector.
[0139] The target light quantum circuit, the single photon source and the photon detector are optically connected. The photon detector can be a single photon detector.
[0140] Among them, optical quantum computers are quantum computing devices that use photons (light particles) as qubits for information processing. Single photon sources generate high-quality single photons as qubit carriers by exciting quantum dots with lasers or by spontaneous parametric downconversion (SPDC).
[0141] The target optical quantum circuit is obtained by executing the steps of the above-mentioned nonlinear data generation and processing method based on optical quantum. Specifically, it is composed of optical components such as optical fiber, waveguide, beam splitter, phase modulator, and mirror to realize optical transmission and interference, information encoding and logic operation (such as Hadamard gate and CNOT gate).
[0142] The single-photon detector measures the final state of a photon (such as the Fock state or path) and outputs the calculation results. For details on the specific processing procedures of an optical quantum computer, please refer to the relevant technical descriptions, which will not be elaborated upon here.
[0143] This application also provides an electronic device, such as... Figure 10 As shown, Figure 10 The schematic diagram of the electronic device structure provided in the embodiments of this application includes: a processor 1001, a memory 1002, and optionally, a bus 1003. The memory 1002 stores machine-readable instructions executable by the processor 1001 (e.g., ...). Figure 9 The device includes the acquisition module 901, the construction module 902, the determination module 903, and the execution instructions corresponding to the calculation module 904. When the electronic device is running, the processor 1001 and the memory 1002 communicate through the bus 1003. When the machine-readable instructions are executed by the processor 1001, the steps of the above-mentioned nonlinear data generation and processing method based on photons are executed.
[0144] This application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the above-described nonlinear data generation and processing method based on photons.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in the present application. In the several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed modules can be indirect coupling or communication connection through some communication interface, device or module, and can be electrical, mechanical or other forms.
[0146] In addition, each functional unit in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. If the function is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk, and various program codes that can be stored in the medium.
[0147] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for generating and processing nonlinear data based on photonic quantum mechanics, characterized in that, include: Obtain the nonlinear function of the nonlinear layer and the attribute information of the nonlinear function, wherein the attribute information includes at least: domain information; Based on the number of spectra of the nonlinear function and the attribute information of the nonlinear function, an initial optical quantum circuit corresponding to the nonlinear function is constructed. The initial optical quantum circuit includes at least a unitary matrix and a phase shifter. The initial optical quantum circuit is measured, and the objective function corresponding to the initial optical quantum circuit is determined based on the measurement results. Determine the loss information of the objective function, and determine whether to apply the initial quantum circuit based on the loss information. If yes, use the initial quantum circuit as the target quantum circuit; otherwise, iteratively adjust the initial quantum circuit and use the initial quantum circuit at the end of the iteration as the target quantum circuit. The input data of the nonlinear layer is processed based on the target optical quantum circuit to generate the output data of the nonlinear layer.
2. The method for generating and processing nonlinear data based on photonic quantum as described in claim 1, characterized in that, The step of constructing the initial photonic quantum circuit corresponding to the nonlinear function based on the number of spectra of the nonlinear function and the attribute information of the nonlinear function includes: Based on the number of spectra of the nonlinear function, the photonic quantum parameters are determined, and the photonic quantum parameters include at least: the number of waveguides, the number of phase shifters, and the number of photons; The initial quantum circuit is constructed based on the quantum parameters, the property information of the nonlinear function, and the preset quantum circuit architecture.
3. The method for generating and processing nonlinear data based on photonic quantum as described in claim 2, characterized in that, Determining the photonic quantum parameters based on the number of spectra of the nonlinear function includes: Obtain preset photon number preference information; The photon parameters are determined based on the number of spectra of the nonlinear function and the photon number preference information.
4. The method for generating and processing nonlinear data based on photonic quantum as described in claim 2, characterized in that, The step of constructing the initial quantum circuit based on the quantum parameters, the property information of the nonlinear function, and the preset quantum circuit architecture includes: Based on the aforementioned photon parameters and the preset photon circuit architecture, an intermediate photon circuit is configured. Based on the property information of the nonlinear function, the intermediate quantum circuit is configured a second time to obtain the initial quantum circuit.
5. The method for generating and processing nonlinear data based on photonic quantum as described in claim 4, characterized in that, The step of performing secondary configuration on the intermediate quantum circuit based on the property information of the nonlinear function to obtain the initial quantum circuit includes: Based on the defined domain information, the input variables of the intermediate optical quantum circuit are determined; Based on the input variables, the phase of the phase shifter in the intermediate quantum circuit is determined, and the intermediate quantum circuit is configured according to the phase of the phase shifter to obtain the initial quantum circuit.
6. The method for generating and processing nonlinear data based on photonic quantum as described in claim 5, characterized in that, Determining the phase of the phase shifter in the intermediate quantum optical circuit based on the input variables includes: The phase of the phase shifter in the intermediate quantum circuit is determined based on the input variables and the index information corresponding to the phase shifter in the intermediate quantum circuit.
7. The method for generating and processing nonlinear data based on photonic quantum as described in claim 1, characterized in that, The step of measuring the initial quantum circuit and determining the target function corresponding to the initial quantum circuit based on the measurement results includes: A photon number-resolved measurement is performed on the initial optical quantum circuit to obtain the measurement result, which is used to indicate the probability distribution of multiphoton events. The objective function corresponding to the initial quantum circuit is calculated by weighted summation of the measurement results.
8. The method for generating and processing nonlinear data based on photonic quantum as described in claim 7, characterized in that, The step of performing photon number-resolved measurements on the initial optical quantum circuit to obtain measurement results includes: The preset input state is input into the optical quantum circuit and evolved to obtain the output state; The output state is subjected to photon number-resolved measurement, and multi-photon events are statistically analyzed to obtain the measurement results.
9. The method for generating and processing nonlinear data based on photonic quantum as described in claim 1, characterized in that, The step of determining whether to apply the initial quantum circuit based on the loss information includes: If the loss information is less than a preset loss threshold, then the initial optical quantum circuit is determined to be applied; If the loss information is greater than a preset loss threshold, then the unitary matrix in the initial photonic quantum circuit is adjusted according to the loss information.
10. A nonlinear data generation and processing device based on photonic quantum, characterized in that, include: The acquisition module is used to acquire the nonlinear function of the nonlinear layer and the attribute information of the nonlinear function, wherein the attribute information includes at least: domain information; A construction module is used to construct an initial quantum circuit corresponding to the nonlinear function based on the number of spectra of the nonlinear function and the attribute information of the nonlinear function. The initial quantum circuit includes at least a unitary matrix and a phase shifter. The determination module is used to measure the initial optical quantum circuit and determine the target function corresponding to the initial optical quantum circuit based on the measurement results; The determining module is further configured to determine the loss information of the objective function, and determine whether to apply the initial quantum circuit based on the loss information. If so, the initial quantum circuit is used as the target quantum circuit; if not, the initial quantum circuit is iteratively adjusted, and the initial quantum circuit at the end of the iteration is used as the target quantum circuit. The computation module is used to perform computations on the input data of the nonlinear layer based on the target optical quantum circuit, and generate the output data of the nonlinear layer.
11. An optical quantum computer, characterized in that, The optical quantum computer includes: a target optical quantum circuit obtained by performing the method described in any one of claims 1-9.
Citation Information
Patent Citations
Quantum circuit-based nonlinear equation set solving method and device
CN114969629A
Artificial intelligence-oriented neural unit implementation method and circuit
CN115049050A
Data processing method for neural network training, quantum computing device and medium
CN118966298A
Method and device for generating parameterized quantum circuit, terminal equipment and storage medium
CN119476513A
Assistive processing method and apparatus for quantum machine learning, device, and system
WO2025156776A1
Cited By
Construction method and device of light quantum computing system, medium and light quantum computer
CN121503720A
Non-linear data generation and processing method based on light quantum and light quantum computer
CN121543754A
Nonlinear data generation and processing method based on optical quantum and optical quantum computer
CN121543754B
