A quantum phase sensor and a quantum circuit implementation method thereof

CN118446324BActive Publication Date: 2026-09-22UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410529745.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-29
Publication Date
2026-09-22
Estimated Expiration
2044-04-29

AI Technical Summary

Technical Problem

现有的QNN中,大部分虽然包含量子态的特性计算,但仍然具有指数级参数计算量;有些在输入到输出的量子态变换的特性计算上也存在问题

Benefits of technology

[0025]由上述本发明提供的技术方案可以看出,使用的三种幺正操作函数都是量子计算中的基本量子门,能够直接采用量子线路实现,而且量子相位感知器将n位输入,通过相位的叠加运算,采用s≥1个网络输出节点的量子态表示出来,将输出随输入变量指数增长的运算问题转化为多项式叠加运算;能够以更加简单的网络结构、更少的网络权值、更短的运行时间和更高的效率,以随n输入变量多项式增长的计算复杂度,得到经典神经网络在结构、权值数量以及运行时间方面需要指数增加的计算复杂度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118446324B_ABST
    Figure CN118446324B_ABST
Patent Text Reader

Abstract

The application discloses a quantum phase sensor and a quantum circuit implementation method thereof, which are one-to-one corresponding solutions, wherein three kinds of unitary operation functions used in the solutions are basic quantum gates in quantum computation, can be directly implemented by using quantum circuits, and the quantum phase sensor can express n-bit input through superposition operation of phases, adopt quantum states of s>=1 network output nodes, and convert an operation problem of exponential growth of output with input variables into a polynomial superposition operation; the quantum phase sensor can obtain the calculation complexity of exponential growth of classical neural network in structure, weight quantity and running time by using a simpler network structure, fewer network weights, shorter running time and higher efficiency, and the calculation complexity of exponential growth of classical neural network in structure, weight quantity and running time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum computing and quantum circuit implementation technology, and in particular to a quantum phase sensor and its quantum circuit implementation method. Background Technology

[0002] Classical artificial neural networks (BLNNs) are a fundamental model of modern artificial intelligence (AI). Due to their strong generalization ability and parallel processing capability for nonlinear information, they have achieved great success in applications such as function approximation, pattern recognition, and image processing, becoming a research hotspot in AI and other interdisciplinary fields. The basic principle of classical neural networks is to construct a mathematical model that approximates the characteristics of biological neural networks, simulating how organisms process information to simulate and approximate the characteristics of the network input data. Unlike classical computers where n bits depend solely on the storage level and can only process one bit of 0 or 1 data at a time, a qubit (or quantum bit) can represent the superposition of the quantum ground states |0> and |1>, where |·> is the symbol for the quantum state. A single computation can process information from both states |0> and |1> simultaneously. A classical computer would require 2^n bits to perform the same computation on n bits of data. n While a quantum computer requires only one operation on n qubits, a quantum computer only needs to perform one operation on n qubits. Therefore, quantum computing theoretically far surpasses classical computing in both data storage and processing capabilities. Quantum neural networks use qubits as the basic information processing unit, giving them the potential for simpler quantum state representations and significantly improved computational efficiency and performance in their network construction and many practical applications. This could potentially solve the problem of resolving the 2^n qubit operations required in an n-qubit quantum system, which is difficult to address using numerical iterative optimization algorithms. n The neural network addresses the "exponential wall" problem, such as parameter reconstruction. At the same time, with the generalization ability inherent in neural networks, it can become a quantum state generation model. It provides an important theoretical foundation and implementation technology for many practical applications, such as faster high-qubit reconstruction, quantum computing, a large class of NP-hard problems implemented by polynomials, and high-precision quantum state feedback control. It has significant theoretical and potential practical application value.

[0003] The concept of Quantum Neural Networks (QNNs) was first proposed by Kak in 1995. Subsequently, scholars from various countries proposed various types of QNN models from different perspectives. The basic idea is to realize the basic structure of the neural network by incorporating quantum computing mechanisms, in order to utilize the storage and computing power advantages of quantum computing to achieve more efficient or intelligent learning capabilities. In 1998, Ventura et al. combined the superposition principle in quantum theory and replaced the weight vector of the network with the quantum state representation in Hilbert space. The training of the neural network corresponds to the evolution of these quantum states. In 2001, Altaisky proposed a physically simple and feasible quantum neural network. The input and output of this quantum neural network can be realized using polarized light, and the weights of the network can be realized using a planar beam splitter. In 2015, Schold et al. proposed a quantum perceptron model based on the quantum phase estimation (QPE) algorithm. By writing the input signal onto the probability amplitude of the quantum state and performing the inverse quantum Fourier transform, the signal is read in with a certain degree of precision. The model contains m = n(p+q) qubits encoding inputs and weights, where p and q are the number of nodes in the hidden layer network, and the corresponding unitary transform U contains O(2^p + q) qubits. m The number of parameters is on the order of 1 / 2, resulting in an exponential number of parameters. In 2019, Liu et al. proposed a neural network based on a two-dimensional tree tensor network (TTN) structure and a training method derived from the multi-scale entanglement renormalization ansatz (MERA) hypothesis, which were applied to classifying handwritten digit images and encoding image information in quantum many-body states. Generally, accurately preparing a quantum state with n qubits requires O(2^n) qubits. n The generation of probability distributions using quantum adversarial networks requires only O(poly(n)) quantum gates, demonstrating a potential quantum advantage; where poly(n) refers to a polynomial consisting of the sum and difference of n monomials, and O(.) refers to the order of the result calculated in parentheses.

[0004] When a qubit x>, take or At this time, the values ​​of 0 or 1 are equal to those of a classical bit in a macroscopic computer. However, unlike a classical bit, |0> and |1> are only two ground states of a qubit. They form an orthogonal basis in a two-dimensional Hilbert space. A qubit state can also be in any linear superposition state composed of 0> and 1>. superior:

[0005]

[0006] Among them, complex numbers and quantum state The probability amplitude, the square of a probability amplitude or To measure the probability corresponding to the state |0> or |1>, and satisfying

[0007] When the number of input qubits (input nodes) n = 2 and the number of output nodes s = 1, the orthogonal ground state composed of the two inputs x1 and x2 has 2 n =2 2 =4: |x2x1>={00>,|01>,|10>,|11>}:

[0008]

[0009]

[0010] in, It is the mathematical symbol for direct product.

[0011] The four orthogonal ground states, composed of two inputs, are input into a quantum neural network, resulting in an output state of the network. When represented using the ground state:

[0012]

[0013] Where: complex number Output status The probability amplitude,

[0014] The output state represented by formula (2b) It is a quantum state in 4-dimensional space. Therefore, it can be seen that as the number of qubits n increases, the quantum state output by the quantum neural network represented by the ground state... The orthogonal space it occupies has a dimension of 2. n In the design of classic neural network structures, the number of output nodes must be s = 2. n This leads to an exponential increase in the number of output nodes s as the number of input nodes n increases. For applications of high-dimensional input networks, this greatly increases the burden on the network structure, resulting in an exponential increase in the number of weights and computation time, which limits the efficiency of the network and restricts its application scope.

[0015] Quantum Neural Networks (QNNs) are computational models that satisfy the properties of quantum systems, have trainable parameters, possess a network structure, and can realize nonlinear function transformations between input and output. The design of a QNN model should consider its physical realizability, that is, it should be implemented using quantum gate circuits. While most existing QNNs include calculations of quantum state characteristics, they still involve exponential parameter computations; some also have problems in calculating the characteristics of quantum state transformations from input to output.

[0016] In order to design and construct a quantum neural network that not only possesses quantum computing characteristics but also reduces the computational complexity of exponential parameters to polynomial computational complexity and can be implemented using quantum gate circuits, this invention is proposed. Summary of the Invention

[0017] The purpose of this invention is to provide a quantum phase sensor and its quantum circuit implementation method, which has the advantages of simpler network structure, fewer network weights, shorter running time and higher efficiency.

[0018] The objective of this invention is achieved through the following technical solution:

[0019] A quantum phase sensor includes: n input nodes, a network layer consisting of three unitary operation functions, and s output nodes;

[0020] Each of the n input nodes receives variable data at its corresponding index position. Each input node is followed by a network layer consisting of three unitary operation functions, which are, in order, a phase encoding function for quantum state phase encoding, a weighted phase shift operation function for phase adjustment to move the quantum state, and a phase summation function for phase summation.

[0021] In this system, the output of each bit is the quantum state output after the variable data of each bit is processed by three unitary operation functions. When n=2, the output of the first bit is the result of the phase summation of the quantum state after the phase shift of the first bit and the quantum state after the phase shift of the second bit. When n>2, the phase summation starts from the (n-1)th bit and proceeds in a pairwise phase summation manner until the output of the first bit is obtained, so that the output of the first bit contains a fully connected operation of n inputs. The output of the nth bit is the result of the phase summation of the quantum state after the phase shift of the nth bit and the output of the first bit. When performing pairwise phase summation: the output of the (n-1)th bit is the result of the phase summation of the quantum state after the phase shift of the (n-1)th bit and the quantum state after the phase shift of the nth bit. From the (n-2)th bit to the first bit, the output of each bit is the result of the phase summation of the quantum state after the phase shift of its own bit and the output of the previous bit. When s=1, the output of the output node is a quantum state represented by the outputs of all bits. When s>1, the output of each output node is an arbitrary combination of the outputs of each bit.

[0022] A quantum circuit implementation method for realizing the aforementioned quantum phase sensor, wherein:

[0023] The variable data input by n input nodes is processed through three unitary operation functions, and output through s output nodes; the n input nodes respectively input the variable data corresponding to the index position, and each input node is connected to three unitary operation functions in sequence. The three unitary operation functions are, in order, a phase encoding function for quantum state phase encoding, a weighted phase shift operation function for phase adjustment to move the quantum state, and a phase summation function for phase summation.

[0024] In this system, the output of each bit is the quantum state output after the variable data of each bit is processed by three unitary operation functions. When n=2, the output of the first bit is the result of the phase summation of the quantum state after the phase shift of the first bit and the quantum state after the phase shift of the second bit. When n>2, the phase summation starts from the (n-1)th bit and proceeds in a pairwise phase summation manner until the output of the first bit is obtained, so that the output of the first bit contains a fully connected operation of n inputs. The output of the nth bit is the result of the phase summation of the quantum state after the phase shift of the nth bit and the output of the first bit. When performing pairwise phase summation: the output of the (n-1)th bit is the result of the phase summation of the quantum state after the phase shift of the (n-1)th bit and the quantum state after the phase shift of the nth bit. From the (n-2)th bit to the first bit, the output of each bit is the result of the phase summation of the quantum state after the phase shift of its own bit and the output of the previous bit. When s=1, the output of the output node is a quantum state represented by the outputs of all bits. When s>1, the output of each output node is an arbitrary combination of the outputs of each bit.

[0025] As can be seen from the technical solution provided by the present invention, the three unitary operation functions used are all basic quantum gates in quantum computing, which can be directly implemented using quantum circuits. Moreover, the quantum phase sensor takes n-bit input and, through the superposition operation of phase, represents it using the quantum states of s≥1 network output nodes, transforming the problem of output growing exponentially with the input variable into a polynomial superposition operation. It can achieve a computational complexity that requires an exponential increase in structure, number of weights, and running time of classical neural networks with a computational complexity that grows polynomially with n input variables, while achieving a simpler network structure, fewer network weights, shorter running time, and higher efficiency. Attached Figure Description

[0026] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A schematic diagram of a quantum phase sensor when s=n is provided in an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of a model generated by performing XOR (NOT) logic operations using a quantum phase sensor, provided in an embodiment of the present invention.

[0029] Figure 3 A schematic diagram of a quantum phase sensor with n=2 and s=4 provided in an embodiment of the present invention. Detailed Implementation

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

[0031] First, the following explanations are provided for the terms that may be used in this article:

[0032] The term "and / or" means that either or both can be achieved simultaneously. For example, X and / or Y means that it includes both "X" or "Y" as well as the three cases of "X and Y".

[0033] The terms “including,” “comprising,” “containing,” “having,” or other similar semantic descriptions should be interpreted as non-exclusive inclusion. For example, “including a technical feature element (such as raw material, component, ingredient, carrier, dosage form, material, size, part, component, mechanism, device, step, process, method, reaction conditions, processing conditions, parameter, algorithm, signal, data, product or article of manufacture, etc.)” should be interpreted as including not only the expressly listed technical feature element, but also other technical feature elements that are not expressly listed and are well-known in the art.

[0034] The term "composed of" excludes any technical features not expressly listed. When used in a claim, it closes the claim to exclude all technical features other than those expressly listed, except for associated conventional impurities. If the term appears only in a clause of a claim, it limits the claim to the elements expressly listed in that clause; elements recited in other clauses are not excluded from the overall claim.

[0035] The following is a detailed description of a quantum phase sensor and its quantum circuit implementation method provided by the present invention. Contents not described in detail in the embodiments of the present invention are prior art known to those skilled in the art. Where specific conditions are not specified in the embodiments of the present invention, they should be performed according to conventional conditions in the art or conditions recommended by the manufacturer.

[0036] Example 1

[0037] This invention provides a quantum phase perceptron (QPP), which mainly includes: n input nodes, a network layer composed of three unitary operation functions, and s output nodes. The quantum phase perceptron of this invention can be used to implement XOR logic operators that classical neural networks cannot solve; it can convert n binary input variables into a 2... n The output variables of an orthogonal basis space are implemented by using s output variables (s≥1) composed of different numbers of polynomials to solve the "exponential wall" problem. Taking image recognition as an example, the input variable data of each input node is the pixels in the image, and each output data represents the category corresponding to the input image being recognized. Therefore, the single-layer quantum phase perceptron of this invention is used to complete the image recognition problem of n*n pixel input and s categories of output that requires deep neural networks to solve.

[0038] Each of the n input nodes receives variable data corresponding to its index position. Each input node is followed by a network layer consisting of three unitary operation functions: a phase encoding function for quantum state phase encoding, a weighted phase shifting operation function for phase adjustment to move the quantum state, and a phase summing function for phase summation.

[0039] Each bit's output is the quantum state output after each bit's input variable data has been processed by three unitary operation functions. When n=2, the output of the first bit is the result of the phase summation of the quantum state after the phase shift of the first bit and the quantum state after the phase shift of the second bit. When n>2, the phase summation starts from the (n-1)th bit and proceeds in a pairwise phase summation manner until the output of the first bit is obtained, so that the output of the first bit contains a fully connected operation of n inputs, and at the same time, the space occupied by the first bit's output becomes 2.n The output of the nth position is the result of the phase summation of the quantum state after the phase shift of the nth position and the output of the first position. When summing the phases of each pair: the output of the (n-1)th position is the result of the phase summation of the quantum state after the phase shift of the (n-1)th position and the quantum state after the phase shift of the nth position. From the (n-2)th position to the first position, the output of each position is the result of the phase summation of the quantum state after the phase shift of its own position and the output of the previous position.

[0040] As can be seen from the technical solution provided by the present invention above: the number of input variables for each n-bit variable X = [x1, ..., x2] n ] represents the data from the highest-order variable x n The input is the least significant bit variable data x1; the output of the j-th (j = 1, 2, ..., s) bit is obtained by summing the quantum state after the j-th bit is shifted with the other input quantum states, and its output space is the original quantum bit 2. j Based on this, 2 were added n-j The dimension, starting from the n-1th position, increases from the original 2 n-1 The output space is increased to 2 by summing the phases of the two inputs. n-1 ×2 1 =2 n The network output obtained in this way is represented by each of the n-bit inputs. n The state in space. When s = 1, the output of the output node is a quantum state represented by the outputs of all bits; when s > 1, the output of each output node is any combination of the outputs of each bit. The QPP network completes the processing of the input variable data X = [x1, ..., x...]. n Through the action of a quantum phase sensor network, a 2D model corresponding to an n-bit input is obtained. n In a high-dimensional space composed of ground states, there are s outputs Y = [y1, ..., y2]. s ], 2 n The network output represented by the ground state, and the output represented by the precise polynomial or even single quantum state phase, solves the problem of the time consumption and the "exponential wall" that makes it difficult to achieve exponential output for n inputs under high input conditions.

[0041] Therefore, the above-mentioned solution provided by the present invention has the following advantages: the three unitary operation functions used in the embodiments of the present invention are all basic quantum gates in quantum computing and can be directly implemented using quantum circuits. QPP generates 2 from the direct product of n-bit input quantum states. nThe output quantum state in space is represented by the quantum state of s≥1 network output nodes through phase superposition operation, transforming the problem of exponential growth of output variables with input variables into polynomial superposition operation. It can achieve a computational complexity that increases exponentially with the structure, number of weights and running time of classical neural networks with a computational complexity that increases polynomially with n input variables, with a simpler network structure, fewer network weights, shorter running time and higher efficiency.

[0042] To more clearly demonstrate the technical solution and its effects provided by the present invention, the following detailed description of the solution provided by the embodiments of the present invention is provided with reference to specific examples.

[0043] I. Overall Overview of the Plan

[0044] This invention provides a quantum phase sensor, which is a single-layer quantum neural network consisting of a network layer formed by n input nodes, s output nodes, and three unitary operation functions connected in series. The three unitary operation functions from input to output are, in order, a phase encoding function, a weighted phase shift operation function, and a phase summation function.

[0045] Each input node contains the variable data corresponding to its index position. The variable data for the n input nodes is X = [x1, ..., x...]. n The first input node takes the first variable data x1, and so on, the nth input node takes the nth variable data x. n Since, from the perspective of bit depth, the first input to the nth input are from the least significant bit to the most significant bit, and each bit is incremented by 2... 1 For the sake of convenience in describing the physical meaning, each input or output can be referred to as a bit.

[0046] The above operation function layers are connected into a network in a predetermined manner. The working process of the quantum phase sensor network is as follows:

[0047] Each input is connected to a phase encoding function, a weighted phase shift operation function, and a phase summation function, respectively. The phase encoding function layer encodes the variable data into quantum state phases based on the data type, transforming the variable data into a phase-represented quantum state. The weighted phase shift operation function adjusts the phase of the phase-represented quantum state using a weighted phase shift function with adjustable weights, obtaining a phase-shifted quantum state. The phase summation function sums the phases of the two quantum states, obtaining the output of the phase summation function. Alternatively, the output of the phase summation function is the result of a phase-shifted quantum state controlled by another phase-shifted quantum state.

[0048] When the input nodes are n=2, the output y1 of the first (low-order) input x1 is the result of summing the phases of the quantum state after phase shift of the first bit and the quantum state after phase shift of the high-order (second-order) input x2. When n>2, the phase summation starts from the second-highest bit (n-1), summing pairwise until the output of the first qubit is obtained. This achieves a fully connected operation where the output of the first bit contains all n inputs, while also making the space occupied by the first output 2. n The nth output is the quantum state represented by the phase obtained by summing the phase of the first x1 output.

[0049] like Figure 1 The diagram shown illustrates a quantum phase perceptron (QPP) where the output node s equals the number of input nodes n, as provided in an embodiment of the present invention. In this embodiment, the QPP operates in three steps: 1) phase encoding, 2) weighted phase shifting, and 3) phase summation. Each input variable can be {0, 1} binary data, a |0> or |1> quantum ground state, or any real number between (0, ∞). The function f is used to process the input variable data, transforming it into a phase-represented quantum state input; the function R... i It has adjustable weighted phase θ i The weighted phase shift function for i = 1, 2, ..., n; the function C is the quantum state |φ(α) after selecting two phase shifts in turn. i )> and φ(α) i+1 Summing the phases in (i = 1, 2, ..., n-1) yields a quantum state |Y| for one bit. j (α j Output (j = 1, 2, ..., s) for |Y j (α j Phase α is performed. j The measurement, and then by calculating sinα j Value obtains the output quantum state |Y j (α j The probability amplitude y in the quantum ground state |1> j =sinα j The entire operation of QPP after encoding involves phase operations on the quantum state. The final output is obtained by measuring the phase, which gives the probability amplitude of the output quantum state in the ground state ||1>. Since any operation on the quantum state must satisfy the normalization property, and considering that the QPP network provided in this invention can be implemented using quantum circuits, all functions in QPP must be unitary operators U, possessing UU. -1 =I, where I is the identity matrix.

[0050] II. Detailed introduction of the plan.

[0051] The following section provides a detailed introduction to the three unitary operation functions involved in quantum phase perceptrons (i.e., phase encoding function, weighted phase shift operation function, and phase summation function).

[0052] 1. Phase encoding function.

[0053] Phase encoding with unit amplitude is used to convert arbitrary input variable data of QPP into quantum state encoding. The complex function F(θ) used to represent the phase encoding of a quantum state is:

[0054]

[0055] Where θ is the phase; It is a unit imaginary number.

[0056] Let cosθ in F(θ) represent the probability magnitude of the ground state 0> in a quantum state, and sinθ represent the probability magnitude of the ground state |1> in a quantum state. Thus, any quantum state derived from the ground state... and The quantum state can be represented by the trigonometric function f(θ) of the phase θ. Here, the trigonometric function f(θ) is the phase encoding function, which is expressed as:

[0057]

[0058] Equation (4) above is the quantum state phase representation when the probability amplitude is a real number.

[0059] For any two distinct phases θ 1 and θ 2 According to the exponential function e θ =f(θ) has the following computational properties:

[0060] f(θ 1 )·f(θ 2 )=f(θ 1 +θ 2 (5)

[0061] This method transforms the calculation of tensor products between all functions from input to output of a network into a calculation of phase polynomial superposition between functions, thereby allowing the variables that increase with the number of input nodes n to be calculated as function tensor products. The exponential increase of 2 is obtained by the nth direct product of the function f(θ). n The quantum state composed of ground states is transformed into a single quantum state output by phase summation calculation, reducing the complexity of the exponentially growing network implementation to polynomial computation complexity. The quantum state encoding transformation process for different types of variable data is described below.

[0062] (1) The variable data is binary data.

[0063] Let x be a variable of binary data type. i ={0,1}, take the initial phase π represents the mathematical constant pi, and i represents the input node number; and each variable data x i ={0,1} directly acts on the phase of f(θ) in the encoding function (4). Through the phase encoding function f(θ) 0i Perform quantum state phase encoding to obtain the quantum state represented by the phase. Represented as:

[0064]

[0065] Here, |0〉 and |1〉 are two quantum ground states, and |.> is the symbol for the quantum state; cos and sin are the cosine and sine functions, respectively.

[0066] From equation (6), we can obtain the variable data x. i Initial phase θ 0i Phase-encoded quantum states (i.e., quantum states represented by phase) and output y j The relational expression, for any input node x i The relationship between the variable data x when it takes two different values, 0 and 1, is shown in Table 1. From this, we can see that the variable data x i When the value is 0 or 1, it corresponds to phase 0 and π / 2, and quantum states |0> and |1>, respectively. The value of the sine function is also the probability amplitude corresponding to the ground state 1>. Furthermore, the phase-encoded quantum state here...

[0067] Table 1: Corresponding values ​​of the {0,1} real-quantum state encoded states

[0068]

[0069] (2) The variable data is the quantum ground state.

[0070] Variable data x i When the quantum ground state is |0> or |1>, the Hadamard gate (H gate) or the phase rotation gate can be selected as the phase encoding function to encode the quantum state phase, which transforms the two input quantum ground states into the corresponding superposition state, that is, the quantum state represented by the phase.

[0071] Taking the H-gate as an example, the quantum state after phase encoding for:

[0072]

[0073] The matrix representation of the H gate is as follows:

[0074]

[0075] (3) The variable data is any real number between (0,∞).

[0076] Let the variable data be x i The quantum state phase encoding function is taken as Represented as:

[0077]

[0078] in, Let be the quantum state represented by phase, e be the natural constant, and cos and sin be the cosine and sine functions, respectively.

[0079] 2. Weighted phase shift operation function.

[0080] In this embodiment of the invention, the weighted phase shift function of the adjustable weighted phase is applied to the input variable data x. i The effect is achieved through phase rotation gates, and the phase rotation operators corresponding to phase rotation gates include: R x R y and R z , respectively, represent phase rotations of the quantum state around the x, y, and z axes.

[0081] Choose a phase rotation operator R∈(R x R y R z The adjustable weighted phase is denoted as θ. i If i = 1, 2, ..., n, then the weighted phase shift function is denoted as R(θ). i )(i.e. Figure 1 R in i The quantum state represented by phase is denoted as After the weighted phase shift function R(θ) i After the operation, the phase-shifted quantum state |φ is obtained. i >; where 0≤θ i ≤π / 2.

[0082] When the selected phase rotation operator is R = Ry, the corresponding weighted phase shift function R y (θ i ) is represented as:

[0083]

[0084] Taking binary data as an example, the corresponding quantum state is: Then the quantum state |φ after phase shift i> is represented as:

[0085]

[0086] Based on trigonometric functions and the difference angle formula:

[0087]

[0088] In the above formula, a and b represent any two angles.

[0089] Substituting relation (12) into equation (11), we get:

[0090]

[0091] Where, α i This represents the phase after the shift.

[0092] 3. Phase summation function.

[0093] Again, taking binary data as an example, when n=2 and s=1, the output |Y1(α1)> of the QPP network is:

[0094]

[0095] Considering that the QPP provided in this invention is implemented using quantum gate circuitry, and the basic operation of multiple quantum gates is a controlled NOT gate with two inputs, the derivation of the phase summation operation is given below using two inputs with n=2, i.e., i=1,2, as an example. The phase encoding is then converted into a quantum state. All subsequent operations are phase-dependent, and the result of each operation is a quantum state represented by the same trigonometric function (cosαsinα). T Where T is the transpose sign, the only difference is the phase change, so the phase summation calculation with two quanta as inputs is:

[0096]

[0097] Where |φ1> and |φ2> represent two phase-shifted quantum states after phase summation, and α1 is the phase in the quantum state |Y1(α1)> obtained after summing the two phases, expressed as:

[0098]

[0099] Where arctan is the arctangent function.

[0100] From the trigonometric sum-to-product formula:

[0101]

[0102] make Substituting equation (16) into equation (15) yields:

[0103]

[0104] Therefore, the phase α1 in the summed quantum state |Y1(α1)> can be obtained as:

[0105]

[0106] Among them, α1 and α2 are the quantum state phases after phase shift in formula (13), and also the quantum state phases before summation.

[0107] Therefore, the output of QPP, |Y1(α1)>, can be obtained as:

[0108]

[0109] After measuring the output phase, y1 can be obtained as follows:

[0110]

[0111] When the output quantum state |Y1(α1)> of QPP is expected to be 0 or 1 as shown in (17) during measurement, QPP becomes a standard perceptron recognition model; otherwise, QPP is a quantum state generation model.

[0112] Formula (20) is based on the input x i This is derived for the case of binary real numbers {0,1}. For different encoding functions with different input data, the expression for the QPP output quantum state and the initial phase are as follows: (Taking n=2 as an example here) is different. However, it can be seen from equation (20) that for any variable data, after corresponding encoding and phase shifting, it is always possible to make the phase α1 in the output quantum state |Y1(α1)> and the phase α of the target state T' equal. T' Equal: α1 = α T' Determine the desired adjustable phase θ i The values ​​of i = 1, 2 make (20) true.

[0113] In this embodiment of the invention, phase summation in QPP must also be implemented through a unitary operator operation with two inputs. Again, taking n=2 as an example, this invention uses a controlled NOT gate (i.e., a CNOT gate, which is a standard quantum gate) for implementation. and The phase summation, where |φ1> is the target bit and |φ2> is the control bit, i.e., the low-order bits are the target bits and the high-order bits are the control bits, the matrix form of the controlled NOT gate C is:

[0114]

[0115] The CNOT door is displayed in the circuit as... Figure 1 Zhongyou The high and low quantum circuits are connected, and the input is fed into the phase summation function C in the low quantum bit connection, outputting a quantum state. In other words, the function C mentioned earlier is the controlled NOT gate C. The controlled NOT gate means that when the control bit is in the |0> state, the target bit remains unchanged; when the control bit is in the |1> state, the target bit is NOTed. Therefore, the output phase α1 of the low-bit input x1 in the QPP is controlled by the output phase α2 of the high-bit input x2. There is a phase superposition relationship between the single output obtained from the two input bits. Through this superposition relationship, the output of the controlled bit is in the 2^n product of the two input bit spaces. 1 ×2 1 =2 2 =In 4-dimensional space.

[0116] like Figure 2 As shown, taking n=2 and s=1 as an example, the two bit outputs |φ1> and |φ2> obtained after the phase shift function are applied are |φ1(α1)> and |φ2(α2)> respectively. When the controlled NOT gate C applies |φ(α2)> and |φ(α1)>, the output of |φ(α1)>, which is the final output of QPP, is:

[0117]

[0118] Where X = [x2 x1].

[0119] The controlled-NOT gate C is the fundamental implementation gate for multi-qubit logic operations. Although the output state obtained after operating on a 2-qubit input in a QPP using a controlled-NOT gate C is a single qubit, its state space is expanded to consist of two single quantum states described in a 2-dimensional plane. 1 ×2 1 Direct product to 2 1 ×2 1 =2 2 =4-dimensional space. The QPP provided by this invention has the function of transforming arbitrary 2-dimensional inputs into quantum states represented in a higher-dimensional space. The controlled NOT gate C realizes that a 2-dimensional state composed of two single-qubit inputs can be represented using only one qubit output. n =2 2 = any state in 4-dimensional space, and in this way, by continuously using the controlled NOT gate C, it can be extended to the case where n>2, by inputting n single qubits, and operating as 2 n The process of an output quantum state in 3D space is as follows:

[0120] The calculation process from each pair of inputs to the output is the same as in the case of n=2; the phase superposition of the entire network output is achieved by starting with the controlled outputs at (n-1) and n, and continuing until the phase summation ends at the output of node x1. This is how it is implemented: For all n inputs in the fully connected operation: After the first controlled NOT gate C operation at bit (n-1), the dimension of the output quantum state at bit (n-1) is the direct product of the dimensions of two single-bit units: 2 1 ×2 1 =2 2 Then, using the n-1 bit as a control gate to perform a C operation on the n-2 bit output, the spatial dimension of the resulting output quantum state increases to 2. 2 ×2 1 =2 3 This process continues until the first output node of the network undergoes a C operation, at which point the state space of its output quantum state is exactly 2. n dimension.

[0121] Therefore, the function of the QPP provided by this invention can be concluded as follows: transforming n qubit inputs into 2 qubits composed of the inputs. n A single-qubit state composed of a group of orthogonal ground states is obtained by measuring the phase α of the output quantum state. j We can calculate the probability magnitude y1 = sinα1 of the output quantum state in the ground state |1>. In other words, the output of the QPP network can represent the probability magnitude y1 = sinα1 of the output quantum state in the ground state |1>. n A superposition state composed of 2 ground states. Furthermore, the QPP network also possesses a superposition state consisting of 2 ground states. n The ability to identify groups of orthogonal ground states from inputs allows for the solution of problems involving n qubits. n A linearly inseparable problem consisting of a set of inputs. Due to 2... n The input after +1 must be the same as 2. n Since there is a set of repetitions in the input sample, QPP can identify arbitrarily long input samples by the difference in phase. Furthermore, the number of weighted phase shift functions R(θ) required in the QPP network is n.

[0122] Phase summation, according to the theoretical calculation formula (18), involves summing the phases of two quantum states. Since the QPP network structure designed in this invention is ultimately implemented using actual quantum gate circuits, the summation is achieved through a controlled NOT gate C (CNOT), a function operation that yields one output from two inputs. One input is controlled by the value of the other input to obtain the output value, and the result is the same as the theoretical summation result. Theoretically, the summation calculation should allow for the simultaneous summation of all n>2 inputs at once. However, since the controlled NOT gate C used in the actual quantum gate circuit only has two inputs, for input nodes n>2, multiple two-input summations must be performed to obtain the desired summation result of multiple inputs.

[0123] like Figure 2 As shown, taking the implementation of XOR NOT as an example, classical neural networks cannot implement the XOR logic operation of two inputs using two inputs and one output. The quantum phase perceptron established based on this invention serves as a 2... 2 = A state generation model in 4-dimensional space implements XOR NOT logical operations.

[0124] Figure 2 The diagram shown is the simplest QPP network structure, consisting of a 2-input QPP and a single output QPP. The task this network can perform is: to convert the 2 qubits X = [x2 x1] into a single output QPP. n =2 2 =4 sets of orthogonal basis inputs It transforms into a single-qubit state with phase α1, |Y1(α1)>.

[0125] From the derivation of the QPP input / output relationship, it can be seen that, apart from using the property of the exponential function (5) in quantum state encoding, the characteristics of equation (5) are actually needed throughout the derivation of the QPP input / output relationship, so that the new quantum state after each quantum operator operation has a unit amplitude / phase expression (4), the only difference being the phase shift and the change in the dimension of the space in which the new quantum state is located. Figure 2 The QPP with two qubit inputs, after phase-shift transformation and addition, results in the space occupied by its single-output quantum state |Y1(α1)> becoming 2. n =2 2 =4, which is the 2 input from 2. n =2 2 =The space consisting of the four ground states |00>, |01>, |10>, and |11>. In other words, for Figure 2The constructed 2-input QPP is input to the ground states |00>, |01>, |10>, and |11>, respectively. Its single-output quantum state |Y1(α1)> is a superposition of these four ground states.

[0126]

[0127] in, and These are the probability amplitudes of the four ground states, and their sum of squares is 1.

[0128] Formula (23) is the result of n=2 in formula (1), which is also the result of amplitude encoding. In the QPP provided by this invention, the quantum state |Y1(α1)> is not determined by 2 n =2 2 Instead of representing it with 4 ground states, it is represented by the trigonometric function of the phase (19): |Y1(α1)>=(cosα1sinα1) T The difference between the quantum state transformations of different network inputs to the output quantum state is distinguished by the different phase α of the output quantum state. Therefore, the proposed QPP can represent the state at position 2 through a single output. n =2 2 Any state in the =4 space can solve any linearly inseparable problem. The process of solving the XOR NOT logical operation is as follows:

[0129] Since the target output of QPP as a recognition model is usually only two digits, 0 or 1, its solution is relatively simple. We use the XOR operation of the binary inputs as the design objective to solve for θ1 and θ2. The XOR NOT problem is described as: transforming four sets of {0 1} binary inputs into the target T:

[0130]

[0131] By setting the phase α1 in the single-output quantum state of the QPP to be equal to the corresponding phase α of the target T under the given 4 sets of X inputs, T : α1=α T By simultaneously solving four sets of equations, the corresponding phases θ1 and θ2 that should be shifted to achieve the target output can be determined. In fact, by simultaneously solving the four equations, it can be found that all four equations are linearly dependent. Using one of the equations to solve for the two weighted phases θ1 and θ2 does not yield a unique solution. If we determine θ2 = 0, we can solve for θ1 = π / 2, that is: A set of weighted phase values ​​for solving the XOR problem is:

[0132]

[0133] Phase summation in QPP must also be implemented using a unitary operator with two inputs. As mentioned earlier, this invention uses a controlled NOT gate C for implementation. and The phase summation uses the low-order bit as the target bit and the high-order bit as the control bit. Therefore, the matrix form of the controlled NOT gate C is (21). After inputting |φ1(α1)> and |φ2(α2) into the controlled NOT gate C, the output of |φ1(α1)>, which is the final output of QPP, |Y1(α1)>, is (22). The following is an example of verifying the implementation of the XOR NOT operation. When θ1=π / 2 and θ2=0, the solution process is shown in Table 2.

[0134] Table 2: Operation process of controlled NOT gate to solve the sum of two phases

[0135]

[0136] Table 2 The horizontal line above indicates that the value is negated, that is to say The value of is exactly the opposite of the value of sinα1 (that is, it is inverted, 0 becomes 1, and 1 becomes 0).

[0137] because Figure 2 The encoding and operation operators of the entire working process of the QPP in this invention are all unitary operators that can be implemented in quantum computing. Therefore, the QPP designed in this invention can be directly implemented using quantum gate circuits.

[0138] like Figure 3 The image shows a 2-input network structure with s=4 designed based on QPP, which can utilize... Figure 3 The QPP network structure shown solves the XOR NOT problem, which is equivalent to transforming the XOR NOT problem described by equation (24) into the following relationship between input and output:

[0139]

[0140] At this point, the classical perceptron can also be used to transform the problem into an XOR NOT problem represented by (26). The network structure is also 2 inputs and 4 outputs. However, the classical perceptron requires the design of n×s=2×4=8 network weights, while the QPP network provided by this invention only needs 2 weights under the same network structure. Obviously, it has the advantages of simple structural design and fewer weight phase values. As the input n increases, its advantages will become more prominent, to the point that it can solve tasks that classical neural networks cannot handle.

[0141] Example 2

[0142] This invention also provides a method for implementing a quantum circuit, which is used to implement the aforementioned quantum phase sensor. This quantum circuit implementation method can also be found in [reference needed]. Figure 1 The quantum phase sensor example shown mainly includes the following methods:

[0143] The variable data input by n input nodes is processed through three unitary operation functions, and output through s output nodes; the n input nodes respectively input the variable data corresponding to the index position, and each input node is connected to the three unitary operation functions in sequence. The three unitary operation functions are, in order, a phase encoding function for quantum state phase encoding, a weighted phase shift operation function for phase adjustment to move the quantum state, and a phase summation function for phase summation.

[0144] In this system, the output of each bit is the quantum state output after the variable data of each bit is processed by three unitary operation functions. When n=2, the output of the first bit is the result of the phase summation of the quantum state after the phase shift of the first bit and the quantum state after the phase shift of the second bit. When n>2, the phase summation starts from the (n-1)th bit and proceeds in a pairwise phase summation manner until the output of the first bit is obtained, so that the output of the first bit contains a fully connected operation of n inputs. The output of the nth bit is the result of the phase summation of the quantum state after the phase shift of the nth bit and the output of the first bit. When performing pairwise phase summation: the output of the (n-1)th bit is the result of the phase summation of the quantum state after the phase shift of the (n-1)th bit and the quantum state after the phase shift of the nth bit. From the (n-2)th bit to the first bit, the output of each bit is the result of the phase summation of the quantum state after the phase shift of its own bit and the output of the previous bit. When s=1, the output of the output node is a quantum state represented by the outputs of all bits. When s>1, the output of each output node is an arbitrary combination of the outputs of each bit.

[0145] Since the specific technical details involved in the quantum circuit implementation method have been described in detail in the previous embodiment 1, they will not be repeated here.

[0146] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A quantum phase sensor, characterized in that, include: A network layer consisting of n input nodes, three unitary operation functions, and s output nodes; n input nodes each input variable data corresponding to its index position. Each input node is followed by a network layer composed of three unitary operation functions: a phase encoding function for quantum state phase encoding, a weighted phase shifting operation function for phase adjustment to move the quantum state, and a phase summation function for phase summation. Specifically, the phase encoding function encodes the variable data into a phase-represented quantum state based on the data type; the weighted phase shifting operation function adjusts the phase of the phase-represented quantum state using a weighted phase shifting function with adjustable weights to obtain the phase-shifted quantum state; and the phase summation function sums the phases of two quantum states to obtain its output; alternatively, the output of the phase summation function is the result of a phase-shifted quantum state being controlled by another phase-shifted quantum state. In this system, the output of each bit is the quantum state output after the variable data of each input bit is processed by three unitary operation functions. When n=2, the output of the first bit is the result of phase summation of the quantum state after phase shift of the first bit and the quantum state after phase shift of the second bit. When n>2, phase summation starts from the (n-1)th bit and proceeds in a pairwise phase summation manner until the output of the first bit is obtained, so that the output of the first bit contains a fully connected operation of n inputs. The output of the nth bit is the result of phase summation of the quantum state after phase shift of the nth bit and the output of the first bit. When performing pairwise phase summation: the output of the (n-1)th bit is the result of phase summation of the quantum state after phase shift of the (n-1)th bit and the quantum state after phase shift of the nth bit. From the (n-2)th bit to the first bit, the output of each bit is the result of phase summation of the quantum state after phase shift of its own bit and the output of the previous bit. When s=1, the output of the output node is a quantum state represented by the outputs of all bits. When s>1, the output of each output node is an arbitrary combination of the outputs of each bit.

2. A quantum phase sensor according to claim 1, characterized in that, When the variable data is binary data, the quantum state phase encoding process includes: Let x be a variable of binary data type. i ={0, 1}, take the initial phase π is the symbol for pi, and i is the input node number; Through phase encoding function Perform quantum state phase encoding to obtain the quantum state represented by the phase. , is represented as: ; when At that time, we obtained: ; Among them, |0〉 and |1〉 are two quantum ground states. is the symbol for a quantum state; cos and sin are the cosine and sine functions, respectively.

3. A quantum phase sensor according to claim 1, characterized in that, When the variable data is a quantum ground state, the quantum state phase encoding process includes: Let the variable data be x. i for or The quantum ground state, The symbol for a quantum state; Choosing either a Hadamard gate or a phase rotation gate as the phase encoding function for quantum state phase encoding transforms the two input quantum ground states into a corresponding superposition state, i.e., a quantum state represented by phase.

4. A quantum phase sensor according to claim 1, characterized in that, When the variable data is any real number between (0, ∞), the quantum state phase encoding process includes: Let the variable data be x i The quantum state phase encoding function is taken as , is represented as: ; in, Let be the quantum state represented by phase, e be the natural constant, and cos and sin be the cosine and sine functions, respectively. For the initial phase, , where i is the input node number.

5. A quantum phase sensor according to claim 1, characterized in that, The weighted phase shift operation function adjusts the phase of the quantum state represented by the phase through a weighted phase shift function with adjustable weighted phase, and the resulting phase-shifted quantum state includes: The adjustable weighted phase shift function for the input variable data x i The effect is achieved through phase rotation gates, and the phase rotation operators corresponding to phase rotation gates include: R x R y and R z , respectively, represent phase rotations of the quantum state around the x, y, and z axes; Choose a phase rotation operator R∈(R x R y R z The adjustable weighted phase is denoted as The weighted phase shift function is denoted as The quantum state represented by phase is denoted as After weighted phase shift function After the operation, the phase-shifted quantum state is obtained. .

6. A quantum phase sensor according to claim 1, characterized in that, When n=2 and s=1, the phase summation is expressed as: ; in, and This represents the quantum state after two phase shifts and phase summation, where cos and sin are the cosine and sine functions, respectively. The quantum state obtained by summing the two phases The phase in the equation is represented as: ; Where arctan is the arctangent function. The adjustable weighted phase in the weighted phase shift function.

7. A quantum phase sensor according to claim 6, characterized in that, Also includes: Choose a controlled NOT gate to perform phase summation, As the target position. As control bits, the matrix form of the controlled NOT gate is: ; Wherein, CNOT represents the controlled NOT gate; The meaning of a controlled NOT gate is: when the control bit is in the |0> state, the target bit does not change; when the control bit is in the |1> state, the target bit is NOT operated.

8. A quantum phase sensor according to claim 6, characterized in that, Also includes: Quantum state obtained by summing phases Phase The measurement, and then through calculation Value obtains quantum state In the quantum ground state probability amplitude , j =1,2,…,s.

9. A method for implementing quantum circuits, characterized in that, This method is used to implement the quantum phase sensor according to any one of claims 1 to 8, wherein: The variable data input by n input nodes is processed through three unitary operation functions, and output through s output nodes; the n input nodes respectively input the variable data corresponding to the index position, and each input node is connected to three unitary operation functions in sequence. The three unitary operation functions are, in order, a phase encoding function for quantum state phase encoding, a weighted phase shift operation function for phase adjustment to move the quantum state, and a phase summation function for phase summation. In this system, the output of each bit is the quantum state output after the variable data of each input bit is processed by three unitary operation functions. When n=2, the output of the first bit is the result of phase summation of the quantum state after phase shift of the first bit and the quantum state after phase shift of the second bit. When n>2, phase summation starts from the (n-1)th bit and proceeds in a pairwise phase summation manner until the output of the first bit is obtained, so that the output of the first bit contains a fully connected operation of n inputs. The output of the nth bit is the result of phase summation of the quantum state after phase shift of the nth bit and the output of the first bit. When performing pairwise phase summation: the output of the (n-1)th bit is the result of phase summation of the quantum state after phase shift of the (n-1)th bit and the quantum state after phase shift of the nth bit. From the (n-2)th bit to the first bit, the output of each bit is the result of phase summation of the quantum state after phase shift of its own bit and the output of the previous bit. When s=1, the output of the output node is a quantum state represented by the outputs of all bits. When s>1, the output of each output node is an arbitrary combination of the outputs of each bit.

Citation Information

Patent Citations

  • X-ray image acquisition system for differential phase contrast imaging

    CN103876766A

  • Quantum phase estimation of multiple eigenvalues

    CN115545207A