Quantum variation circuit, data processing method and device, medium and equipment
By applying H gates, input revolving doors and combined U gates in quantum variational lines, the quantum neural network is constructed, and the problem of complexity of quantum circuit design is solved, efficient and scalable quantum computing capabilities are achieved, and barren plateau phenomenon is avoided.
Patent Information
- Application Number
- CN202510297621.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-13
AI Technical Summary
With the increase in the number of quantum bits, the design and optimization of quantum circuits become complicated, making it difficult to achieve efficient and entangled quantum variational circuits, affecting the improvement of quantum computing capabilities.
By applying H gates, input revolving doors and combining U gates, quantum variational lines are constructed to form quantum neural networks for the fitting and classification tasks. Combined U gates include CNOT gates and single-qubit revolving gates (RX, RY, RZ) to improve the expression ability and coupling of quantum circuits.
It realizes the use of fewer quantum gates to implement complex quantum algorithms, reduce circuit depth, improve the operation efficiency of quantum algorithms, avoid the phenomenon of barren plateaus, and improve the coupling and parameter quantity of quantum variational networks.
Smart Images

Figure CN119808973A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing technology, and in particular to a quantum variational circuit and a data processing method, device, medium and equipment. Background Art
[0002] Variational Quantum Circuits (VQC) have a wide range of applications in quantum machine learning, quantum chemistry, and optimization problems. Designing efficient and entangled quantum variational circuits is crucial to improving quantum computing capabilities. However, as the number of quantum bits increases, the design and optimization of quantum circuits becomes more complex. On the one hand, it is necessary to optimize quantum algorithms to reduce the number of required quantum bits, and on the other hand, it is necessary to optimize quantum circuits to reduce the depth of quantum circuits. Therefore, it is necessary to optimize the method of building complex quantum circuits to improve the flexibility and scalability of quantum variational circuit design. Summary of the invention
[0003] The purpose of the present invention is to provide a quantum variational circuit and data processing method, device, medium and equipment to improve the flexibility and scalability of quantum variational circuit design.
[0004] To achieve the above object, the present invention provides the following technical solutions: According to one aspect of the present invention, a data processing method for a quantum variational circuit is provided, comprising: Applying an H gate to each qubit, the H gate is used to create a superposition state of the qubit and encode the input data into quantum coded data; Apply an input rotation gate to each qubit in superposition; Apply a combined U gate between every two adjacent qubits to form a quantum variational circuit; Based on the quantum variational circuit, multiple rounds of quantum evolution training are performed on the quantum coded data generated by the H gate; The combined U gate includes a CNOT gate configured between two adjacent quantum bits, an RX rotation gate and an RZ rotation gate configured on the first quantum bit of the two adjacent quantum bits, and an RY rotation gate configured on the second quantum bit of the two adjacent quantum bits. By constructing the above quantum variational circuit, the input data is mapped to the quantum state, and then the quantum state is parameterized to form a quantum neural network for implementing fitting and classification tasks.
[0005] According to one embodiment of the present invention, the combined U gate is a forward combined U gate, and applying the combined U gate between every two adjacent quantum bits includes: arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on; or, The combined U gate is a reverse combined U gate, and the combined U gate is applied between every two adjacent quantum bits, including: arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on, where n is a natural number, representing the number of quantum bits, .
[0006] According to one embodiment of the present invention, applying a combined U gate between every two adjacent quantum bits includes: from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit RX and RZ revolving doors on the qubit RY revolving door on; from arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on, where n is a natural number, .
[0007] According to one embodiment of the present invention, applying a combined U gate between every two adjacent quantum bits includes: from arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on; from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on, where n is a natural number, .
[0008] According to one embodiment of the present invention, the forward combination U gate is expressed as: ; in, Represents the unit matrix. According to the relationship between the parameters of the expression and the corresponding operations and quantum bits, it is: Corresponding to the first qubit RX on Rotate; Corresponding to the second qubit RY rotation on; Corresponding to the first qubit RZ rotation on; The control bit The state is passed to the target bit , used to introduce quantum bits and The entanglement between The reverse combination U gate is expressed as: ; in, Represents the identity matrix. Similar to the forward combination U-gate, the parameters of each rotation gate correspond to the rotation of a specific quantum bit. The control bit and target bit of the CNOT gate are reversely exchanged: Corresponding to the first qubit RX on Rotate; Corresponding to the second qubit RY rotation on; Corresponding to the first qubit RZ rotation on; It is the reverse CNOT operation, that is, the control bit is , the target bit is .
[0009] According to one embodiment of the present invention, the transformation matrix of the combined U gate is expressed as: ; in, , Indicates the parameters of the embedded RX revolving door, Indicates the parameters of the embedded RY revolving door. Represents the parameters embedded in the RZ revolving door.
[0010] The present invention also provides a quantum variational circuit, comprising n quantum bits, where n is a natural number; Apply an H gate to each qubit, which is used to create a superposition state of the qubit and encode the input data into quantum coded data; Every two adjacent quantum bits are connected by a combined U gate; the combined U gate includes a CNOT gate configured between two adjacent quantum bits, an RX rotation gate and an RZ rotation gate configured on the first quantum bit of the two adjacent quantum bits, and an RY rotation gate configured on the second quantum bit of the two adjacent quantum bits.
[0011] On the other hand, the present invention also provides a data processing device for a quantum variational circuit, comprising: a superposition initialization unit configured to apply an H gate to each qubit, the H gate being used to create a superposition state of the qubit and encode input data into quantum coded data; a parameter initialization unit configured to apply an input rotation gate to each qubit in a superposition state; A quantum evolution unit is configured to apply a combined U gate between every two adjacent quantum bits to form a quantum variational circuit; and perform multiple rounds of quantum evolution training processing on the quantum coded data generated by the H gate based on the quantum variational circuit; The combined U gate includes a CNOT gate configured between two adjacent quantum bits, an RX rotation gate and an RZ rotation gate configured on the first quantum bit of the two adjacent quantum bits, and an RY rotation gate configured on the second quantum bit of the two adjacent quantum bits.
[0012] On the other hand, the present invention also provides a computer storage medium, in which instructions are stored. When the instructions are executed, the data processing method of the quantum variational circuit is implemented.
[0013] On the other hand, the present invention also provides a computing device, characterized in that it includes a processor and a communication interface coupled to the processor; the processor is used to run a computer program or instruction to implement the data processing method of the quantum variational circuit.
[0014] The invention provides a quantum variational circuit and data processing method, device, medium and equipment, which are implemented by. Compared with the prior art, the beneficial effects of the invention are: 1. The quantum variational circuit of the present invention can realize complex quantum algorithms with fewer quantum gates, and the reduced circuit depth can significantly improve the running efficiency of quantum algorithms; 2. The network gradient descent graph of the quantum variational circuit of the present invention shows no problem of barren plateaus; 3. The circuit of the quantum variational circuit of the present invention adopts a symmetrical structure (forward and reverse CNOT chains), forming a V-shaped or inverted V-shaped topological structure, which improves the coupling of the quantum variational network; 4. A variety of single-qubit rotation gates (RX, RY, RZ) are used between the entangled CNOT gates of the quantum variational circuit of the present invention. These rotation gates increase the expressive power of the quantum variational circuit, improve the parameter quantity, and control the growth of entanglement. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a flow chart of a quantum variational circuit and a data processing method according to an exemplary embodiment of the present invention; Figure 2 is a schematic diagram of a V-type quantum variational circuit according to an exemplary embodiment of the present invention; Figure 3 is a schematic diagram of a forward combination U-gate according to an exemplary embodiment of the present invention; Figure 4 is a schematic diagram of a reverse combination U-gate according to an exemplary embodiment of the present invention; Figure 5 is a schematic diagram of an existing fully connected quantum variational circuit according to an exemplary embodiment of the present invention; Figure 6is a network gradient descent graph of a V-type quantum variational circuit according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to clearly describe the technical solutions of the embodiments of the present invention, in the embodiments of the present invention, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
[0017] It should be noted that, in the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0018] In the present invention, "at least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The following at least one item (items) or similar expressions thereof refer to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one item (items) of a, b or c can mean: a, b, c, the combination of a and b, the combination of a and c, the combination of b and c, or the combination of a, b and c, where a, b, c can be single or multiple.
[0019] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[0020] The present invention provides a method for constructing a quantum variational circuit with a complex topological structure in a modular manner. The method utilizes a series of quantum logic gate modules composed of specific quantum gates, and the application of quantum logic gate modules can be independently constructed and integrated into the overall circuit. By applying these quantum logic gate modules between adjacent quantum bits, the complex entangled topological structure of the quantum circuit is realized, and a quantum variational network with high parameter quantity, high coupling and effective avoidance of the barren plateau phenomenon is completed. Using the quantum variational circuit and data processing method of the present invention, the combination of quantum logic gates that repeatedly appear in the quantum variational circuit is defined as a combined U gate as the basic building unit of the quantum variational circuit. In particular, a method for constructing a quantum variational circuit network based on a V-shaped structure or an inverted V-shaped structure can avoid the "barren plateau" phenomenon in quantum computing.
[0021] like Figure 1 As shown, a flow chart of a data processing method for a quantum variational circuit is given, and the method comprises the following steps: Step S1: Applying an H gate to each qubit, the H gate is used to create a superposition state of the qubit and encode the input data into quantum coded data; Step S2: Apply an input rotation gate to each quantum bit in the superposition state; Step S3: applying a combined U gate between every two adjacent quantum bits to form a quantum variational circuit; Step S4: Perform multiple rounds of quantum evolution training on the quantum coded data generated by the H gate based on the quantum variational circuit.
[0022] By constructing the above quantum variational circuit, the input data can be parameterized through a series of quantum gates to construct a parameterized quantum neural network, which can be used for subsequent parameter training. The quantum variational circuit can complete neural network tasks such as fitting and classification.
[0023] By constructing the above quantum variational circuit, the input data can be mapped to quantum states, and these quantum states can be parameterized using a series of quantum gates to form a quantum neural network. The quantum variational circuit uses a parameterized set of quantum gates, which enables the network to fit complex data patterns by adjusting the parameters of the quantum state. By optimizing these parameters, quantum neural networks can complete tasks such as data fitting, classification, and regression. The core of this method is to use the characteristics of quantum superposition and quantum entanglement to capture high-dimensional features and complex data structures that are difficult for classical neural networks to handle.
[0024] like Figure 2 As shown, a schematic diagram of a V-type quantum variational circuit is given.
[0025] exist Figure 2In the quantum variational circuit shown, n=8 qubits are configured. For each qubit, an H gate is first applied to put the qubit into a superposition state, and then a rotation gate RX is applied to input quantum coded data. Subsequently, a quantum logic gate module is applied between every two adjacent qubits, which is called a combined U gate. The combined U gate includes multiple quantum gates, specifically including a CNOT gate configured between two adjacent qubits, an RX rotation gate and an RZ rotation gate configured on the first qubit of the two adjacent qubits, and an RY rotation gate configured on the second qubit of the two adjacent qubits.
[0026] The combined U gate is divided into forward combined U gate and reverse combined U gate. In the process of constructing quantum variational circuit, the forward combined U gate is applied first. Figure 2 As shown, from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on.
[0027] like Figure 3 As shown, the effect of and Schematic diagram of the forward combination U gate between.
[0028] Controlled NOT Gate (CNOT): , used to locate adjacent qubits and Quantum entanglement occurs between them.
[0029] Configuration in quantum bits RY revolving door on By rotating in the Y-axis direction, its quantum state can be adjusted to achieve the manipulation of the amplitude of the quantum bit.
[0030] Configuration in quantum bits RX revolving door on the Rotate along the X-axis to adjust the amplitude and phase of its quantum state.
[0031] Configuration in quantum bits RZ revolving door on the Rotate in the Z-axis direction to adjust the phase difference of its quantum state.
[0032] The forward combination U-gate introduces entanglement between adjacent quantum bits (through the CNOT gate) and applies parameterizable single-qubit rotation gates (RX, RY, RZ) to the quantum bits to construct parameterized quantum circuits, providing a basis for the training and parameter optimization of quantum variational circuits.
[0033] After applying the forward combination U gate, apply the reverse combination U gate. Figure 2 As shown, from arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door, where .
[0034] like Figure 4 As shown, the effect of and Schematic diagram of the reverse combination U gate between.
[0035] Controlled NOT Gate (CNOT): , used to locate adjacent qubits and Quantum entanglement occurs between them.
[0036] Configuration in quantum bits RY revolving door on By rotating in the Y-axis direction, its quantum state can be adjusted to achieve the manipulation of the amplitude of the quantum bit.
[0037] Configuration in quantum bits RX revolving door on the Rotate along the X-axis to adjust the amplitude and phase of its quantum state.
[0038] Configuration in quantum bits RZ revolving door on the Rotate in the Z-axis direction to adjust the phase difference of its quantum state.
[0039] The reverse combination U-gate introduces entanglement between adjacent qubits (through the CNOT gate) and applies parameterizable single-qubit rotation gates (RX, RY, RZ) to the qubits to construct parameterized quantum circuits. And by reversely connecting quantum circuits, the expression ability of quantum variational circuits is further improved, providing a basis for training and parameter optimization.
[0040] By comparison Figure 3 The forward combination U gate shown with Figure 4 From the reverse combination U gate shown, it can be seen that the difference between the two is that the CNOT gate points in different directions.
[0041] Reference Figure 2 The V-shaped quantum variational circuit shown can also be constructed by first applying a reverse combination U gate and then applying a forward combination U gate, thereby forming an inverted V-shaped quantum variational circuit, including the following steps: In the process of constructing quantum variational circuits, the reverse combination U gate is first applied. arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on the .
[0042] After applying the reverse combination U gate, apply the forward combination U gate. arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit The RY revolving door on the circuit. Thus, an inverted V-shaped quantum variation circuit is constructed.
[0043] After the quantum variational circuit is constructed, the quantum variational circuit can be trained as a network to obtain the quantum variational circuit parameters.
[0044] Example 1: Constructing a forward combination U-gate.
[0045] For adjacent qubits and , define the forward combination U gate .like Figure 3 As shown, the forward combination U gate Includes the following parts: Controlled NOT Gate (CNOT Gate): ; Configuration in quantum bits The revolving doors on the RX and RZ: ; Configuration in quantum bits RY revolving door on: .
[0046] Therefore, the forward combination U gate The expression is: ; in, Represents the identity matrix, indicating that no operation is performed on the corresponding quantum bit. Corresponding to the first qubit RX on Rotate; Corresponding to the second qubit RY rotation on; Corresponding to the first qubit RZ rotation on; The control bit The state is passed to the target bit , used to introduce quantum bits and The entanglement between.
[0047] The matrix representation of the RZ revolving door is: .
[0048] Therefore, the matrix representation A of RZ0(θ3) ⊗ I1 is: ; The matrix representation of the RX revolving door is: ; Therefore, the matrix representation B of RX0(θ1) ⊗ I1 is: ; The matrix representation of the RY revolving door is: ; Therefore, the matrix representation C of I0 ⊗ RY1(θ2) is: ; The matrix representation D of the control NOT gate CNOT0,1 is: ; Finally, the transformation matrix of the combined U gate can be calculated step by step: First, calculate E = B * A: A is a diagonal matrix, and directly multiply the diagonal elements of A by the corresponding columns of B.
[0049] Then, calculate F = C * E: For the specific structure of C, the matrix is divided into blocks to simplify the calculation.
[0050] Finally, calculate U = D * F: The matrix controlling the NOT gate indicates that the role of D is to exchange some rows of F, so the transformation matrix U of the combined U gate can be obtained by rearranging the rows of F. Combining the above calculations, the transformation matrix U is: ; in: , Indicates the parameters of the embedded RX revolving door, Indicates the parameters of the embedded RY revolving door. Represents the parameters embedded in the RZ revolving door.
[0051] Example 2: Constructing a reverse U-gate.
[0052] For adjacent qubits and , define the reverse combination U gate .like Figure 4 As shown, the reverse combination U gate Includes the following parts: Controlled NOT Gate (CNOT Gate): ; Configuration in quantum bits The revolving doors on the RX and RZ: ; Configuration in quantum bits RY revolving door on: .
[0053] Therefore, the reverse combination U gate The expression is: , in, Represents the identity matrix, indicating that no operation is performed on the corresponding quantum bit. Corresponding to the first qubit RX on Rotate; Corresponding to the second qubit RY rotation on; Corresponding to the first qubit RZ rotation on; It is the reverse CNOT operation, that is, the control bit is , the target bit is .
[0054] Reverse combination U door Combined with forward U gate The structure is similar to that of the embodiment 1, except that the direction of controlling the NOT gate is opposite. Therefore, the reverse combination U gate can be constructed by referring to the embodiment 1. .
[0055] Example 3: Construction of V-type quantum variational circuit.
[0056] Apply a combined U-gate between every two adjacent qubits, including: from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate Including configuration in quantum bits and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on; from arrive For adjacent quantum bits and Apply the reverse combination U gate, the reverse combination U gate Including configuration in quantum bits and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door, where . Finally, a V-shaped quantum variational circuit is formed.
[0057] Example 4: Construction of an inverted V-shaped quantum variational circuit.
[0058] The applying of a combined U gate between every two adjacent quantum bits comprises: from arrive For adjacent quantum bits and Apply the reverse combination U gate, the reverse combination U gate Including configuration in quantum bits and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on; from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate Including configuration in quantum bits and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on the . Finally, an inverted V-shaped quantum variational circuit is formed.
[0059] Example 5: Data processing of V-type quantum variational circuit.
[0060] After the quantum variational circuit is constructed, the quantum variational circuit can be trained as a network to obtain the quantum variational circuit parameters. The specific training process includes the following steps: Step S51: converting classical training data into quantum coded training data; Convert classical data into quantum coded data through RX gates. The classical data can then be processed in quantum circuits.
[0061] Step S52: Initializing quantum circuit parameters; Initialize adjustable parameters in quantum circuits, such as rotation angles. Initialize the parameters to zero by adding small random perturbations.
[0062] Step S53: inputting quantum coding training data into the quantum variational circuit for training to obtain quantum variational circuit parameters; The training process includes the following sub-steps: Step S5301 forward propagation: input the quantum coded training data into the quantum variational circuit, and obtain the output quantum state through a series of parameterized quantum gate operations.
[0063] Step S5302 measures and calculates expected values: measures the output quantum state and calculates related physical quantities or expected values to evaluate the performance of the circuit.
[0064] Step S5303 calculates the loss function: Calculate the loss function based on the expected value and the target value : ; in, is a quantum circuit with parameters, is the measured Hamiltonian, is the initial quantum state.
[0065] Step S5304: Gradient calculation: Calculate the gradient of the loss function with respect to the circuit parameters using the Parameter-Shift method.
[0066] For each parameter , the gradient can be expressed as: ; Step S5304 parameter update: update the circuit parameters according to the gradient and the selected optimization algorithm .
[0067] Using the calculated gradients, update the parameters according to the selected optimization algorithm: ; in, is the learning rate.
[0068] Step S5305 iterative training: repeat the above steps S5301 to S5304 until the loss function converges or reaches a predetermined number of training rounds.
[0069] Classical data is converted into quantum states through quantum coding techniques (such as amplitude coding or phase coding). The quantum state represents the embedding of the input data and becomes the basis for subsequent quantum computing. The quantum coded data to be processed is input into the trained quantum variational circuit, and after forward propagation and measurement, the prediction result or classification result is obtained. These results can be used for classification, regression or other quantum machine learning tasks. For example, the quantum coded data of the quantum Transformer is input into the quantum variational circuit, and the classical Q, K, and V matrices are output. Through multiple trainings, the quantum variational circuit can adaptively adjust the parameters in the quantum circuit to generate more efficient and accurate Q, K, and V matrices.
[0070] The quantum variational circuit of the present invention, taking a V-type or inverted V-type quantum variational circuit as an example, ensures that the interconnection type of the quantum circuit is the nearest neighbor type by constructing a CNOT gate chain in the forward / reverse direction, and realizes local interaction by applying CNOT gates between adjacent quantum bits. This local interaction does not require all quantum bits to be fully interconnected and entangled, which limits the propagation of entanglement in the entire quantum variational circuit, prevents the quantum circuit system from becoming overly entangled, and can effectively avoid barren plateaus; at the same time, the shallower quantum circuit depth prevents the Hilbert space from growing exponentially in deep circuits. Deep quantum circuits with random initialization will cause the gradient to vanish exponentially with the number of quantum bits.
[0071] like Figure 5 As shown, a schematic diagram of an existing fully connected quantum circuit is given. The parameter comparison between the fully connected quantum circuit and the V-type quantum variational circuit of the present invention is shown in Table 1.
[0072] Table 1: Parameter comparison table of V-type quantum variational circuit and fully connected quantum circuit ; As shown in Table 1, the V-shaped quantum variation circuit of the present invention requires a smaller depth of only 4n-1 when completing the same quantum bit network construction, where n is the number of quantum bits used, which can effectively avoid the barren plateau. At the same time, the number of quantum gates required for the V-shaped quantum variation circuit is only 2n-3, which is significantly lower than that of the fully connected quantum circuit. This indicates that the quantum variational circuit of the present invention can realize complex quantum algorithms with fewer quantum gates, while the reduced circuit depth can significantly improve the operating efficiency of the quantum algorithm.
[0073] like Figure 6 As shown, the network gradient descent graph of the quantum variational circuit of the present invention is given, and it can be seen that there is no problem of barren plateau. The circuit of the quantum variational circuit adopts a symmetrical structure (forward and reverse CNOT chains), forming a V-shaped or inverted V-shaped topology, which improves the coupling of the quantum variational network. This symmetry helps to maintain balanced gradients in different parts of the circuit; between the entangled CNOT gates, a variety of single-qubit rotation gates (RX, RY, RZ) are applied. These rotation gates increase the expressive power of the quantum variational circuit, increase the parameter quantity, and control the growth of entanglement.
[0074] In addition, a computer-readable storage medium storing a computer program may also be provided according to an exemplary embodiment of the present invention. The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform a data processing method for a quantum variational circuit according to an exemplary embodiment of the present invention. The computer-readable recording medium is any data storage device that can store data read out by a computer system. Examples of computer-readable recording media include: read-only memory, random access memory, read-only optical disk, magnetic tape, floppy disk, optical data storage device, and carrier wave (such as data transmission over the Internet via a wired or wireless transmission path).
[0075] In addition, a computing device may be provided according to an exemplary embodiment of the present invention. The computing device includes a processor and a memory. The memory is used to store a computer program. The computer program is executed by the processor so that the processor executes a computer program of a data processing method for a quantum variational circuit according to an exemplary embodiment of the present invention.
[0076] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the drawings, etc. In the specification, the word "comprising" does not exclude other components or steps, and "one" or "an" does not exclude multiple situations. A single processor or other unit can implement several functions listed in the specification. Certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.
[0077] Although the present invention has been described in conjunction with specific features and embodiments thereof, it is apparent that various modifications and combinations may be made thereto without departing from the spirit and scope of the present invention. Accordingly, this specification and the accompanying drawings are merely exemplary illustrations of the present invention and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present invention. Obviously, those skilled in the art may make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, the present invention is intended to include such modifications and variations if they fall within the scope of the present invention and its equivalents.
Claims
1. A data processing method for a quantum variational circuit, characterized in that: include: Applying an H gate to each qubit, the H gate is used to create a superposition state of the qubit and encode the input data into quantum coded data; Apply an input rotation gate to each qubit in superposition; Apply a combined U gate between every two adjacent qubits to form a quantum variational circuit; Based on the quantum variational circuit, multiple rounds of quantum evolution training are performed on the quantum coded data generated by the H gate; The combined U gate includes a CNOT gate configured between two adjacent quantum bits, an RX rotation gate and an RZ rotation gate configured on the first quantum bit of the two adjacent quantum bits, and an RY rotation gate configured on the second quantum bit of the two adjacent quantum bits; by constructing the above-mentioned quantum variational circuit, the input data is mapped to the quantum state, and then the quantum state is parameterized to form a quantum neural network for realizing fitting and classification tasks.
2. The data processing method of quantum variational circuit according to claim 1, characterized in that: The combined U gate is a forward combined U gate, and the combined U gate is applied between every two adjacent quantum bits, including: arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on; or, The combined U gate is a reverse combined U gate, and applying the combined U gate between every two adjacent quantum bits includes: arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on, where n is a natural number, representing the number of quantum bits, .
3. The data processing method of quantum variational circuit according to claim 1, characterized in that: The applying of a combined U gate between every two adjacent quantum bits comprises: from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit RX and RZ revolving doors on the qubit RY revolving door on; from arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on, where n is a natural number, .
4. The data processing method of quantum variational circuit according to claim 1, characterized in that: The applying of a combined U gate between every two adjacent quantum bits comprises: from arrive For adjacent quantum bits and Applying a reverse combination U gate, the reverse combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on; from arrive For adjacent quantum bits and Apply a forward combination U gate, the forward combination U gate includes configuring a quantum bit and CNOT gates between them, configured on the quantum bit The RX and RZ revolving gates on the qubit RY revolving door on, where n is a natural number, .
5. The data processing method of quantum variational circuit according to claim 2, characterized in that: The forward combination U gate is expressed as: ; in, Represents the unit matrix. According to the relationship between the parameters of the expression and the corresponding operations and quantum bits, it is: Corresponding to the first qubit RX on Rotate; Corresponding to the second qubit RY rotation on; Corresponding to the first qubit RZ rotation on; The control bit The state is passed to the target bit , used to introduce quantum bits and The entanglement between The reverse combination U gate is expressed as: ; in, Represents the identity matrix. Similar to the forward combination U-gate, the parameters of each rotation gate correspond to the rotation of a specific quantum bit. The control bit and target bit of the CNOT gate are reversely exchanged: Corresponding to the first qubit RX on Rotate; Corresponding to the second qubit RY rotation on; Corresponding to the first qubit RZ rotation on; It is the reverse CNOT operation, that is, the control bit is , the target bit is .
6. The data processing method for a quantum variational circuit according to claim 1, characterized in that: The transformation matrix of the combined U gate is expressed as: ; in, , Indicates the parameters of the embedded RX revolving door, Indicates the parameters of the embedded RY revolving door. Represents the parameters embedded in the RZ revolving door.
7. A quantum variational circuit, characterized in that: It includes n quantum bits, where n is a natural number; Apply an H gate to each qubit, which is used to create a superposition state of the qubit and encode the input data into quantum coded data; Every two adjacent quantum bits are connected by a combined U gate; the combined U gate includes a CNOT gate configured between two adjacent quantum bits, an RX rotation gate and an RZ rotation gate configured on the first quantum bit of the two adjacent quantum bits, and an RY rotation gate configured on the second quantum bit of the two adjacent quantum bits.
8. A data processing device for a quantum variational circuit, characterized in that: include: a superposition initialization unit configured to apply an H gate to each qubit, the H gate being used to create a superposition state of the qubit and encode input data into quantum coded data; a parameter initialization unit configured to apply an input rotation gate to each qubit in a superposition state; A quantum evolution unit, configured to apply a combined U-gate between every two adjacent quantum bits to form a quantum variational circuit; Based on the quantum variational circuit, multiple rounds of quantum evolution training are performed on the quantum coded data generated by the H gate; The combined U gate includes a CNOT gate configured between two adjacent quantum bits, an RX rotation gate and an RZ rotation gate configured on the first quantum bit of the two adjacent quantum bits, and an RY rotation gate configured on the second quantum bit of the two adjacent quantum bits.
9. A computer storage medium, characterized in that The computer storage medium stores instructions, and when the instructions are executed, the data processing method for the quantum variational circuit described in any one of claims 1 to 6 is implemented.
10. A computing device, characterized in that It comprises a processor and a communication interface coupled to the processor; the processor is used to run a computer program or instruction to implement the data processing method of the quantum variational circuit described in any one of claims 1 to 6.
Citation Information
Patent Citations
Construction method of mixed quantum classical UNet + + neural network and related device
CN119005254A
Amplitude coding quantum circuit construction method and related device
CN119250211A
Quantum circuit construction method based on cascade variable component sub-state compression and related device
CN119272885A
Cleansing pad and cleansing method using the same
KR101970472B1
Cited By
Two-bit and three-bit unknown state entanglement judgment method based on variable component sub-line
CN122154960A
Non-orthogonal quantum state distinguishing method based on quantum machine learning
CN122198173A