Construction method, device, medium and electronic device of quantum generator

By constructing a quantum generator, using quantum superposition and entanglement operations, the problems of large amount of GAN calculations and failure of training process convergence are solved, and efficient mathematical problem handling is achieved.

CN114881239BActive Publication Date: 2025-08-08ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210377504.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-11
Publication Date
2025-08-08
Estimated Expiration
2042-04-11

AI Technical Summary

Technical Problem

In the prior art, the problem of generating adversarial networks (GANs) is large in computing and the training process is prone to convergence failure, which is difficult to effectively solve in quantum computers.

Method used

The quantum generator is constructed, through the first quantum logic gate that performs superposition operations on a single qubit, the second and third quantum logic gates that perform superposition and entanglement operations on two qubits, and the quantum superposition characteristics are constructed using quantum superposition characteristics.

Benefits of technology

The quantum generator efficiently handles mathematical problems, which solves the problems of large amount of GAN and the failure of convergence of training processes, and improves the computing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114881239B_ABST
    Figure CN114881239B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, medium, and electronic device for constructing a quantum generator. The present invention determines a first quantum logic gate that performs a superposition operation on the quantum state of a single quantum bit, determines a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits, and determines a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits; the first, second, and third quantum logic gates are applied to data bits to obtain a quantum generator. A quantum GAN or a quantum-classical hybrid GAN can be constructed using the quantum generator, thereby utilizing the characteristics of quantum superposition to efficiently process mathematical problems and addressing the issues of large GAN computational complexity and convergence failure during training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum computing technology, and in particular relates to a construction method, device, medium and electronic device of a quantum generator. Background Art

[0002] Generative Adversarial Networks (GANs) are an important generative model in the field of deep learning. Two networks, a generator and a discriminator, are trained simultaneously and compete in a minimax algorithm. This adversarial approach avoids some of the practical difficulties of traditional generative models, cleverly approximating unsolvable loss functions through adversarial learning. It has found widespread application in generating data such as images, videos, natural language, and music. However, GANs are computationally intensive, and classic GANs are prone to convergence failure during training. The emergence of quantum computers offers a potential solution to this problem.

[0003] A quantum computer is a physical device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, store, and process quantum information. When a device processes and calculates quantum information and runs quantum algorithms, it is considered a quantum computer. Quantum computers are a key technology under research because they can handle mathematical problems more efficiently than conventional computers. For example, they can reduce the time required to crack RSA keys from hundreds of years to just hours. Constructing a quantum generator that can be used with a quantum computer is crucial for addressing the computational complexity and convergence failures of GAN training. Summary of the Invention

[0004] The purpose of the present invention is to provide a method, device, medium and electronic device for constructing a quantum generator, aiming to construct a quantum generator that can be applied to a quantum computer to solve the problems of large GAN computational complexity and convergence failure during training.

[0005] One embodiment of the present invention provides a method for constructing a quantum generator, the method comprising:

[0006] Determine a first quantum logic gate that performs a superposition operation on a quantum state of a single quantum bit, determine a second quantum logic gate that performs a superposition operation on a quantum state of two quantum bits, and determine a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits;

[0007] The first quantum logic gate, the second quantum logic gate, and the third quantum logic gate act on data bits to obtain a quantum generator.

[0008] Optionally, determining a first quantum logic gate for performing a superposition operation on a quantum state of a single quantum bit includes:

[0009] The RY gate was identified as the first quantum logic gate that performs a superposition operation on the quantum state of a single qubit.

[0010] Optionally, determining a second quantum logic gate for performing a superposition operation on the quantum states of the two quantum bits includes:

[0011] Get four RX gates, two CNOT gates and one RZ gate;

[0012] The output items of two of the RX gates are used as the input items of one of the CNOT gates, one of the output items of one of the CNOT gates is used as the input item of the RZ gate, the other output item of one of the CNOT gates and the output item of the RZ gate are used as the input items of another CNOT gate, and the two output items of the other CNOT gate are respectively used as the input items of the other two RX gates, to obtain a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits.

[0013] Optionally, determining a third quantum logic gate for performing an entanglement operation on the quantum state of the two quantum bits includes:

[0014] The controlled RY gate is identified as a third quantum logic gate that performs entanglement operations on the quantum states of two qubits.

[0015] Optionally, applying the first quantum logic gate to a data bit includes:

[0016] The first quantum logic gate is applied to each data bit respectively.

[0017] Optionally, applying the second quantum logic gate to a data bit includes:

[0018] The second quantum logic gate acts on every two adjacent data bits.

[0019] Optionally, applying the third quantum logic gate to a data bit includes:

[0020] The third quantum logic gate acts on every two adjacent data bits.

[0021] Yet another embodiment of the present invention provides a device for constructing a quantum generator, the device comprising:

[0022] a determining unit, configured to determine a first quantum logic gate for performing a superposition operation on a quantum state of a single quantum bit, determine a second quantum logic gate for performing a superposition operation on a quantum state of two quantum bits, and determine a third quantum logic gate for performing an entanglement operation on the quantum state of the two quantum bits;

[0023] An action unit is used to act on the first quantum logic gate, the second quantum logic gate and the third quantum logic gate on a data bit to obtain a quantum generator.

[0024] Optionally, in determining the first quantum logic gate for performing a superposition operation on the quantum state of a single quantum bit, the determining unit is specifically configured to:

[0025] The RY gate was identified as the first quantum logic gate that performs a superposition operation on the quantum state of a single qubit.

[0026] Optionally, in determining the second quantum logic gate for performing a superposition operation on the quantum state of two quantum bits, the determining unit is specifically configured to:

[0027] Get four RX gates, two CNOT gates and one RZ gate;

[0028] The output items of two of the RX gates are used as the input items of one of the CNOT gates, one of the output items of one of the CNOT gates is used as the input item of the RZ gate, the other output item of one of the CNOT gates and the output item of the RZ gate are used as the input items of another CNOT gate, and the two output items of the other CNOT gate are respectively used as the input items of the other two RX gates, to obtain a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits.

[0029] Optionally, in determining the third quantum logic gate for performing an entanglement operation on the quantum state of two quantum bits, the determining unit is specifically configured to:

[0030] The controlled RY gate is identified as a third quantum logic gate that performs entanglement operations on the quantum states of two qubits.

[0031] Optionally, in the aspect of applying the first quantum logic gate to a data bit, the applying unit is specifically configured to:

[0032] The first quantum logic gate is applied to each data bit respectively.

[0033] Optionally, in the aspect of applying the second quantum logic gate to a data bit, the applying unit is specifically configured to:

[0034] The second quantum logic gate acts on every two adjacent data bits.

[0035] Optionally, in the aspect of applying the third quantum logic gate to a data bit, the applying unit is specifically configured to:

[0036] The third quantum logic gate acts on every two adjacent data bits.

[0037] Yet another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute any of the above methods when running.

[0038] Yet another embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform any of the above methods.

[0039] Compared with the prior art, the present invention determines a first quantum logic gate that performs a superposition operation on the quantum state of a single quantum bit, determines a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits, and determines a third quantum logic gate that performs an entanglement operation on the quantum state of two quantum bits;

[0040] The first, second, and third quantum logic gates are applied to data bits to obtain a quantum generator. This quantum generator can then be used to construct a quantum GAN or a quantum-classical hybrid GAN, thereby utilizing the properties of quantum superposition to efficiently process mathematical problems and address the issues of large GAN computational complexity and convergence failure during training. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 A hardware structure block diagram of a computer terminal for a method for constructing a quantum generator provided by an embodiment of the present invention;

[0042] Figure 2 A schematic flow chart of a method for constructing a quantum generator provided by an embodiment of the present invention;

[0043] Figure 3 A schematic structural diagram of a second quantum logic gate provided by an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of the structure of a quantum generator provided by an embodiment of the present invention;

[0045] Figure 5 A schematic structural diagram of a device for constructing a quantum generator provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and are not to be construed as limiting the present invention.

[0047] The embodiment of the present invention first provides a method for constructing a quantum generator, which can be applied to electronic devices such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0048] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 The hardware structure block diagram of a computer terminal for a method of constructing a quantum generator provided by an embodiment of the present invention. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing the construction method of the quantum generator based on the quantum circuit. Optionally, the above-mentioned computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0049] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the method for constructing a quantum generator in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-mentioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0050] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0051] It's important to note that a true quantum computer has a hybrid architecture, consisting of two main components: a classical computer, responsible for performing classical computations and control, and a quantum device, responsible for running quantum programs and thus achieving quantum computations. A quantum program is a sequence of instructions written in a quantum language, such as QRunes, that can be executed on a quantum computer. This supports quantum logic gate operations and ultimately enables quantum computations. Specifically, a quantum program is a sequence of instructions that operate quantum logic gates in a specific time sequence.

[0052] In practical applications, due to the limitations of the development of quantum device hardware, quantum computing simulations are usually required to verify quantum algorithms, quantum applications, and the like. Quantum computing simulation is the process of simulating the operation of quantum programs corresponding to specific problems using a virtual architecture (i.e., a quantum virtual machine) built with the resources of an ordinary computer. Generally, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in the embodiments of the present invention is a program written in a classical language to characterize quantum bits and their evolution, in which quantum bits, quantum logic gates, and the like related to quantum computing are represented by corresponding classical codes.

[0053] Quantum circuits, as a manifestation of quantum programs, also known as quantum logic circuits, are the most commonly used general quantum computing model. They represent circuits that operate on quantum bits in an abstract concept. Their components include quantum bits, circuits (timelines), and various quantum logic gates. Finally, the results often need to be read out through quantum measurement operations.

[0054] Unlike traditional circuits, which are connected by metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as connected by time. In other words, the state of the quantum bit naturally evolves over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated.

[0055] A quantum program as a whole corresponds to a single quantum circuit. The quantum program described in this disclosure refers to this quantum circuit, where the total number of qubits in this quantum circuit is the same as the total number of qubits in the quantum program. A quantum program can be understood as consisting of a quantum circuit, measurement operations on the qubits in the quantum circuit, registers storing the measurement results, and control flow nodes (jump instructions). A quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution of a quantum program is the process of executing all quantum logic gates in a specific time sequence. It should be noted that the time sequence refers to the chronological order in which individual quantum logic gates are executed.

[0056] It's important to note that in classical computing, the most basic unit is the bit, and the most fundamental control mode is the logic gate. Circuit control can be achieved through combinations of logic gates. Similarly, quantum logic gates are used to manipulate qubits. Quantum logic gates enable quantum states to evolve. They form the basis of quantum circuits. Quantum logic gates include single-bit quantum logic gates such as the Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), RX gate, RY gate, and RZ gate; and multi-bit quantum logic gates such as the CNOT gate, CR gate, iSWAP gate, and Toffoli gate. Quantum logic gates are generally represented using unitary matrices. Unitary matrices are not only a matrix form but also a type of operation and transformation. A typical quantum logic gate operates on a quantum state by multiplying the unitary matrix on the left by the matrix corresponding to the quantum state's right vector.

[0057] See also Figure 2 , Figure 2 A schematic flow chart of a method for constructing a quantum generator provided in an embodiment of the present invention. The method comprises:

[0058] Step 201: determining a first quantum logic gate that performs a superposition operation on a quantum state of a single quantum bit, determining a second quantum logic gate that performs a superposition operation on a quantum state of two quantum bits, and determining a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits;

[0059] The first quantum logic gate may include at least one of the following: an H gate, an RX gate, an RY gate, and an RZ gate.

[0060] In a specific embodiment of the present invention, determining a first quantum logic gate for performing a superposition operation on a quantum state of a single quantum bit includes:

[0061] The RY gate was identified as the first quantum logic gate that performs a superposition operation on the quantum state of a single qubit.

[0062] The second quantum logic gate may be, for example, a CNOT gate, a SWAP gate, a CZ gate, a CR gate, an ISWAP gate, or the like.

[0063] In a specific embodiment of the present invention, determining a second quantum logic gate for performing a superposition operation on the quantum states of two quantum bits includes:

[0064] Get four RX gates, two CNOT gates and one RZ gate;

[0065] The output items of two of the RX gates are used as the input items of one of the CNOT gates, one of the output items of one of the CNOT gates is used as the input item of the RZ gate, the other output item of one of the CNOT gates and the output item of the RZ gate are used as the input items of another CNOT gate, and the two output items of the other CNOT gate are respectively used as the input items of the other two RX gates, to obtain a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits.

[0066] like Figure 3 As shown, Figure 3 A schematic structural diagram of a second quantum logic gate provided by an embodiment of the present invention.

[0067] The third quantum logic gate may include at least one of the following: a CNOT gate, a controlled RX gate, a controlled RY gate, and a controlled RZ gate.

[0068] In a specific embodiment of the present invention, the third quantum logic gate for determining to perform an entanglement operation on the quantum state of two quantum bits includes:

[0069] The controlled RY gate is identified as a third quantum logic gate that performs entanglement operations on the quantum states of two qubits.

[0070] Step 202: Apply the first quantum logic gate, the second quantum logic gate, and the third quantum logic gate to a data bit to obtain a quantum generator.

[0071] Among them, the quantum generator is used to generate generated data. The difference between the quantum generator and the classical generator is that the input of the classical generator is random data containing noise, while the input of the quantum generator does not require random data containing noise, or the input can be |0> or |1>.

[0072] In a specific embodiment of the present invention, applying the first quantum logic gate to a data bit includes:

[0073] The first quantum logic gate is applied to each data bit respectively.

[0074] In a specific embodiment of the present invention, applying the second quantum logic gate to a data bit includes:

[0075] The second quantum logic gate acts on every two adjacent data bits.

[0076] Furthermore, in addition to applying the second quantum logic gate to every two adjacent data bits, the second quantum logic gate may also be applied to the first and last data bits.

[0077] In a specific embodiment of the present invention, applying the third quantum logic gate to a data bit includes:

[0078] The third quantum logic gate acts on every two adjacent data bits.

[0079] Furthermore, in addition to applying the third quantum logic gate to every two adjacent data bits, the third quantum logic gate can also be applied to the first and last data bits. The first data bit can be the control bit and the last data bit can be the controlled bit; or the last data bit can be the control bit and the first data bit can be the controlled bit.

[0080] like Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of a quantum generator provided by an embodiment of the present invention. The figure includes four data bits: q0, q1, q2, and q3. The first quantum logic gate RY acts on q0, q1, q2, and q3 respectively. The second quantum logic gate acts on q0 and q1, q1 and q2, and q2 and q3 respectively. The second quantum logic gate is Figure 3 In the structure shown, the third quantum logic gate controlled RY gate acts on q0 and q1, q1 and q2, q2 and q3 respectively, and the control bits are q0, q1, and q2 in sequence.

[0081] Compared with the prior art, the present invention determines a first quantum logic gate that performs a superposition operation on the quantum state of a single quantum bit, determines a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits, and determines a third quantum logic gate that performs an entanglement operation on the quantum state of two quantum bits;

[0082] The first, second, and third quantum logic gates are applied to data bits to obtain a quantum generator. This quantum generator can then be used to construct a quantum GAN or a quantum-classical hybrid GAN, thereby utilizing the properties of quantum superposition to efficiently process mathematical problems and address the issues of large GAN computational complexity and convergence failure during training.

[0083] See also Figure 5 , Figure 5 A schematic diagram of a device for constructing a quantum generator according to an embodiment of the present invention. The device comprises:

[0084] a determining unit 501 for determining a first quantum logic gate for performing a superposition operation on a quantum state of a single quantum bit, determining a second quantum logic gate for performing a superposition operation on a quantum state of two quantum bits, and determining a third quantum logic gate for performing an entanglement operation on the quantum state of two quantum bits;

[0085] The action unit 502 is configured to apply the first quantum logic gate, the second quantum logic gate, and the third quantum logic gate to a data bit to obtain a quantum generator.

[0086] Optionally, in determining the first quantum logic gate for performing a superposition operation on the quantum state of a single quantum bit, the determining unit 501 is specifically configured to:

[0087] The RY gate was identified as the first quantum logic gate that performs a superposition operation on the quantum state of a single qubit.

[0088] Optionally, in determining the second quantum logic gate for performing a superposition operation on the quantum states of two quantum bits, the determining unit 501 is specifically configured to:

[0089] Get four RX gates, two CNOT gates and one RZ gate;

[0090] The output items of two of the RX gates are used as the input items of one of the CNOT gates, one of the output items of one of the CNOT gates is used as the input item of the RZ gate, the other output item of one of the CNOT gates and the output item of the RZ gate are used as the input items of another CNOT gate, and the two output items of the other CNOT gate are respectively used as the input items of the other two RX gates, to obtain a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits.

[0091] Optionally, in determining the third quantum logic gate for performing an entanglement operation on the quantum state of two quantum bits, the determining unit 501 is specifically configured to:

[0092] The controlled RY gate is identified as a third quantum logic gate that performs entanglement operations on the quantum states of two qubits.

[0093] Optionally, in the aspect of applying the first quantum logic gate to a data bit, the applying unit 502 is specifically configured to:

[0094] The first quantum logic gate is applied to each data bit respectively.

[0095] Optionally, in the aspect of applying the second quantum logic gate to a data bit, the applying unit 502 is specifically configured to:

[0096] The second quantum logic gate acts on every two adjacent data bits.

[0097] Optionally, in the aspect of applying the third quantum logic gate to a data bit, the applying unit 502 is specifically configured to:

[0098] The third quantum logic gate acts on every two adjacent data bits.

[0099] Compared with the prior art, the present invention determines a first quantum logic gate that performs a superposition operation on the quantum state of a single quantum bit, determines a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits, and determines a third quantum logic gate that performs an entanglement operation on the quantum state of two quantum bits;

[0100] The first, second, and third quantum logic gates are applied to data bits to obtain a quantum generator. This quantum generator can then be used to construct a quantum GAN or a quantum-classical hybrid GAN, thereby utilizing the properties of quantum superposition to efficiently process mathematical problems and address the issues of large GAN computational complexity and convergence failure during training.

[0101] The embodiment of the present invention further provides a storage medium, wherein the storage medium stores a computer program, wherein the computer program is configured to execute the above-mentioned Figure 2 The steps of any one of the method embodiments.

[0102] Specifically, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for performing the following steps:

[0103] Determine a first quantum logic gate that performs a superposition operation on a quantum state of a single quantum bit, determine a second quantum logic gate that performs a superposition operation on a quantum state of two quantum bits, and determine a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits;

[0104] The first quantum logic gate, the second quantum logic gate, and the third quantum logic gate act on data bits to obtain a quantum generator.

[0105] Specifically, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0106] Yet another embodiment of the present invention provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above method embodiments.

[0107] Specifically, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0108] Specifically, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0109] Determine a first quantum logic gate that performs a superposition operation on a quantum state of a single quantum bit, determine a second quantum logic gate that performs a superposition operation on a quantum state of two quantum bits, and determine a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits;

[0110] The first quantum logic gate, the second quantum logic gate, and the third quantum logic gate act on data bits to obtain a quantum generator.

[0111] The above describes in detail the structure, features and effects of the present invention based on the embodiments shown in the drawings. The above is only a preferred embodiment of the present invention, but the scope of implementation of the present invention is not limited to what is shown in the drawings. Any changes made in accordance with the concept of the present invention, or modifications to equivalent embodiments with equivalent changes, which do not exceed the spirit covered by the description and drawings, should be within the scope of protection of the present invention.

Claims

1. A method for constructing a quantum generator, characterized in that: The method comprises: Determine a first quantum logic gate that performs a superposition operation on the quantum state of a single quantum bit, obtain four RX gates, two CNOT gates, and one RZ gate, use the output items of two of the RX gates as input items of one of the CNOT gates, use one output item of one of the CNOT gates as an input item of the RZ gate, use the other output item of one of the CNOT gates and the output item of the RZ gate as input items of another CNOT gate, and use the two output items of the other CNOT gate as input items of two other RX gates, respectively, to obtain a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits, and determine a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits; The first quantum logic gate is applied to each data bit, the second quantum logic gate is applied to every two adjacent data bits, and the third quantum logic gate is applied to every two adjacent data bits, as well as the first and last data bits, to obtain a quantum generator.

2. The method according to claim 1, wherein The determining of a first quantum logic gate for performing a superposition operation on a quantum state of a single quantum bit comprises: The RY gate was identified as the first quantum logic gate that performs a superposition operation on the quantum state of a single qubit.

3. The method according to claim 1, wherein The determining of a third quantum logic gate for performing an entanglement operation on the quantum states of the two quantum bits includes: The controlled RY gate is identified as a third quantum logic gate that performs entanglement operations on the quantum states of two qubits.

4. A device for constructing a quantum generator, characterized in that: The device comprises: a determining unit, configured to determine a first quantum logic gate that performs a superposition operation on the quantum state of a single quantum bit, obtain four RX gates, two CNOT gates, and one RZ gate, use output items of two of the RX gates as input items of one of the CNOT gates, use one output item of one of the CNOT gates as an input item of the RZ gate, use another output item of one of the CNOT gates and the output item of the RZ gate as input items of another CNOT gate, use two output items of another CNOT gate as input items of two other RX gates, respectively, to obtain a second quantum logic gate that performs a superposition operation on the quantum state of two quantum bits, and determine a third quantum logic gate that performs an entanglement operation on the quantum state of the two quantum bits; An action unit is used to apply the first quantum logic gate to each data bit, apply the second quantum logic gate to every two adjacent data bits, apply the third quantum logic gate to every two adjacent data bits, and apply the first and last data bits to obtain a quantum generator.

5. A storage medium, characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 3 when executed.

6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Quantum generative adversarial network algorithm based on conditional constraints

    CN111814907A

  • Quantum circuit optimization using machine learning

    US20200342344A1