CN116050528A - Method and device for constructing amplitude amplification circuit, medium and electronic device - Google Patents

Method and device for constructing amplitude amplification circuit, medium and electronic device Download PDF

Info

Publication number
CN116050528A
CN116050528A CN202310126475.4A CN202310126475A CN116050528A CN 116050528 A CN116050528 A CN 116050528A CN 202310126475 A CN202310126475 A CN 202310126475A CN 116050528 A CN116050528 A CN 116050528A
Authority
CN
China
Prior art keywords
quantum
sub
circuit
line
operator
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.)
Granted
Application number
CN202310126475.4A
Other languages
Chinese (zh)
Other versions
CN116050528B (en
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 CN202310126475.4A priority Critical patent/CN116050528B/en
Publication of CN116050528A publication Critical patent/CN116050528A/en
Application granted granted Critical
Publication of CN116050528B publication Critical patent/CN116050528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/60Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

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

Abstract

The invention discloses a construction method, a device, a medium and an electronic device of an amplitude amplification circuit, wherein the method comprises the steps of obtaining an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data; and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data, so that the construction of the amplitude amplification circuit in a quantum search algorithm can be realized, and further the search efficiency of the target data can be improved through the quantum search algorithm.

Description

Method and device for constructing amplitude amplification circuit, medium and electronic device
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to a method and a device for constructing an amplitude amplification circuit, a medium and an electronic device.
Background
Search fields have been devoted to providing users with more accurate search results that better conform to their search intent. However, conventional computers are actually inefficient in searching unstructured data, and typically the complexity of the algorithm is o (N), which is the data size. While the amount of operation in a quantum computerThe complexity of the sub-search algorithm is
Figure BDA0004082298120000011
The quantum search algorithm is an iterative algorithm, and the amplitude of the target state is finely adjusted upwards through quantum interference, so that the probability of obtaining the target state through measurement can be highlighted during measurement. The corresponding quantum circuit mainly comprises two parts, namely a quantum state preparation circuit and an iteration circuit, wherein the iteration circuit is used for iterating the amplitude amplification circuit for a plurality of times to increase the amplitude of the target state, so that the probability of measuring the target state is increased, and the searching efficiency of searching the target data corresponding to the target state is improved. Therefore, how to implement the construction of the amplitude amplification line is a key to improve the search efficiency of the target data.
Disclosure of Invention
The invention aims to provide a construction method, a device, a medium and an electronic device of an amplitude amplification circuit, which aim to realize the construction of the amplitude amplification circuit in a quantum search algorithm and further realize the aim of improving the search efficiency of target data through the quantum search algorithm.
One embodiment of the present invention provides a method for constructing an amplitude amplifying circuit, the method comprising:
acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and 1 auxiliary bit, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000021
A is the evolution operator, ++>
Figure BDA0004082298120000022
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as |0 by the auxiliary bit>、|1>Amplitude at that time.
Optionally, the amplitude amplification operator
Figure BDA0004082298120000023
Wherein: s is S 0 =I-2|0> n+1 <0| n+1
Figure BDA0004082298120000024
Optionally, the constructing a second quantum circuit based on the amplitude amplification operator includes:
construction based on Z-gate
Figure BDA0004082298120000025
Corresponding first sub-line, build +.>
Figure BDA0004082298120000026
Corresponding second sub-line, based on the first virtual control-Z gate to construct S 0 The corresponding third sub-line and the corresponding fourth sub-line of A are constructed, and the virtual control bit of the first virtual control-Z gate is n data bits;
and cascading the first sub-circuit, the second sub-circuit, the third sub-circuit and the fourth sub-circuit in sequence to obtain a second quantum circuit.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and m auxiliary bits, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000027
A is the evolution operator, ++>
Figure BDA0004082298120000028
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as +.>
Figure BDA0004082298120000029
|1> m Amplitude at time, said->
Figure BDA00040822981200000210
And |1> m Orthogonal, m is an integer greater than 1.
Optionally, the amplitude amplification operator
Figure BDA00040822981200000211
Wherein:
Figure BDA00040822981200000212
optionally, the constructing a second quantum circuit based on the amplitude amplification operator includes:
construction based on real control-Z gate and-I gate
Figure BDA00040822981200000213
Corresponding fifth sub-line, build +.>
Figure BDA00040822981200000214
Corresponding sixth sub-line constructs S based on the second virtual control-Z gate 0 A seventh sub-line corresponding to the first virtual control-Z gate, and an eighth sub-line corresponding to the first sub-line A, wherein the virtual control bits of the second virtual control-Z gate are n data bits and m-1 auxiliary bits;
and cascading the fifth sub-line, the sixth sub-line, the seventh sub-line and the eighth sub-line in sequence to obtain a second quantum line.
Yet another embodiment of the present invention provides an apparatus for constructing an amplitude amplifying line, the apparatus including:
the information acquisition unit is used for acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
and the circuit construction unit is used for determining an amplitude amplification operator based on the evolution operator and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining the ground state corresponding to the target data is larger than the probability of obtaining the ground state corresponding to the noise data.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and 1 auxiliary bit, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000031
A is the evolution operator, ++>
Figure BDA0004082298120000032
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as |0 by the auxiliary bit>、|1>Amplitude at that time.
Optionally, the amplitude amplification operator
Figure BDA0004082298120000033
Wherein: s is S 0 =I-2|0> n+1 <0| n+1
Figure BDA0004082298120000034
Optionally, the second quantum circuit is constructed based on the amplitude amplification operator, and the circuit construction unit is specifically configured to:
construction based on Z-gate
Figure BDA0004082298120000035
Corresponding first sub-line, build +.>
Figure BDA0004082298120000036
Corresponding second subLine, S is constructed based on first virtual control-Z gate 0 The corresponding third sub-line and the corresponding fourth sub-line of A are constructed, and the virtual control bit of the first virtual control-Z gate is n data bits;
and cascading the first sub-circuit, the second sub-circuit, the third sub-circuit and the fourth sub-circuit in sequence to obtain a second quantum circuit.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and m auxiliary bits, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000037
A is the evolution operator, ++>
Figure BDA0004082298120000038
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as +.>
Figure BDA0004082298120000039
|1> m Amplitude at time, said->
Figure BDA00040822981200000310
And |1> m Orthogonal, m is an integer greater than 1.
Optionally, the amplitude amplification operator
Figure BDA0004082298120000041
Wherein:
Figure BDA0004082298120000042
optionally, the second quantum circuit is constructed based on the amplitude amplification operator, and the circuit construction unit is specifically configured to:
construction based on real control-Z gate and-I gate
Figure BDA0004082298120000043
Corresponding firstFive sub-lines, build->
Figure BDA0004082298120000044
Corresponding sixth sub-line constructs S based on the second virtual control-Z gate 0 A seventh sub-line corresponding to the first virtual control-Z gate, and an eighth sub-line corresponding to the first sub-line A, wherein the virtual control bits of the second virtual control-Z gate are n data bits and m-1 auxiliary bits;
and cascading the fifth sub-line, the sixth sub-line, the seventh sub-line and the eighth sub-line in sequence to obtain a second quantum line.
A further embodiment of the invention provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of the preceding claims when run.
Yet another embodiment of the invention provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the method described in any of the above.
Compared with the prior art, the method, the device, the medium and the electronic device for constructing the amplitude amplification circuit are characterized in that the evolution operator corresponding to the first quantum circuit is obtained, the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by the linear combination of two orthogonal ground states corresponding to target data and noise data; and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data, so that the construction of the amplitude amplification circuit in a quantum search algorithm can be realized, and further the search efficiency of the target data can be improved through the quantum search algorithm.
Drawings
Fig. 1 is a hardware block diagram of a computer terminal according to a method for constructing an amplitude amplifying circuit according to an embodiment of the present invention;
fig. 2 is a flow chart of a method for constructing an amplitude amplifying circuit according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a second quantum circuit according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of another second quantum circuit according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a device for constructing an amplitude amplifying circuit according to an embodiment of the present invention.
Detailed Description
The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
The embodiment of the invention firstly provides a construction method of an amplitude amplification circuit, which can be applied to electronic equipment such as a computer terminal, in particular to a common computer, a quantum computer and the like.
The following describes the operation of the computer terminal in detail by taking it as an example. Fig. 1 is a hardware block diagram of a computer terminal according to a method for constructing an amplitude amplifying circuit according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing a construction method of an amplitude amplification circuit, and optionally, a transmission device 106 for a communication function and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. 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 method for constructing an amplitude amplification circuit in the embodiment of the present application, and the processor 102 executes the software programs and modules stored in the memory 104, thereby performing various functional applications and data processing, that is, implementing the method described above. 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, which may be connected to the computer terminal via 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 means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It should be noted that a real quantum computer is a hybrid structure, which includes two major parts: part of the computers are classical computers and are responsible for performing classical computation and control; the other part is quantum equipment, which is responsible for running quantum programs so as to realize quantum computation. The quantum program is a series of instruction sequences written by a quantum language such as the qlunes language and capable of running on a quantum computer, so that the support of quantum logic gate operation is realized, and finally, quantum computing is realized. Specifically, the quantum program is a series of instruction sequences for operating the quantum logic gate according to a certain time sequence.
In practical applications, quantum computing simulations are often required to verify quantum algorithms, quantum applications, etc., due to the development of quantum device hardware. Quantum computing simulation is a process of realizing simulated 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 construct a quantum program corresponding to a specific problem. The quantum program, namely the program for representing the quantum bit and the evolution thereof written in the classical language, wherein the quantum bit, the quantum logic gate and the like related to quantum computation are all represented by corresponding classical codes.
Quantum circuits, which are one embodiment of quantum programs and weigh sub-logic circuits as well, are the most commonly used general quantum computing models, representing circuits that operate on qubits under an abstract concept, and their composition includes qubits, circuits (timelines), and various quantum logic gates, and finally the result often needs to be read out through quantum measurement operations.
Unlike conventional circuits, which are connected by metal lines to carry voltage or current signals, in a quantum circuit, the circuit can be seen as being connected by time, i.e., the state of the qubit naturally evolves over time, as indicated by the hamiltonian operator, during which it is operated until a logic gate is encountered.
One quantum program is corresponding to one total quantum circuit, and the quantum program refers to the total quantum circuit, wherein the total number of quantum bits in the total quantum circuit is the same as the total number of quantum bits of the quantum program. It can be understood that: one quantum program may consist of a quantum circuit, a measurement operation for the quantum bits in the quantum circuit, a register to hold the measurement results, and a control flow node (jump instruction), and one quantum circuit may contain several tens of hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process of executing all quantum logic gates according to a certain time sequence. Note that the timing is the time sequence in which a single quantum logic gate is executed.
It should be noted that, in a common computing device based on a silicon chip, the unit of the processing chip is a CMOS tube, and such a computing unit is not limited by time and coherence, i.e., such a computing unit is not limited by the time of use, and is available at any time. Furthermore, currently, the number of such calculation units in a silicon chip is sufficient, i.e. the number of calculation units in one chip is thousands of at present. The number of computational cells is sufficient and the CMOS transistor selectable computational logic is fixed, for example: and AND logic. When the CMOS tube is used for operation, a large number of CMOS tubes are combined with limited logic functions, so that the operation effect is realized.
Unlike such logic units in conventional computing devices, in current quantum computers the basic computing unit is a qubit, the input of which is limited by coherence and also by coherence time, i.e. the qubit is limited in terms of time of use and is not readily available. Full use of qubits within the usable lifetime of the qubits is a critical challenge for quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of the performance of the quantum computer, each of the qubits realizes a calculation function by a logic function configured as needed, whereas the logic function in the field of quantum calculation is diversified in view of the limited number of qubits, for example: hadamard gates (Hadamard gates, H gates), brix-gates (X gates), brix-Y gates (Y gates), brix-Z gates (Z gates), RX gates, RY gates, RZ gates, CNOT gates, CR gates, issnap gates, toffoli gates, and the like. Quantum logic gates are typically represented using unitary matrices, which are not only in matrix form, but also an operation and transformation. The effect of a general quantum logic gate on a quantum state is calculated by multiplying the unitary matrix by a matrix corresponding to the right vector of the quantum state. During quantum computation, the operation effect is realized by combining limited quantum bits with various logic function combinations.
Based on these differences of the quantum computer, the design of the logic function on the quantum bits (including the design of whether the quantum bits are used or not and the design of the use efficiency of each quantum bit) is a key for improving the operation performance of the quantum computer, and special design is required. The above design for qubits is a technical problem that is not considered nor faced by common computing devices.
Referring to fig. 2, fig. 2 is a flow chart of a method for constructing an amplitude amplifying circuit according to an embodiment of the present invention. The method comprises the following steps:
step 201: acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
any data set may be represented as data that is desired by the user and data that is not desired by the user. Thus in a quantum search algorithm, a data set may be encoded into quantum states, which is then divided by a first quantum wire into data that is needed by the user and data that is not needed by the user, i.e. target data and noise data. The probability of obtaining the target data by searching can be increased only by increasing the probability of obtaining the target state corresponding to the target data by measuring.
By way of example, example 1: if the data set includes 0 and 1, the target data is 0, the noise data is 1, and when no optimization is performed, the data set may need to be searched twice in the database through a classical search algorithm to obtain 0; if the probability of 0 measurement can be increased, the closer the probability of 0 measurement is to 1, the fewer the number of searches, the closer to 1.
Likewise, example 2: if the data set includes 0, 1, 2, and 3, the noise data is 1, 2, and 3. In this case, the classical search algorithm may divide 0, 1, 2, and 3 into equal parts, determine which part includes 0, and then determine which data in the part including 0 is 0. In the quantum search algorithm, 0 is represented by one ground state, and 1, 2, 3 are represented by another orthogonal ground state. The probability of obtaining 0 by the measurement is increased, so that the searching times are reduced.
Wherein the first quantum circuit and the second quantum circuit each comprise n data bits and 1 auxiliary bit, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000081
A is the evolution operator, ++>
Figure BDA0004082298120000082
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as |0 by the auxiliary bit>、|1>Amplitude at that time.
For example 1: only 1 data bit and 1 auxiliary bit are needed, and the data bit and the auxiliary bit can be respectively used0 of the data bits<And |1<Representing classical data 0 and 1, i.e
Figure BDA0004082298120000083
If 0 and 1 occur the same number of times in the dataset, i.e
Figure BDA0004082298120000084
Then the evolution operator a may be H 1 The H is 1 The corresponding H-gate only acts on the data bits.
For example 2: then 2 data bits and 1 auxiliary bit are required, and the |00 of the data bits can be used separately>、|01>、|10>、|11>Representing classical data 0, 1, 2, 3, then
Figure BDA0004082298120000085
Figure BDA0004082298120000086
If 0, 1, 2, 3 occur in the dataset the same number of times, i.e. +.>
Figure BDA0004082298120000087
sin θ=1/2, then the evolution operator a may be
Figure BDA0004082298120000088
H 1 The corresponding H gate acts on the first data bit, H 2 The corresponding H-gate acts on the first data bit.
Wherein the first quantum circuit and the second quantum circuit each comprise n data bits and m auxiliary bits, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000089
A is the evolution operator, ++>
Figure BDA00040822981200000810
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as +.>
Figure BDA0004082298120000091
|1> m Amplitude at time, said->
Figure BDA0004082298120000092
And |1> m Orthogonal, m is an integer greater than 1.
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0004082298120000093
to divide by |1> m Other states than this. For the case where the auxiliary bits are plural, the structure of the first quantum wire is similar to that of the case where the auxiliary bits are 1, and reference can be made to the first quantum wire of the case where the auxiliary bits are 1.
Step 202: and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data.
In one embodiment of the present invention, the amplitude amplification operator when the number of auxiliary bits is 1
Figure BDA0004082298120000094
Wherein: s is S 0 =I-2|0> n+1 <0| n+1 ,/>
Figure BDA0004082298120000095
Specifically, the constructing a second quantum wire based on the amplitude amplification operator includes:
construction based on Z-gate
Figure BDA0004082298120000096
Corresponding first sub-line, build +.>
Figure BDA0004082298120000097
Corresponding second sub-line based on first virtual control-Z gateConstruction S 0 The corresponding third sub-line and the corresponding fourth sub-line of A are constructed, and the virtual control bit of the first virtual control-Z gate is n data bits;
and cascading the first sub-circuit, the second sub-circuit, the third sub-circuit and the fourth sub-circuit in sequence to obtain a second quantum circuit.
Further, the Z-gate based construction
Figure BDA0004082298120000098
A corresponding first sub-line comprising: and applying the Z gate to the auxiliary bit to obtain a first sub-line. />
Further, the construction
Figure BDA0004082298120000099
A corresponding second sub-line comprising: said->
Figure BDA00040822981200000910
The corresponding quantum logic gate acts on n of said data bits and 1 of said auxiliary bits, resulting in a second sub-line.
Further, the construction S based on the first virtual control-Z gate 0 A corresponding third sub-line comprising: and applying a first virtual control-Z gate to the n data bits and 1 auxiliary bit to obtain a third sub-line, wherein the virtual control bit of the first virtual control-Z gate is the n data bits, and the controlled bit is the 1 auxiliary bit.
Further, the constructing a fourth sub-line corresponding to a includes: and acting the quantum logic gate corresponding to the A on n data bits and 1 auxiliary bit to obtain a fourth sub-line.
It should be noted that, since:
Figure BDA00040822981200000911
the calculation and verification can be obtained:
Figure BDA0004082298120000101
wherein S is 0 The matrix of (a) is represented as follows:
Figure BDA0004082298120000102
thus, the third sub-line may be built based on the first virtual control-Z gate.
Due to
Figure BDA0004082298120000103
And->
Figure BDA0004082298120000104
Unknown (I)>
Figure BDA0004082298120000105
The matrix of (2) cannot be given directly, even +.>
Figure BDA0004082298120000106
And->
Figure BDA0004082298120000107
It is also known that its construction is cumbersome. However, as can be seen from the above formula (1), there is +.>
Figure BDA0004082298120000108
Will only act on
Figure BDA0004082298120000109
By acting on the quantum state of->
Figure BDA00040822981200001010
The following equation can be obtained:
Figure BDA00040822981200001011
thus, the construction of the first quantum wire may be achieved by acting a-Z gate on the auxiliary bit.
Fig. 3 is a schematic structural diagram of a second quantum circuit according to an embodiment of the present invention, as shown in fig. 3.
In another embodiment of the present invention, when the number of auxiliary bits is m, the amplitude amplification operator
Figure BDA00040822981200001012
Wherein: />
Figure BDA00040822981200001013
Figure BDA00040822981200001014
Wherein, due to:
Figure BDA00040822981200001015
so that:
Figure BDA00040822981200001016
/>
Figure BDA00040822981200001017
it can be seen that Q is virtually identical to that inside the amplitude amplification.
In this case, the qubit to be estimated in FIG. 3 is not the last bit, so the active position of the Quantum logic gate in FIG. 3 needs to be changed, only |1 needs to be considered> m Amplitude estimation conditions of (a).
Specifically, the constructing a second quantum wire based on the amplitude amplification operator includes:
construction based on real control-Z gate and-I gate
Figure BDA00040822981200001018
Corresponding fifth sub-line, build +.>
Figure BDA00040822981200001019
Corresponding sixth sub-line constructs S based on the second virtual control-Z gate 0 A seventh sub-line corresponding to the first virtual control-Z gate, and an eighth sub-line corresponding to the first sub-line A, wherein the virtual control bits of the second virtual control-Z gate are n data bits and m-1 auxiliary bits;
and cascading the fifth sub-line, the sixth sub-line, the seventh sub-line and the eighth sub-line in sequence to obtain a second quantum line.
Further, the real control-Z gate and-I gate based construction
Figure BDA0004082298120000111
A corresponding fifth sub-line comprising:
applying a real control-Z gate to m of the auxiliary bits and applying an-I gate to another of the auxiliary bits to obtain
Figure BDA0004082298120000112
And a corresponding fifth sub-line, wherein the real control bit of the real control-Z gate is m-1 auxiliary bits, and the controlled bit of the real control-Z gate is another auxiliary bit.
Further, the construction
Figure BDA0004082298120000113
A corresponding sixth sub-line comprising: will->
Figure BDA0004082298120000114
The corresponding quantum logic gate acts on n of said data bits and m of said auxiliary bits, resulting in a sixth sub-line.
Further, the construction S based on the second virtual control-Z gate 0 A corresponding seventh sub-line comprising:
and a second virtual control-Z gate is acted on the n data bits and the m auxiliary bits to obtain a seventh sub-line, wherein the virtual control bits of the second virtual control-Z gate are the n data bits and the m-1 auxiliary bits, and the controlled bits of the second virtual control-Z gate are the other auxiliary bits.
Further, the constructing an eighth sub-line corresponding to a includes: and acting the quantum logic gate corresponding to the A on n data bits and m auxiliary bits.
Wherein the-Z gate can be constructed based on the Z gate and the RX gate with a rotation angle of 2pi. The I gate is constructed based on the I gate, the matrix to which the I gate corresponds being the identity matrix.
Wherein, virtual control refers to that when the quantum state of the control bit is |0>, the corresponding quantum logic gate is executed. For example, the first virtually controlled-Z gate indicates that the-Z gate acting on the auxiliary bit is only implemented when all of the quantum states of the n data bits are |0 >. Likewise, real control refers to the execution of the corresponding quantum logic gate when the quantum state of the control bit is |0 >. For example, the above-mentioned real control-Z indicates that the-Z gate acting on another of the auxiliary bits is performed when the quantum state of m-1 auxiliary bits is |1 >.
Fig. 4 is a schematic structural diagram of another second quantum circuit according to an embodiment of the present invention, as shown in fig. 4.
Compared with the prior art, the method for constructing the amplitude amplification circuit is characterized in that an evolution operator corresponding to a first quantum circuit is obtained, the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data; and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data, so that the construction of the amplitude amplification circuit in a quantum search algorithm can be realized, and further the search efficiency of the target data can be improved through the quantum search algorithm.
The embodiment of the invention also provides a target data searching method, which comprises the following steps:
receiving a target data searching task, wherein the target data searching task is used for searching target data and carries a first quantum circuit;
acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data;
creating a quantum search circuit based on the second quantum circuit, and sending the quantum search circuit to a quantum computing module;
and receiving a measurement result returned by the quantum computing module, and determining a search result based on the measurement result.
In practice, rough measurement is generally performed first, statistics are made
Figure BDA0004082298120000121
Then the number of iterations is adjusted according to p.
Specifically, the number of iterations of the second quantum wire in the quantum search wire is
Figure BDA0004082298120000122
Wherein p is a small number of statistical measures
Figure BDA0004082298120000123
CI represents a downward value.
The quantum computing module can generate a logic signal according to the quantum search circuit, send the logic signal to the quantum bit and excite the quantum bit from an initial state to a target state; the quantum computing module can also generate and send a measuring signal, and the measuring signal is used for measuring the quantum bit after excitation to the target state, so as to obtain a measuring result.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a construction apparatus of an amplitude amplifying circuit according to an embodiment of the present invention. The device comprises:
an information obtaining unit 501, configured to obtain an evolution operator corresponding to a first quantum circuit, where the first quantum circuit is configured to obtain a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
the circuit construction unit 502 is configured to determine an amplitude amplification operator based on the evolution operator, and construct a second quantum circuit based on the amplitude amplification operator, where when the auxiliary bit in the second quantum circuit is measured, a probability of obtaining a ground state corresponding to the target data is greater than a probability of obtaining a ground state corresponding to the noise data.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and 1 auxiliary bit, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000131
A is the evolution operator, ++>
Figure BDA0004082298120000132
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as |0 by the auxiliary bit>、|1>Amplitude at that time.
Optionally, the amplitude amplification operator
Figure BDA0004082298120000133
Wherein: s is S 0 =I-2|0> n+1 <0| n+1
Figure BDA0004082298120000134
Optionally, the constructing a second quantum circuit based on the amplitude amplification operator, where the circuit constructing unit 502 is specifically configured to:
construction based on Z-gate
Figure BDA0004082298120000135
Corresponding first sub-line, build +.>
Figure BDA00040822981200001310
Corresponding second sub-line, based on the first virtual control-Z gate to construct S 0 The corresponding third sub-line and the corresponding fourth sub-line of A are constructed, and the virtual control bit of the first virtual control-Z gate is n data bits;
and cascading the first sub-circuit, the second sub-circuit, the third sub-circuit and the fourth sub-circuit in sequence to obtain a second quantum circuit.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and m auxiliary bits, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000136
A is the evolution operator, ++>
Figure BDA0004082298120000137
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as +.>
Figure BDA0004082298120000138
|1> m Amplitude at time, said->
Figure BDA0004082298120000139
And |1> m Orthogonal, m is an integer greater than 1.
Optionally, the first quantum circuit and the second quantum circuit each include n data bits and m auxiliary bits, and the linear expression corresponding to the first quantum circuit is that
Figure BDA0004082298120000141
A is the evolution operator, ++>
Figure BDA0004082298120000142
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as +.>
Figure BDA0004082298120000143
|1> m Amplitude at time, said->
Figure BDA0004082298120000144
And |1> m Orthogonal, m is an integer greater than 1.
Optionally, the amplitude amplification operator
Figure BDA0004082298120000145
Wherein:
Figure BDA0004082298120000146
optionally, the constructing a second quantum circuit based on the amplitude amplification operator includes:
construction based on real control-Z gate and-I gate
Figure BDA0004082298120000147
Corresponding fifth sub-line, build +.>
Figure BDA0004082298120000148
Corresponding sixth sub-line constructs S based on the second virtual control-Z gate 0 A seventh sub-line corresponding to the first virtual control-Z gate, and an eighth sub-line corresponding to the first sub-line A, wherein the virtual control bits of the second virtual control-Z gate are n data bits and m-1 auxiliary bits;
and cascading the fifth sub-line, the sixth sub-line, the seventh sub-line and the eighth sub-line in sequence to obtain a second quantum line.
The embodiment of the invention also provides a storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the method embodiments described above when run.
Specifically, in the present embodiment, the above-described storage medium may be configured to store a computer program for executing the steps of:
acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data.
Specifically, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Still another embodiment of the present invention provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to perform the steps of the method embodiment of any of the above.
Specifically, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.

Claims (10)

1. A method of constructing an amplitude amplifying circuit, the method comprising:
acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
and determining an amplitude amplification operator based on the evolution operator, and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining a ground state corresponding to the target data is larger than the probability of obtaining a ground state corresponding to the noise data.
2. The method of claim 1, wherein the first quantum wire and the second quantum wire each comprise n data bits and 1 auxiliary bit, and the first quantum wire corresponds to a linear expression of
Figure FDA0004082298110000011
A is the evolution operator, ++>
Figure FDA0004082298110000012
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively measured as |0 by the auxiliary bit>、|1>Amplitude at that time.
3. The method of claim 2, wherein the amplitude amplification operator
Figure FDA0004082298110000013
Wherein: s is S 0 =I-2|0> n+1 <0| n+1 ,/>
Figure FDA0004082298110000014
4. The method of claim 3, wherein the constructing a second quantum wire based on the amplitude amplification operator comprises:
construction based on Z-gate
Figure FDA0004082298110000015
Corresponding first sub-line, build +.>
Figure FDA0004082298110000016
Corresponding second sub-line, based on the first virtual control-Z gate to construct S 0 The corresponding third sub-line and the corresponding fourth sub-line of A are constructed, and the virtual control bit of the first virtual control-Z gate is n data bits;
and cascading the first sub-circuit, the second sub-circuit, the third sub-circuit and the fourth sub-circuit in sequence to obtain a second quantum circuit.
5. The method of claim 1, wherein the first quantum wire and the second quantum wire each comprise n data bits and m auxiliary bits, and the linear expression corresponding to the first quantum wire is
Figure FDA0004082298110000017
A is the evolution operator, ++>
Figure FDA0004082298110000018
The base states corresponding to the noise data and the target data are respectively, and cos theta and sin theta are respectively the auxiliary bits measured as
Figure FDA0004082298110000019
Amplitude at time, said->
Figure FDA00040822981100000111
And |1> m Orthogonal, m is an integer greater than 1.
6. The method of claim 5, wherein the amplitude amplification operator
Figure FDA00040822981100000110
Wherein:
Figure FDA0004082298110000021
7. the method of claim 6, wherein the constructing a second quantum wire based on the amplitude amplification operator comprises:
construction based on real control-Z gate and-I gate
Figure FDA0004082298110000022
Corresponding fifth sub-line, build +.>
Figure FDA0004082298110000023
Corresponding sixth sub-line constructs S based on the second virtual control-Z gate 0 A seventh sub-line corresponding to the first virtual control-Z gate, and an eighth sub-line corresponding to the first sub-line A, wherein the virtual control bits of the second virtual control-Z gate are n data bits and m-1 auxiliary bits;
and cascading the fifth sub-line, the sixth sub-line, the seventh sub-line and the eighth sub-line in sequence to obtain a second quantum line.
8. An apparatus for constructing an amplitude amplifying circuit, comprising:
the information acquisition unit is used for acquiring an evolution operator corresponding to a first quantum circuit, wherein the first quantum circuit is used for obtaining a target quantum state, and the target quantum state is represented by a linear combination of two orthogonal ground states corresponding to target data and noise data;
and the circuit construction unit is used for determining an amplitude amplification operator based on the evolution operator and constructing a second quantum circuit based on the amplitude amplification operator, wherein when auxiliary bits in the second quantum circuit are measured, the probability of obtaining the ground state corresponding to the target data is larger than the probability of obtaining the ground state corresponding to the noise data.
9. A storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 7 when run.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 7.
CN202310126475.4A 2023-02-07 2023-02-07 Method and device for constructing amplitude amplification circuit, medium and electronic device Active CN116050528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310126475.4A CN116050528B (en) 2023-02-07 2023-02-07 Method and device for constructing amplitude amplification circuit, medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310126475.4A CN116050528B (en) 2023-02-07 2023-02-07 Method and device for constructing amplitude amplification circuit, medium and electronic device

Publications (2)

Publication Number Publication Date
CN116050528A true CN116050528A (en) 2023-05-02
CN116050528B CN116050528B (en) 2024-06-14

Family

ID=86122247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310126475.4A Active CN116050528B (en) 2023-02-07 2023-02-07 Method and device for constructing amplitude amplification circuit, medium and electronic device

Country Status (1)

Country Link
CN (1) CN116050528B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110188885A (en) * 2019-06-28 2019-08-30 合肥本源量子计算科技有限责任公司 A kind of quantum calculation analogy method, device, storage medium and electronic device
US20190318053A1 (en) * 2018-04-12 2019-10-17 Microsoft Technology Licensing, Llc Hamiltonian simulation in the interaction picture
WO2022143224A1 (en) * 2020-12-29 2022-07-07 合肥本源量子计算科技有限责任公司 Amplitude estimation method and device for quantum circuit, storage medium, and electronic device
CN115298675A (en) * 2020-03-10 2022-11-04 Qc韦尔公司 Method for amplitude estimation using a noisy medium-scale quantum computer
CN115456189A (en) * 2022-08-18 2022-12-09 北京百度网讯科技有限公司 Quantum simulation method, device, equipment and storage medium
CN115545210A (en) * 2021-06-11 2022-12-30 华为技术有限公司 Method and related apparatus for quantum computing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190318053A1 (en) * 2018-04-12 2019-10-17 Microsoft Technology Licensing, Llc Hamiltonian simulation in the interaction picture
CN110188885A (en) * 2019-06-28 2019-08-30 合肥本源量子计算科技有限责任公司 A kind of quantum calculation analogy method, device, storage medium and electronic device
CN115298675A (en) * 2020-03-10 2022-11-04 Qc韦尔公司 Method for amplitude estimation using a noisy medium-scale quantum computer
WO2022143224A1 (en) * 2020-12-29 2022-07-07 合肥本源量子计算科技有限责任公司 Amplitude estimation method and device for quantum circuit, storage medium, and electronic device
CN114757357A (en) * 2020-12-29 2022-07-15 合肥本源量子计算科技有限责任公司 Amplitude estimation method and device for quantum line, storage medium and electronic device
CN115545210A (en) * 2021-06-11 2022-12-30 华为技术有限公司 Method and related apparatus for quantum computing
CN115456189A (en) * 2022-08-18 2022-12-09 北京百度网讯科技有限公司 Quantum simulation method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龙桂鲁;刘洋;: "广义量子干涉原理及对偶量子计算机", 物理学进展, no. 04, 20 December 2008 (2008-12-20) *

Also Published As

Publication number Publication date
CN116050528B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
US20210132969A1 (en) Quantum Virtual Machine for Simulation of a Quantum Processing System
CN111461335A (en) Noise-containing single-quantum logic gate implementation method and device based on MPI (Multi-processor interface) multi-process
Silva et al. FPGA quantum computing emulator using high level design tools
CN116090568B (en) Method and device for determining size relation between quantum data and classical floating point data
CN114819168B (en) Quantum comparison method and device for matrix eigenvalues
CN114492815A (en) Method, device and medium for calculating target system energy based on quantum chemistry
CN116050528B (en) Method and device for constructing amplitude amplification circuit, medium and electronic device
CN114511094B (en) Quantum algorithm optimization method and device, storage medium and electronic device
CN114519429B (en) Method, device and medium for obtaining observability quantity of target system
CN115879562B (en) Quantum program initial mapping determination method and device and quantum computer
CN114912619A (en) Quantum computing task scheduling method and device and quantum computer operating system
CN114862079A (en) Risk value estimation method, device, medium, and electronic device based on quantum line
US20220398482A1 (en) Method for simulating a real spin system, more particularly a noisy spin system, by means of a quantum computer
CN114819169B (en) Quantum estimation method and device for matrix condition number
CN118153701A (en) Method and device for constructing quantum data structure
CN115147201A (en) Quantum option estimation method based on mirror symmetry processing and related device
CN115700572B (en) Quantum solving method and device for grid equation and physical equation iteration
CN115131120A (en) Quantum option estimation method based on least square method and related device
CN117669757A (en) Hamiltonian volume construction method and device
CN118153695A (en) Quantum state preparation method and device
CN118313477A (en) Double-point quantum operation method in elliptic curve and related device
CN118095457A (en) Method and device for constructing mold reverse measuring sub-circuit, medium and electronic device
CN117852665A (en) Quantum circuit-based physical system state prediction method and related device
CN117852660A (en) Construction method and device of variable component sub-circuit, medium and electronic device
CN114881238A (en) Method and apparatus for constructing quantum discriminator, medium, and electronic apparatus

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, 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, high tech Zone, Hefei City, Anhui Province

Applicant before: ORIGIN QUANTUM COMPUTING COMPANY, LIMITED, HEFEI

GR01 Patent grant
GR01 Patent grant