CN114881239A - Method and apparatus for constructing quantum generator, medium, and electronic apparatus - Google Patents

Method and apparatus for constructing quantum generator, medium, and electronic apparatus Download PDF

Info

Publication number
CN114881239A
CN114881239A CN202210377504.XA CN202210377504A CN114881239A CN 114881239 A CN114881239 A CN 114881239A CN 202210377504 A CN202210377504 A CN 202210377504A CN 114881239 A CN114881239 A CN 114881239A
Authority
CN
China
Prior art keywords
quantum
logic gate
gate
quantum logic
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210377504.XA
Other languages
Chinese (zh)
Inventor
窦猛汉
周照辉
方圆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Origin Quantum Computing Technology Co Ltd
Original Assignee
Origin Quantum Computing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Origin Quantum Computing Technology Co Ltd filed Critical Origin Quantum Computing Technology Co Ltd
Priority to CN202210377504.XA priority Critical patent/CN114881239A/en
Publication of CN114881239A publication Critical patent/CN114881239A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/40Physical realisations or architectures of quantum processors or components for manipulating qubits, e.g. qubit coupling or qubit control

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Logic Circuits (AREA)

Abstract

The invention discloses a construction method, a construction device, a construction medium and an electronic device of a quantum generator, wherein a first quantum logic gate for executing superposition operation on the quantum state of a single quantum bit, a second quantum logic gate for executing superposition operation on the quantum state of two quantum bits and a third quantum logic gate for executing entanglement operation on the quantum state of two quantum bits are determined; applying 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; the quantum generator can further construct quantum GAN or quantum classical hybrid GAN, so that the mathematical problem is efficiently processed by using the quantum superposition characteristic, and the problems of large calculation amount of GAN and failure in convergence in the training process are solved.

Description

Method and apparatus for constructing quantum generator, medium, and electronic apparatus
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to a construction method, a construction device, a construction medium and an electronic device of a quantum generator.
Background
Generating a countermeasure network (GAN) is an important generation model in the field of deep learning, i.e. two network generators (generators) and discriminators) are trained at the same time and compete in a minimax algorithm (minimax). The countermeasure mode avoids some difficulties of some traditional generation models in practical application, skillfully approximates some unsolvable loss functions through countermeasure learning, and has wide application in the generation of data such as images, videos, natural languages, music and the like. However, GAN is very computationally intensive, and the problem of failure of convergence in the training process is likely to occur in the classical GAN. The advent of quantum computers has provided a possible way to solve this problem.
Quantum computers are physical devices that perform high-speed mathematical and logical operations, store and process quantum information in compliance with the laws of quantum mechanics. When a device processes and calculates quantum information and runs quantum algorithms, the device is a quantum computer. Quantum computers are a key technology under study because they have the ability to handle mathematical problems more efficiently than ordinary computers, for example, they can speed up the time to break RSA keys from hundreds of years to hours. How to construct a quantum generator applicable to a quantum computer is a key step for solving the problems of large GAN calculation amount and failure of convergence of a training process.
Disclosure of Invention
The invention aims to provide a construction method, a construction device, a construction medium and an electronic device of a quantum generator, and aims to construct the quantum generator which can be applied to a quantum computer so as to solve the problems of large calculation amount of GAN and failure in convergence of a training process.
One embodiment of the present invention provides a method of constructing a quantum generator, the method including:
determining a first quantum logic gate for performing superposition operations on the quantum states of the single qubit, determining a second quantum logic gate for performing superposition operations on the quantum states of the two qubits, and determining a third quantum logic gate for performing entanglement operations on the quantum states of the two qubits;
and applying 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.
Optionally, the determining a first quantum logic gate for performing a superposition operation on a quantum state of a single-quantum bit includes:
the RY gate is determined as the first quantum logic gate that performs a superposition operation on the quantum states of the single-quantum bit.
Optionally, the determining a second quantum logic gate for performing a superposition operation on quantum states of two qubits includes:
acquiring four RX gates, two CNOT gates and one RZ gate;
and taking the output items of two RX gates as the input items of one CNOT gate, taking one output item of one CNOT gate as the input item of the RZ gate, taking the other output item of one CNOT gate and the output item of the RZ gate as the input items of the other CNOT gate, and taking the two output items of the other CNOT gate as the input items of the other two RX gates respectively to obtain a second quantum logic gate for performing superposition operation on the quantum states of two qubits.
Optionally, the determining a third quantum logic gate that performs an entanglement operation on quantum states of two qubits includes:
the controlled RY gate is determined as a third quantum logic gate that performs an entanglement operation on the quantum states of the two qubits.
Optionally, the acting the first quantum logic gate on a data bit includes:
the first quantum logic gate is acted upon each data bit separately.
Optionally, the acting the second quantum logic gate on a data bit includes:
and respectively acting the second quantum logic gate on every two adjacent data bits.
Optionally, the acting the third quantum logic gate on a data bit includes:
and respectively acting the third quantum logic gate on every two adjacent data bits.
Yet another embodiment of the present invention provides a construction apparatus of a quantum generator, the apparatus including:
the device comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining a first quantum logic gate for performing superposition operation on the quantum state of a single quantum bit, determining a second quantum logic gate for performing superposition operation on the quantum state of two quantum bits, and determining a third quantum logic gate for performing entanglement operation on the quantum state of two quantum bits;
and the action unit is used for acting 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.
Optionally, in the aspect of determining the first quantum logic gate for performing the superposition operation on the quantum state of the single-quantum bit, the determining unit is specifically configured to:
the RY gate is determined as the first quantum logic gate that performs a superposition operation on the quantum states of the single-quantum bit.
Optionally, in the aspect of determining the second quantum logic gate for performing the superposition operation on the quantum states of the two qubits, the determining unit is specifically configured to:
acquiring four RX gates, two CNOT gates and one RZ gate;
and taking the output items of two RX gates as the input items of one CNOT gate, taking one output item of one CNOT gate as the input item of the RZ gate, taking the other output item of one CNOT gate and the output item of the RZ gate as the input items of the other CNOT gate, and taking the two output items of the other CNOT gate as the input items of the other two RX gates respectively to obtain a second quantum logic gate for performing superposition operation on the quantum states of two qubits.
Optionally, in the aspect of determining a third quantum logic gate for performing an entanglement operation on quantum states of two qubits, the determining unit is specifically configured to:
the controlled RY gate is determined as a third quantum logic gate that performs an entanglement operation on the quantum states of the two qubits.
Optionally, in terms of the acting of the first quantum logic gate on a data bit, the acting unit is specifically configured to:
the first quantum logic gate is acted upon each data bit separately.
Optionally, in terms of the acting of the second quantum logic gate on a data bit, the acting unit is specifically configured to:
and respectively acting the second quantum logic gate on every two adjacent data bits.
Optionally, in terms of the acting of the third quantum logic gate on a data bit, the acting unit is specifically configured to:
and respectively acting the third quantum logic gate on every two adjacent data bits.
Yet another embodiment of the invention provides a storage medium having a computer program stored thereon, wherein the computer program is arranged to perform the method of any of the above when run.
Yet another embodiment of the present invention provides an electronic device comprising a memory having a computer program stored therein and a processor configured to execute the computer program to perform the method of any of the above.
Compared with the prior art, the method comprises the steps of determining a first quantum logic gate for performing superposition operation on the quantum state of a single quantum bit, determining a second quantum logic gate for performing superposition operation on the quantum state of two quantum bits, and determining a third quantum logic gate for performing entanglement operation on the quantum state of two quantum bits;
applying 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; the quantum generator can further construct quantum GAN or quantum classical hybrid GAN, so that the mathematical problem is efficiently processed by using the quantum superposition characteristic, and the problems of large calculation amount of GAN and failure in convergence in the training process are solved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a computer terminal of a method for constructing a quantum generator according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for constructing a quantum generator according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a second quantum logic gate according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a quantum generator according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a construction apparatus of a quantum generator according to an embodiment of the present invention.
Detailed Description
The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.
The embodiment of the invention firstly provides a construction method of a quantum generator, and the method can be applied to electronic equipment, such as a computer terminal, specifically a common computer, a quantum computer and the like.
This will be described in detail below by way of example as it would run on a computer terminal. Fig. 1 is a block diagram of a hardware structure of a computer terminal of a method for constructing a quantum generator according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing a construction method of a quantum generator based on a quantum wire, and optionally may further include a transmission device 106 for a communication function and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the construction method of the quantum generator in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, so as to implement 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 located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
It should be noted that a true quantum computer is a hybrid structure, which includes two major components: one part is a classic computer which is responsible for executing classic calculation and control; the other part is quantum equipment which is responsible for running a quantum program to further realize quantum computation. The quantum program is a string of instruction sequences which can run on a quantum computer and are written by quantum languages such as Qrun languages, so that the support on the operation of a quantum logic gate is realized, and the quantum computation is finally realized. In particular, a quantum program is a sequence of instructions that operate quantum logic gates in a time sequence.
In practical applications, due to the limited development of quantum device hardware, quantum computation simulation is usually required to verify quantum algorithms, quantum applications, and the like. The quantum computing simulation is a process of realizing the simulation operation of a quantum program corresponding to a specific problem by means of a virtual architecture (namely a quantum virtual machine) built by resources of a common computer. In general, it is necessary to build quantum programs for a particular problem. The quantum program referred in the embodiment of the invention is a program written in a classical language for representing quantum bits and evolution thereof, wherein the quantum bits, quantum logic gates and the like related to quantum computation are all represented by corresponding classical codes.
A quantum circuit, which is an embodiment of a quantum program and also a weighing sub-logic circuit, is the most common general quantum computation model, and represents a circuit that operates on a quantum bit under an abstract concept, and the circuit includes the quantum bit, a circuit (timeline), and various quantum logic gates, and finally, a result is often read through a quantum measurement operation.
Unlike conventional circuits that are connected by metal lines to pass either voltage or current signals, in quantum circuits, the lines can be viewed as being connected by time, i.e., the state of a qubit evolves naturally over time, in the process being operated on as indicated by the hamiltonian until a logic gate is encountered.
The quantum program refers to the total quantum circuit, wherein the total number of the quantum bits in the total quantum circuit is the same as the total number of the quantum bits of the quantum program. It can be understood that: a quantum program may consist of quantum wires, measurement operations for quantum bits in the quantum wires, registers to hold measurement results, and control flow nodes (jump instructions), and a quantum wire may contain tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process executed for all the quantum logic gates according to a certain time sequence. It should be noted that timing is the time sequence in which the single quantum logic gate is executed.
It should be noted that in the classical calculation, the most basic unit is a bit, and the most basic control mode is a logic gate, and the purpose of the control circuit can be achieved through the combination of the logic gates. Similarly, the way qubits are handled is quantum logic gates. The quantum state can be evolved by using quantum logic gates, which are the basis for forming quantum circuits, including single-bit quantum logic gates, such as Hadamard gates (H gates, Hadamard gates), pauli-X gates (X gates), pauli-Y gates (Y gates), pauli-Z gates (Z gates), RX gates, RY gates, RZ gates, and the like; multi-bit quantum logic gates such as CNOT gates, CR gates, isswap gates, Toffoli gates, etc. Quantum logic gates are typically represented using unitary matrices, which are not only matrix-form but also an operation and transformation. The function of a general quantum logic gate on a quantum state is calculated by multiplying a unitary matrix by a matrix corresponding to a quantum state right vector.
Referring to fig. 2, fig. 2 is a schematic flowchart of a method for constructing a quantum generator according to an embodiment of the present invention. The method comprises the following steps:
step 201: determining a first quantum logic gate for performing superposition operations on the quantum states of the single qubit, determining a second quantum logic gate for performing superposition operations on the quantum states of the two qubits, and determining a third quantum logic gate for performing entanglement operations on the quantum states of the two qubits;
wherein the first quantum logic gate may include at least one of an H gate, an RX gate, a RY gate, and an RZ gate.
In an embodiment of the present invention, the determining the first quantum logic gate performing the superposition operation on the quantum state of the single-quantum bit includes:
the RY gate is determined as the first quantum logic gate that performs a superposition operation on the quantum states of the single-quantum bit.
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.
In an embodiment of the present invention, the determining the second quantum logic gate performing the superposition operation on the quantum states of the two qubits includes:
acquiring four RX gates, two CNOT gates and one RZ gate;
and taking the output items of two RX gates as the input items of one CNOT gate, taking one output item of one CNOT gate as the input item of the RZ gate, taking the other output item of one CNOT gate and the output item of the RZ gate as the input items of the other CNOT gate, and taking the two output items of the other CNOT gate as the input items of the other two RX gates respectively to obtain a second quantum logic gate for performing superposition operation on the quantum states of two qubits.
As shown in fig. 3, fig. 3 is a schematic structural diagram of a second quantum logic gate according to an embodiment of the present invention.
Wherein the third quantum logic gate may include at least one of a CNOT gate, a controlled RX gate, a controlled RY gate, and a controlled RZ gate.
In an embodiment of the invention, the determining the third quantum logic gate performing the entanglement operation on the quantum states of the two qubits includes:
the controlled RY gate is determined as a third quantum logic gate that performs an entanglement operation on the quantum states of the two qubits.
Step 202: and applying 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.
Wherein a quantum generator is used to generate the generated data, the quantum generator is distinguished from the classical generator in that the input to the classical generator is random data with noise, whereas the input to the quantum generator does not need random data with noise, or the input may be |0> or |1 >.
In an embodiment of the present invention, the acting the first quantum logic gate on a data bit includes:
the first quantum logic gate is acted upon each data bit separately.
In an embodiment of the present invention, the acting the second quantum logic gate on the data bit includes:
and respectively acting the second quantum logic gate on every two adjacent data bits.
Further, in addition to the second quantum logic gate acting on each two adjacent data bits, a second quantum logic gate may also act on the first and last data bits.
In an embodiment of the present invention, the acting the third quantum logic gate on the data bit includes:
and respectively acting the third quantum logic gate on every two adjacent data bits.
Furthermore, in addition to the third quantum logic gate acting on each two adjacent data bits, a third quantum logic gate may act on the first and last data bits, where the first data bit may be a control bit and the last data bit may be a controlled bit; alternatively, the last data bit may be a control bit and the first data bit may be a controlled bit.
As shown in fig. 4, fig. 4 is a schematic structural diagram of a quantum generator according to an embodiment of the present invention. The figure includes 4 data bits: q. q.s 0 、q 1 、q 2 、q 3 The first quantum logic gate RY gate acts on q respectively 0 、q 1 、q 2 、q 3 The second quantum logic gate acts on q 0 And q is 1 、q 1 And q is 2 、q 2 And q is 3 In the above, the second quantum logic gate is the structure shown in fig. 3, and the controlled RY gates of the third quantum logic gate act on q 0 And q is 1 、q 1 And q is 2 、q 2 And q is 3 Up, the control bit is q in turn 0 、q 1 、q 2
Compared with the prior art, the method has the advantages that the first quantum logic gate for performing superposition operation on the quantum state of the single quantum bit, the second quantum logic gate for performing superposition operation on the quantum states of the two quantum bits and the third quantum logic gate for performing entanglement operation on the quantum states of the two quantum bits are determined;
applying 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; the quantum generator can further construct quantum GAN or quantum classical hybrid GAN, so that the mathematical problem is efficiently processed by using the quantum superposition characteristic, and the problems of large calculation amount of GAN and failure in convergence in the training process are solved.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a construction apparatus of a quantum generator according to an embodiment of the present invention. The device comprises:
a determining unit 501, configured to determine a first quantum logic gate that performs a superposition operation on quantum states of a single quantum bit, determine a second quantum logic gate that performs a superposition operation on quantum states of two quantum bits, and determine a third quantum logic gate that performs an entanglement operation on quantum states of two quantum bits;
an acting unit 502, configured to act 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.
Optionally, in the aspect of determining the first quantum logic gate for performing the superposition operation on the quantum state of the single-quantum bit, the determining unit 501 is specifically configured to:
the RY gate is determined as the first quantum logic gate that performs a superposition operation on the quantum states of the single-quantum bit.
Optionally, in the aspect of determining the second quantum logic gate for performing the superposition operation on the quantum states of the two qubits, the determining unit 501 is specifically configured to:
acquiring four RX gates, two CNOT gates and one RZ gate;
and taking the output items of two RX gates as the input items of one CNOT gate, taking one output item of one CNOT gate as the input item of the RZ gate, taking the other output item of one CNOT gate and the output item of the RZ gate as the input items of the other CNOT gate, and taking the two output items of the other CNOT gate as the input items of the other two RX gates respectively to obtain a second quantum logic gate for performing superposition operation on the quantum states of two qubits.
Optionally, in terms of determining a third quantum logic gate for performing an entanglement operation on quantum states of two qubits, the determining unit 501 is specifically configured to:
the controlled RY gate is determined as a third quantum logic gate that performs an entanglement operation on the quantum states of the two qubits.
Optionally, in terms of the acting of the first quantum logic gate on a data bit, the acting unit 502 is specifically configured to:
the first quantum logic gate is acted upon each data bit separately.
Optionally, in terms of the acting of the second quantum logic gate on a data bit, the acting unit 502 is specifically configured to:
and respectively acting the second quantum logic gate on every two adjacent data bits.
Optionally, in terms of applying the third quantum logic gate to a data bit, the applying unit 502 is specifically configured to:
and respectively acting the third quantum logic gate on every two adjacent data bits.
Compared with the prior art, the method comprises the steps of determining a first quantum logic gate for performing superposition operation on the quantum state of a single quantum bit, determining a second quantum logic gate for performing superposition operation on the quantum state of two quantum bits, and determining a third quantum logic gate for performing entanglement operation on the quantum state of two quantum bits;
applying 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; the quantum generator can further construct quantum GAN or quantum classical hybrid GAN, so that the mathematical problem is efficiently processed by using the quantum superposition characteristic, and the problems of large calculation amount of GAN and failure in convergence in the training process are solved.
An embodiment of the present invention further provides a storage medium, where a computer program is stored in the storage medium, where the computer program is configured to, when executed, perform the steps in any of the method embodiments in fig. 2.
Specifically, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
determining a first quantum logic gate for performing superposition operations on the quantum states of the single qubit, determining a second quantum logic gate for performing superposition operations on the quantum states of the two qubits, and determining a third quantum logic gate for performing entanglement operations on the quantum states of the two qubits;
and applying 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.
Specifically, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Yet another embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any one of the above method embodiments.
Specifically, the electronic apparatus 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.
Specifically, in this embodiment, the processor may be configured to execute the following steps by a computer program:
determining a first quantum logic gate for performing superposition operations on the quantum states of the single qubit, determining a second quantum logic gate for performing superposition operations on the quantum states of the two qubits, and determining a third quantum logic gate for performing entanglement operations on the quantum states of the two qubits;
and applying 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.
The construction, features and functions of the present invention are described in detail in the embodiments illustrated in the drawings, which are only preferred embodiments of the present invention, but the present invention is not limited by the drawings, and all equivalent embodiments modified or changed according to the idea of the present invention should fall within the protection scope of the present invention without departing from the spirit of the present invention covered by the description and the drawings.

Claims (10)

1. A method of constructing a quantum generator, the method comprising:
determining a first quantum logic gate for performing superposition operations on the quantum states of the single qubit, determining a second quantum logic gate for performing superposition operations on the quantum states of the two qubits, and determining a third quantum logic gate for performing entanglement operations on the quantum states of the two qubits;
and applying 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.
2. The method of claim 1, wherein determining the first quantum logic gate to perform the superposition operation on the quantum states of the single-quantum bit comprises:
the RY gate is determined as the first quantum logic gate that performs a superposition operation on the quantum states of the single-quantum bit.
3. The method of claim 1, wherein determining the second quantum logic gate to perform a superposition operation on quantum states of the two qubits comprises:
acquiring four RX gates, two CNOT gates and one RZ gate;
and taking the output items of two RX gates as the input items of one CNOT gate, taking one output item of one CNOT gate as the input item of the RZ gate, taking the other output item of one CNOT gate and the output item of the RZ gate as the input items of the other CNOT gate, and taking the two output items of the other CNOT gate as the input items of the other two RX gates respectively to obtain a second quantum logic gate for performing superposition operation on the quantum states of two qubits.
4. The method of claim 1, wherein determining a third quantum logic gate to perform an entanglement operation on quantum states of two qubits comprises:
the controlled RY gate is determined as a third quantum logic gate that performs an entanglement operation on the quantum states of the two qubits.
5. The method of any of claims 1-4, wherein the acting the first quantum logic gate on a data bit comprises:
the first quantum logic gate is acted upon each data bit separately.
6. The method of any of claims 1-4, wherein the acting the second quantum logic gate on a data bit comprises:
and respectively acting the second quantum logic gate on every two adjacent data bits.
7. The method of any of claims 1-4, wherein the acting the third quantum logic gate on a data bit comprises:
and respectively acting the third quantum logic gate on every two adjacent data bits.
8. A construction apparatus of a quantum generator, characterized in that the apparatus comprises:
the determining unit is used for determining a first quantum logic gate for performing superposition operation on the quantum state of a single quantum bit, determining a second quantum logic gate for performing superposition operation on the quantum states of two quantum bits, and determining a third quantum logic gate for performing entanglement operation on the quantum states of the two quantum bits;
and the action unit is used for acting 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.
9. A storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202210377504.XA 2022-04-11 2022-04-11 Method and apparatus for constructing quantum generator, medium, and electronic apparatus Pending CN114881239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210377504.XA CN114881239A (en) 2022-04-11 2022-04-11 Method and apparatus for constructing quantum generator, medium, and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210377504.XA CN114881239A (en) 2022-04-11 2022-04-11 Method and apparatus for constructing quantum generator, medium, and electronic apparatus

Publications (1)

Publication Number Publication Date
CN114881239A true CN114881239A (en) 2022-08-09

Family

ID=82669803

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210377504.XA Pending CN114881239A (en) 2022-04-11 2022-04-11 Method and apparatus for constructing quantum generator, medium, and electronic apparatus

Country Status (1)

Country Link
CN (1) CN114881239A (en)

Similar Documents

Publication Publication Date Title
CN111582491A (en) Construction method and device of quantum line
CN112633508B (en) Quantum circuit generation method and device, storage medium and electronic device
CN112232513A (en) Quantum state preparation method and device
CN114764549B (en) Quantum circuit simulation calculation method and device based on matrix product state
CN113222155B (en) Quantum circuit construction method and device, electronic device and storage medium
CN111461335A (en) Noise-containing single-quantum logic gate implementation method and device based on MPI (Multi-processor interface) multi-process
CN112633507A (en) Method and device for encoding complex vector to quantum circuit
CN114358319B (en) Machine learning framework-based classification method and related device
CN115293254A (en) Quantum multilayer perceptron-based classification method and related equipment
CN114819163B (en) Training method and device for quantum generation countermeasure network, medium and electronic device
CN112214200A (en) Quantum subtraction operation method and device, electronic device and storage medium
CN113222153A (en) Quantum state simulation method and device, storage medium and electronic device
CN113222157A (en) Quantum simulation method and device, electronic device and storage medium
CN114358318B (en) Machine learning framework-based classification method and related device
CN114511094B (en) Quantum algorithm optimization method and device, storage medium and electronic device
CN114764619B (en) Convolution operation method and device based on quantum circuit
CN115809707A (en) Quantum comparison operation method and device, electronic device and basic arithmetic assembly
CN115983392A (en) Method, device, medium and electronic device for determining quantum program mapping relation
CN114881239A (en) Method and apparatus for constructing quantum generator, medium, and electronic apparatus
CN114881238A (en) Method and apparatus for constructing quantum discriminator, medium, and electronic apparatus
CN114372584B (en) Transfer learning method based on machine learning framework and related device
CN114764620B (en) Quantum convolution operator
CN114372583B (en) Quantum program optimization method based on machine learning framework and related equipment
CN115730670A (en) Method, device, medium and electronic device for generating mode file
CN115879559A (en) Method and device for judging equivalence relation among multiple quantum states and quantum computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, Hefei high tech Zone, Hefei City, Anhui Province

Applicant after: Benyuan Quantum Computing Technology (Hefei) Co.,Ltd.

Address before: 230088 6th floor, E2 building, phase II, innovation industrial park, 2800 innovation Avenue, Hefei high tech Zone, Hefei City, Anhui Province

Applicant before: ORIGIN QUANTUM COMPUTING COMPANY, LIMITED, HEFEI