CN112000673A - Method and device for inquiring transaction elements by using quantum line - Google Patents

Method and device for inquiring transaction elements by using quantum line Download PDF

Info

Publication number
CN112000673A
CN112000673A CN202010897672.2A CN202010897672A CN112000673A CN 112000673 A CN112000673 A CN 112000673A CN 202010897672 A CN202010897672 A CN 202010897672A CN 112000673 A CN112000673 A CN 112000673A
Authority
CN
China
Prior art keywords
quantum
transaction
amplitude
index
circuit
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
CN202010897672.2A
Other languages
Chinese (zh)
Other versions
CN112000673B (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 CN202010897672.2A priority Critical patent/CN112000673B/en
Publication of CN112000673A publication Critical patent/CN112000673A/en
Application granted granted Critical
Publication of CN112000673B publication Critical patent/CN112000673B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Fuzzy Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Mathematics (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Complex Calculations (AREA)
  • Superconductor Devices And Manufacturing Methods Thereof (AREA)

Abstract

The invention discloses a method and a device for inquiring transaction elements by using a quantum line, wherein the method comprises the following steps: the method comprises the steps of obtaining a transaction database at least comprising transaction indexes and transaction elements corresponding to the transaction indexes, constructing a first quantum circuit with binary values of the transaction indexes, the transaction elements and transaction elements to be inquired encoded by quantum logic gates and quantum bits, operating the first quantum circuit, outputting quantum states comprising the binary values of the transaction indexes and first amplitudes corresponding to the quantum states, and determining transaction index results corresponding to the transaction elements to be inquired according to the probability corresponding to the first amplitudes. By utilizing the embodiment of the invention, the quantum circuit can be designed in the field of quantum computing, so that the defect of low efficiency of inquiring transaction elements in the prior art is overcome.

Description

Method and device for inquiring transaction elements by using quantum line
Technical Field
The invention belongs to the technical field of quantum computing, and particularly relates to a method and a device for inquiring transaction elements by using quantum lines.
Background
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.
The quantum computation simulation is a simulation computation which simulates and follows the law of quantum mechanics by means of numerical computation and computer science, and is used as a simulation program which describes the space-time evolution of quantum states by utilizing the high-speed computing capability of a computer according to the basic law of quantum bits of the quantum mechanics.
Association rule mining is used to describe the association between things and to mine the relevance between things, it is to search the transaction database for explicit or implicit relationships that exist between two items, facilitating management and decision making. The core of the method is to obtain a frequent item set through statistical data items, and the method is widely applied to the fields of classification design, bundled sales, warehouse storage and inventory configuration and the like and is a research hotspot for analyzing and processing current big data.
In real life, the association rule reflects the interdependency and association between one thing and other things, and is commonly used in a recommendation system of an entity store or an online e-commerce: the method aims to find the inherent commonalities of the purchasing habits of the customer groups, such as the probability of purchasing the product A and the product B, through carrying out association rule mining on the purchasing transaction database of the customer, and according to the mining result, the layout and display of the goods shelf are adjusted, and a sales promotion combination scheme is designed, so that the sales volume is improved.
In the prior art, the basic idea is to find out an item set (i.e. a frequent item set) satisfying the minimum support degree in a transaction database, and then generate an association rule according to the frequent item set. The method is characterized in that whether the item set is a frequent item set or not is judged, the item set is searched layer by layer through an iterative method, a database needs to be scanned completely once in each search, the traditional serial mode is very low in efficiency, and a bottleneck can be generated in the processing capacity in a large data environment.
Based on this, it is necessary to use the parallel characteristic of the quantum algorithm to construct quantum wires to solve the problem of low efficiency of querying transaction elements in the prior art.
Disclosure of Invention
The invention aims to provide a method and a device for inquiring transaction elements by using quantum wires, which are used for solving the defects in the prior art, can realize the design of the quantum wires in the field of quantum computing and solve the defect of low efficiency of inquiring the transaction elements in the prior art.
One embodiment of the present application provides a method of querying a transaction element using a quantum line, the method comprising:
acquiring a transaction database at least comprising transaction indexes and corresponding transaction elements;
constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired;
and operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
Optionally, after constructing a first quantum wire encoded with binary values of the transaction index, the transaction element, and the transaction element to be queried, the method further comprises:
adding the first quantum circuit to a first preset quantum bit position in a first preset quantum circuit according to a first preset time sequence to obtain a second quantum circuit at least used for amplitude updating;
the operating the first quantum circuit, outputting a quantum state including a binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be queried according to a probability corresponding to each first amplitude, including:
and operating the second quantum circuit, outputting a quantum state containing a binary value of each transaction index and a corresponding second amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each second amplitude, wherein the second amplitude is the amplitude obtained by updating the first amplitude once.
Optionally, after the first quantum wire is added to a first predetermined qubit position in a first predetermined quantum wire according to a first predetermined timing sequence to obtain a second quantum wire at least used for amplitude updating, the method further includes:
adding a plurality of second quantum wires to second preset quantum bit positions in second preset quantum wires in sequence according to a second preset time sequence to obtain a third quantum wire at least used for iteratively updating the amplitude for multiple times;
the operating the second quantum circuit, outputting a quantum state including a binary value of each transaction index and a second amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be queried according to a probability corresponding to each second amplitude, including:
and operating a second combination quantum circuit, outputting a quantum state containing the binary value of each transaction index and a third amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each third amplitude, wherein the third amplitude is the amplitude obtained by repeatedly updating the first amplitude for multiple times.
Optionally, the constructing, by using the quantum logic gate and the quantum bit, a quantum line encoded with binary values of the transaction index, the transaction element, and the transaction element to be queried includes:
acquiring a group of quantum bits according to the transaction index and the binary digit number of the transaction element;
coding a transaction index binary value and a transaction element binary value corresponding to each piece of transaction information in the transaction database to a first quantum bit in sequence to construct a first sub-quantum circuit; wherein a binary bit corresponds to the first qubit;
coding the binary value of the transaction element to be inquired to the quantum bit corresponding to the transaction element, and adding a preset quantum logic gate to a second quantum bit to construct a second sub-quantum circuit; wherein the preset quantum logic gate comprises a Pagli-X gate;
adding a controlled U1 quantum logic gate operation to the second quantum bit to construct a third sub-quantum circuit;
sequentially adding the transposition conjugation operation corresponding to the second sub-quantum circuit and the transposition conjugation operation corresponding to the first sub-quantum circuit to construct a fourth sub-quantum circuit;
and sequentially combining the first sub-quantum line, the second sub-quantum line, the third sub-quantum line and the fourth sub-quantum line into a quantum line which is encoded with the transaction index, the transaction element and the binary value of the transaction element to be inquired according to the preset quantum bit corresponding relation among the sub-quantum lines.
Optionally, the determining, according to the probability corresponding to each first amplitude, a transaction index result corresponding to the transaction element to be queried includes:
and calculating the probability corresponding to each first amplitude, and determining the transaction index value contained in the quantum state corresponding to the maximum probability in each probability as the transaction index result corresponding to the transaction element to be inquired.
Another embodiment of the present application provides an apparatus for constructing a quantum line, the apparatus including:
the acquisition module is used for acquiring a transaction database at least comprising transaction indexes and corresponding transaction elements;
the construction module is used for constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired;
and the output module is used for operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
Optionally, after the building block, the apparatus further includes:
the first adding module is used for adding the first quantum wire to a first preset quantum bit position in a first preset quantum wire according to a first preset time sequence to obtain a second quantum wire at least used for amplitude updating;
the output module includes:
and the first output unit is used for operating the second quantum circuit, outputting a quantum state containing a binary value of each transaction index and a corresponding second amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each second amplitude, wherein the second amplitude is the amplitude obtained by updating the first amplitude once.
Optionally, after the first adding module, the apparatus further includes:
the second adding module is used for sequentially adding the plurality of second quantum wires to second preset quantum bit positions in the second preset quantum wires according to a second preset time sequence to obtain a third quantum wire at least used for iteratively updating the amplitude for multiple times;
the first output unit includes:
and the second output unit is used for operating a second combined quantum circuit, outputting a quantum state containing a binary value of each transaction index and a third amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each third amplitude, wherein the third amplitude is the amplitude obtained by repeatedly updating the first amplitude for multiple times.
A further embodiment of the application 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 executed.
Yet another embodiment of the present application 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 for inquiring transaction elements by using quantum circuits comprises the steps of firstly obtaining a transaction database at least comprising transaction indexes and corresponding transaction elements, then constructing a first quantum circuit which is encoded with the transaction indexes, the transaction elements and binary values of the transaction elements to be inquired by using quantum logic gates and quantum bits, operating the first quantum circuit, outputting quantum states comprising the binary values of the transaction indexes and corresponding first amplitudes, and determining transaction index results corresponding to the transaction elements to be inquired according to the probability corresponding to each first amplitude, so that quantum circuits are designed in the field of quantum computation.
Drawings
Fig. 1 is a block diagram illustrating a hardware structure of a computer terminal according to a method for querying transaction elements using quantum lines according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for querying a transaction element using a quantum line according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a first sub-quantum wire according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a second sub-quantum wire according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a third sub-quantum wire according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a fourth sub-quantum wire according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a first quantum wire according to an embodiment of the present invention;
fig. 8 is a schematic diagram of a first predetermined quantum wire according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a second quantum wire according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a third quantum wire according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a device for querying transaction elements by using quantum wires 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.
It is noted that the terms first, second and the like in the description and in the claims of the present invention are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
Association rule mining enables us to discover relationships between items (item and item) from a data set, and has a plurality of application scenarios in our lives, and shopping basket analysis is a common scenario, and the scenario can discover associations between commodities from consumer transaction records, so as to bring more sales in a commodity bundle sales or related recommendation manner. Therefore, association rule mining is a very useful technique.
Based on this, the invention introduces a method for inquiring transaction elements by using quantum wires, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers 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 querying a transaction element using a quantum line according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (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 data, and optionally, a transmission device 106 for communication functions 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 method for querying transaction elements by using quantum circuits in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by executing 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 a quantum language such as a Qrun language, so that the support of the operation of the 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. Suppose that a quantum state right vector is
Figure BDA0002658985090000081
Then the corresponding quantum state left vector is
Figure BDA0002658985090000082
Wherein, c1,c2,...,cnAre all a plurality of numbers,
Figure BDA0002658985090000083
denotes cnConjugation of (1). It can be seen that the right vector represents a 1 × n column vector, the left vector represents an n × 1 row vector, and the two vectors are transpose conjugates of each other.
It will be appreciated by those skilled in the art that in a classical computer, the basic unit of information is a bit, one bit has two states, 0 and 1, and the most common physical implementation is to represent these two states by the high and low of the levels. In quantum computing, the basic unit of information is a qubit, one qubit also having two states, 0 and 1, denoted as |0>And |1>However, it can be in a superimposed state of two states of 0 and 1, and can be expressed as
Figure BDA0002658985090000084
Where a and b are complex numbers representing states and state amplitudes (probability amplitudes), which classical bits do not have. After measurement, the state of the qubit collapses to a certain state (eigenstate, here | 0)>State, |1>State) in which it collapses to |0>Has a probability of2Collapse to |1>Has a probability of b2,a2+b2=1,|>Is a dirac symbol.
The quantum state space represented by the qubit refers to quantum state information represented by all eigenstates corresponding to the qubit, and the number of all eigenstates is the power of 2 quantum bits.
Quantum states, i.e., states of qubits, are represented in binary by quantum algorithms (or quantum programs). For example, a set of qubits q0, q1, q2 representing the 0 th, 1 st, and 2 nd qubits, ordered from high to low as q2q1q0, has a quantum state of 23Superposition of the eigenstates, 8 eigenstates (defined states) means: |000>、|001>、|010>、|011>、|100>、|101>、|110>、|111>Each eigenstate corresponding to a qubit, e.g. |000>The state 000 from high to low corresponds to q2q1q 0. In short, a quantum state is a superposition state of the eigenstates, and is in one of the determined eigenstates when the probability amplitude of the other states is 0.
For example, if the transaction element has a value of 2, and a set of qubits for the encoding element has 2 bits or more, for example, 5 qubits, the quantum state may be |00010>, where the two least significant bits are binary 10, which represents the binary value of the transaction element. The useful information is the two-bit information of the lowest bit, so the quantum state corresponding to the transaction element value can also be abbreviated as |2> ═ 10 >.
Referring to fig. 2, fig. 2 is a schematic flowchart of a method for querying a transaction element by using a quantum circuit according to an embodiment of the present invention, where the method may include:
s201: a transaction database is obtained that at least includes a transaction index and transaction elements corresponding thereto.
Specifically, transaction element information and transaction index information in a transaction database are obtained, wherein the transaction element information is a subset element contained in each transaction item set, and the transaction index is data position information corresponding to the subset element, which is data of the transaction element in the transaction database correspondingly identifying the element position information.
For example, for a transaction database, assume that it contains a transaction set of N transactions, denoted T ═ T0,T1,…,TN-1Every transaction consists of M items set I ═ I0,I1,…,IM-1Is comprised of a subset of M items, each transaction is contained in a set of M items, i.e.
Figure BDA0002658985090000091
The transaction database may thus be represented as an NxM encoding matrix, denoted D, where element DijNot equal to 0 indicates a transaction TiIn which comprises IjItem, else element Dij=0。
Illustratively, for a transaction database, the set of entries contained therein is shown in Table 1 below:
table 1: transaction information and item information tables contained in a transaction database
Trading Item(s)
T0 Bread, cheese and milk
T1 Bread and butter
T2 Cheese, milk
T3 Bread and cheese
T4 Cheese, butter and milk
Wherein, if the number 1 is used for representing cheese; number 2 represents "milk"; numeral 3 represents "bread"; number 4 represents "butter"; the number 0 indicates that there is no such entry, and the information in table 1 above can be represented by the following matrix:
Figure BDA0002658985090000101
for the 5 × 4 matrix, the transaction index and its corresponding transaction element value are obtained. To accommodate the binary nature of computers, various serial numbers, labels, etc. are counted beginning with 0. Generally, by default, starting from row 0 and column 0, if the element value of column 0 and row 0 is 1, the element value of column 1 and row 0 is 2, the element value of column 2 and row 0 is 3, the element value of column 3 and row 0 is 0, and so on, the transaction index and the corresponding transaction element information table shown in table 2 are obtained:
table 2: transaction index and corresponding transaction element information table
Figure BDA0002658985090000102
S202: and constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired.
Specifically, constructing a quantum line encoded with the binary values of the transaction index, the transaction element, and the transaction element to be queried by using a quantum logic gate and a quantum bit may include the following steps:
s2021: and acquiring a group of quantum bits according to the transaction index and the binary digit number of the transaction element.
Specifically, a pre-constructed transaction index relationship, a group of qubits representing qubits and a quantum state space represented by the qubits can be obtained through user input, and the number of the qubits can be set by a user according to actual requirements. Under the condition of sufficient computing resources, a large number of qubits can be set, and the qubit requirements under most conditions are unconditionally met.
For example, as shown in Table 2 for a transaction index and its corresponding transaction elements, the transaction index may include a row index and a column index. It can be known that the transaction database contains 5 transaction data, each transaction data contains 4 transaction elements, and the decimal identifier of the transaction element is (1,2,3,4), so that the number of the quantum bits for encoding the column index is at least set to 2, the number of the quantum bits for encoding the row index is at least set to 3, and the number of the quantum bits for encoding the transaction elements is at least 3.
S2022: coding a transaction index binary value and a transaction element binary value corresponding to each piece of transaction information in the transaction database to a first quantum bit in sequence to construct a first sub-quantum circuit; wherein a binary bit corresponds to the first qubit.
For example, as shown in the transaction index and the corresponding transaction element shown in table 2, it can be seen that the transaction index binary value and the transaction element binary value corresponding to each piece of transaction information are encoded onto the quantum bit to construct a first sub-quantum circuit, so as to obtain the schematic diagram of the first sub-quantum circuit in this embodiment shown in fig. 3, where an open circle represents a binary digit 0, a solid black circle represents a binary digit 1, a connecting line represents a controlled line, and V1 represents a combination of a series of quantum logic gates such as X gates and the like that implement the encoding of the transaction element binary value 001 with the transaction index of 0 row and 0 column, which means when the quantum state is |00000>, V1 represents the operation of the quantum logic gate is executed, otherwise, no operation is executed; similarly, the encoding principle and method of V2-V20 are the same as V1, and are not repeated here. In addition, only the transaction index binary values and the transaction element binary value encoding states of rows 0 and 4 of the transaction database information shown in table 2 are shown in the figure, and the methods and principles of the transaction index binary values and the transaction element binary value encoding states of rows 1,2 and 3 are the same as those of rows 0 and 4, and are directly omitted in fig. 3 and are not shown again.
It should be noted that, in a real quantum line, binary encoding of the above-mentioned elements may be performed in a form of inserting a quantum logic gate, for example, for a binary digit 0 (a hollow circle is illustrated) that needs to be encoded on the quantum line, no operation is performed on the qubit; for a binary digit 1 (shown as a solid black circle) to be encoded on a quantum wire, a pauli-X gate needs to be inserted on the qubit, representing the quantum state on the qubit to change from the initial 0 state to the 1 state; if the encoding needs to be continued, inserting a Pally-X gate on the qubit again, namely reducing the quantum state on the qubit from the 1 state to the initial 0 state. The method or the quantum logic gate for encoding the transaction index binary value and the transaction element binary value corresponding to each piece of transaction information in the transaction database onto the quantum bit is all covered in the protection scope of the present invention.
S2023: coding the binary value of the transaction element to be inquired to the corresponding quantum bit of the transaction element, and adding a preset quantum logic gate to the second quantum bit to construct a second sub-quantum circuit; wherein the preset quantum logic gate comprises a Paly-X gate.
Specifically, fig. 4 is a schematic diagram of the second sub-quantum wire of the present embodiment. Optionally, in order to visually display the binary coding process of the transaction index and the transaction element, the open circle represents a binary number 0, the solid black circle represents a binary number 1, the connecting line between the circles represents a controlled, and the pauli-X gate connects the open circle and the solid black circle, which represents that the transaction element to be queried is a binary number value 01. It should be noted that the binary encoding diagram of the transaction element that needs to be queried shown in fig. 4 is only an example, and the actual binary encoding quantum state needs to be determined according to the binary values of different transaction elements to be queried.
S2024: adding a controlled U1 quantum logic gate operation to the second qubit to construct a third sub-quantum wire.
Specifically, fig. 5 is a schematic diagram of the third sub-quantum wire of the present embodiment. Illustratively, the second qubit is connected with a quantum logic gate U1 gate by adding a solid black circle, which represents a controlled U1 gate, wherein the matrix form of the U1 gate is
Figure BDA0002658985090000121
Where θ can be determined by the user according to the line requirement, for example, θ ═ pi, and the third sub-quantum line can be obtained.
S2025: and sequentially adding the transposition conjugation operation corresponding to the second sub-quantum circuit and the transposition conjugation operation corresponding to the first sub-quantum circuit to construct a fourth sub-quantum circuit.
Specifically, fig. 6 is a schematic diagram of a fourth sub-quantum wire of the present embodiment, in which,
Figure BDA0002658985090000131
the transpose conjugate of the pauli-X gate is represented, and similarly, a hollow circle and a solid black circle connected by the transpose conjugate of the pauli-X gate represent that the transaction element to be queried has a binary value of 01 is merely an example, which corresponds to the schematic diagram of the aforementioned second sub-quantum circuit;
Figure BDA0002658985090000132
representing the corresponding transposed conjugate of the first sub-quantum wire.
S2026: and sequentially combining the first sub-quantum line, the second sub-quantum line, the third sub-quantum line and the fourth sub-quantum line into a quantum line which is encoded with the transaction index, the transaction element and the binary value of the transaction element to be inquired according to the preset quantum bit corresponding relation among the sub-quantum lines.
Specifically, quantum circuits encoded with binary values of the transaction index, the transaction element, and the transaction element to be queried are sequentially formed according to a preset quantum bit correspondence relationship among the sub-quantum circuits, where the correspondence relationship of the quantum bits is that a quantum bit of a first sub-quantum circuit corresponds to a quantum bit of a transpose conjugate of the first sub-quantum circuit, and a quantum bit of a second sub-quantum circuit corresponds to a quantum bit of a transpose conjugate of the second sub-quantum circuit, so as to obtain the schematic diagram of the first quantum circuit in this embodiment as shown in fig. 7.
It should be noted that Vi represents a series of quantum logic gates for implementing binary coding of each transaction element, and i represents a number, which is the same as the coding principle of the transaction index described above.
After a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired is constructed, the first quantum circuit can be added to a first preset quantum bit position in the first preset quantum circuit according to a first preset time sequence to obtain a second quantum circuit at least used for amplitude updating, and a plurality of second quantum circuits are sequentially added to a second preset quantum bit position in the second preset quantum circuit according to a second preset time sequence to obtain a third quantum circuit at least used for iterative amplitude updating for a plurality of times.
Specifically, fig. 8 is a schematic diagram of a first predetermined quantum circuit of this embodiment, which includes a plurality of qubits, Hadamard gates, controlled U1 gates, and SWAP quantum logic gates. Wherein the content of the first and second substances,
Figure BDA0002658985090000133
indicating that a Hadamard gate is applied to n qubits, the open circles connected to the U1 gate indicate when the quantum state is |0000>When the operation is finished, executing the U1 door operation, otherwise, not acting; space-acting switching gates (SWAP gates) for first predetermined quantum lines, i.e. pairsThe corresponding quantum states in the qubit space acted on by the SWAP gate are exchanged.
As shown in fig. 9, which is a schematic diagram of the second quantum wire of this embodiment, according to the first predetermined timing sequence, that is, the pauli-X gate, the Hadamard gate, and the first quantum wire (Oracle wire) are sequentially added to the first predetermined qubit position (the lower half qubit shown in fig. 9) in the first predetermined quantum wire, so as to obtain the second quantum wire (G) for amplitude update(k)Lines), where the SWAP gate functions to implement index transfer of query transaction element search results; the second quantum circuit obtains the output result after the amplitude is updated, so as to improve the index probability of the search result, improve the discrimination of the probability, and more accurately output the accuracy of the query of the transaction element, thereby the whole second quantum circuit (G)(k)Line) may be a process that queries transaction elements once.
Specifically, according to the second preset time sequence, the Dolly-X gate and the Hadamard gate (in the line) are sequentially connected
Figure BDA0002658985090000141
Representing the effect of a Hadamard gate on n qubits), t second quantum wires (G)(k)Wires) are added to the second predetermined qubit positions in the second predetermined quantum wires resulting in a schematic diagram of the third quantum wires of the present embodiment as shown in fig. 10. Wherein n qubits of the upper half of the diagram are used to store search results, t is G(k)The iteration times of the line can be determined by the user according to the iteration requirement in advance.
It should be noted that the quantum bit number in the above schematic diagram is only an illustration, and does not really show the quantum bit correspondence in the present invention, and in a specific practical application, the query method to be protected in the present application needs to be completed according to the preset quantum bit correspondence between each quantum line or each sub-quantum line.
S203: and operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
Specifically, the first quantum line may be regarded as an Oracle quantum line, and in quantum application, a specific function may be completed by operating the Oracle line, and an internal principle of the Oracle line is a flow of the encoding method of the present invention.
The complex function of mutual conversion between quantum states corresponding to transaction indexes and specific representations of transaction elements in a transaction database is realized by utilizing an Oracle circuit simulation mode, and quantum parallel computation is realized.
And operating the first quantum circuit to obtain a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
Specifically, after the first quantum circuit is operated, the quantum state including the binary value of each transaction index and the corresponding first amplitude thereof can be obtained, the probability corresponding to each first amplitude is calculated, and the transaction index value included in the quantum state corresponding to the maximum probability in each probability is determined as the transaction index result corresponding to the transaction element to be queried.
For example, according to the transaction database information shown in table 2, if the binary value of the transaction element to be queried encoded by the second sub-quantum line is 100, the first quantum line is operated, and the quantum state including the binary value of each transaction index and the corresponding first amplitude are output, for convenience of description, the square value (i.e., the probability value) of the corresponding first amplitude of each quantum state is directly calculated, and each probability value only retains 5 bits after the decimal point, so that the following results can be obtained:
S*=0.0031|00000>+0.0031|00001>+0.0031|00010>+0.0031|00011>+0.0031|00100>+0.0031|00101>+0.0031|00110>+0.4542|00111>+0.0031|01000>+0.0031|01001>+0.0031|01010>+0.0031|01011>+0.0031|01100>+0.0031|01101>-0.0031|01110>+0.0031|01111>+0.0031|10000>+0.0031|10001>+0.0031|10010>+0.4542|10011>+0.0031|10100>+0.0031|10101>+0.0031|10110>+0.0031|10111>+0.0031|11000>+0.0031|11001>+0.0031|11010>+0.0031|11011>+0.0031|11100>+0.0031|11101>+0.0031|11110>+0.0031|11111>
from the above results, it can be seen that the maximum probability value is 0.4542, and the corresponding quantum states are |00111> and |10011>, respectively, that is, the transaction index of the binary element to be queried 100. For example, |00111> represents that row 1, column 3 can be queried for binary to-be-queried element 100; l 10011> represents that row 4, column 3 can query the binary element to be queried 100.
And operating the second quantum circuit, outputting a quantum state containing a binary value of each transaction index and a corresponding second amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each second amplitude, wherein the second amplitude is the amplitude obtained by updating the first amplitude once.
Specifically, the probability corresponding to the first amplitude is not easily measured directly, so that a quantum state including the binary value of each transaction index and a second amplitude corresponding to the quantum state need to be output by operating a second quantum line.
It should be noted that, in this case, if the value of the second amplitude is subjected to several iterations, the measured precision is higher, and the result is more accurate. Thus, the following steps are performed:
and operating a second combination quantum circuit, outputting a quantum state containing the binary value of each transaction index and a third amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each third amplitude, wherein the third amplitude is the amplitude obtained by repeatedly updating the first amplitude for multiple times.
Specifically, the second combined quantum circuit is obtained by combining a plurality of second quantum circuits and a preset quantum logic gate according to a preset time sequence, wherein the number of the second quantum circuits in the second combined quantum circuit can be determined according to the number of quantum bits for encoding the transaction index, and the probability distribution of the transaction index data can be obtained through a certain number of cyclic iterations, wherein the probability is the maximum, namely, the result index of the queried element. In practical applications, the number of second quantum wires is preferably 3, 5 or 7.
According to the method, the frequent item set mined by the association rule can be obtained through quantum and classical mixed calculation, and through the method and the test and verification of some data, the statistics of the frequent item set mined by the association rule and the calculation of subsequent confidence degrees can be realized. The core idea of the quantum circuit part of the method adopts a quantum walking search mode, and a transaction index coding mode is carried out on the basis to adapt to the association rule problem. And (3) counting the search result indexes corresponding to each candidate item set by using a quantum circuit part, then obtaining a frequent item set, and popularizing the method to iterate the frequent item set to obtain all frequent item sets and give results.
Compared with the prior art, the method for inquiring transaction elements by using quantum circuits comprises the steps of firstly obtaining a transaction database at least comprising transaction indexes and corresponding transaction elements, then constructing a first quantum circuit which is encoded with the transaction indexes, the transaction elements and binary values of the transaction elements to be inquired by using quantum logic gates and quantum bits, operating the first quantum circuit, outputting quantum states comprising the binary values of the transaction indexes and corresponding first amplitudes, and determining transaction index results corresponding to the transaction elements to be inquired according to the probability corresponding to each first amplitude, so that quantum circuits are designed in the field of quantum computation.
Referring to fig. 11, fig. 11 is a schematic structural diagram of an apparatus for querying a transaction element by using a quantum circuit according to an embodiment of the present invention, which corresponds to the flow shown in fig. 2, and the apparatus may include:
an obtaining module 1101, configured to obtain a transaction database at least including a transaction index and a transaction element corresponding to the transaction index;
a building module 1102, configured to build, by using a quantum logic gate and a quantum bit, a first quantum circuit encoded with binary values of the transaction index, the transaction element, and a transaction element to be queried, where the first quantum circuit is used to query the transaction index corresponding to the transaction element to be queried;
an output module 1103, configured to run the first quantum line, output a quantum state including a binary value of each transaction index and a corresponding first amplitude, and determine, according to a probability corresponding to each first amplitude, a transaction index result corresponding to the transaction element to be queried.
Specifically, after the building block, the apparatus further includes:
the first adding module is used for adding the first quantum wire to a first preset quantum bit position in a first preset quantum wire according to a first preset time sequence to obtain a second quantum wire at least used for amplitude updating;
specifically, the output module includes:
and the first output unit is used for operating the second quantum circuit, outputting a quantum state containing a binary value of each transaction index and a corresponding second amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each second amplitude, wherein the second amplitude is the amplitude obtained by updating the first amplitude once.
Specifically, after the first adding module, the apparatus further includes:
the second adding module is used for sequentially adding the plurality of second quantum wires to second preset quantum bit positions in the second preset quantum wires according to a second preset time sequence to obtain a third quantum wire at least used for iteratively updating the amplitude for multiple times;
specifically, the first output unit includes:
and the second output unit is used for operating a second combined quantum circuit, outputting a quantum state containing a binary value of each transaction index and a third amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each third amplitude, wherein the third amplitude is the amplitude obtained by repeatedly updating the first amplitude for multiple times.
Compared with the prior art, the method for inquiring transaction elements by using quantum circuits comprises the steps of firstly obtaining a transaction database at least comprising transaction indexes and corresponding transaction elements, then constructing a first quantum circuit which is encoded with the transaction indexes, the transaction elements and binary values of the transaction elements to be inquired by using quantum logic gates and quantum bits, operating the first quantum circuit, outputting quantum states comprising the binary values of the transaction indexes and corresponding first amplitudes, and determining transaction index results corresponding to the transaction elements to be inquired according to the probability corresponding to each first amplitude, so that quantum circuits are designed in the field of quantum computation.
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 one of the above method embodiments.
Specifically, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s201: acquiring a transaction database at least comprising transaction indexes and corresponding transaction elements;
s202: constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired;
s203: and operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
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.
Compared with the prior art, the method for inquiring transaction elements by using quantum circuits comprises the steps of firstly obtaining a transaction database at least comprising transaction indexes and corresponding transaction elements, then constructing a first quantum circuit which is encoded with the transaction indexes, the transaction elements and binary values of the transaction elements to be inquired by using quantum logic gates and quantum bits, operating the first quantum circuit, outputting quantum states comprising the binary values of the transaction indexes and corresponding first amplitudes, and determining transaction index results corresponding to the transaction elements to be inquired according to the probability corresponding to each first amplitude, so that quantum circuits are designed in the field of quantum computation.
An embodiment of the present invention further provides an electronic device, which includes a memory and a processor, where 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 method embodiments described above.
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:
s201: acquiring a transaction database at least comprising transaction indexes and corresponding transaction elements;
s202: constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired;
s203: and operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
Compared with the prior art, the method for inquiring transaction elements by using quantum circuits comprises the steps of firstly obtaining a transaction database at least comprising transaction indexes and corresponding transaction elements, then constructing a first quantum circuit which is encoded with the transaction indexes, the transaction elements and binary values of the transaction elements to be inquired by using quantum logic gates and quantum bits, operating the first quantum circuit, outputting quantum states comprising the binary values of the transaction indexes and corresponding first amplitudes, and determining transaction index results corresponding to the transaction elements to be inquired according to the probability corresponding to each first amplitude, so that quantum circuits are designed in the field of quantum computation.
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 for querying a transaction element using a quantum line, the method comprising:
acquiring a transaction database at least comprising transaction indexes and corresponding transaction elements;
constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired;
and operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
2. The method of claim 1, wherein after constructing a first quantum wire encoded with binary values of the transaction index, the transaction element, and a transaction element to be queried, the method further comprises:
adding the first quantum circuit to a first preset quantum bit position in a first preset quantum circuit according to a first preset time sequence to obtain a second quantum circuit at least used for amplitude updating;
the operating the first quantum circuit, outputting a quantum state including a binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be queried according to a probability corresponding to each first amplitude, including:
and operating the second quantum circuit, outputting a quantum state containing a binary value of each transaction index and a corresponding second amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each second amplitude, wherein the second amplitude is the amplitude obtained by updating the first amplitude once.
3. The method of claim 2, wherein after adding the first quantum wire to a first predetermined qubit position in a first predetermined quantum wire according to a first predetermined timing to obtain a second quantum wire at least for amplitude updating, the method further comprises:
adding a plurality of second quantum wires to second preset quantum bit positions in second preset quantum wires in sequence according to a second preset time sequence to obtain a third quantum wire at least used for iteratively updating the amplitude for multiple times;
the operating the second quantum circuit, outputting a quantum state including a binary value of each transaction index and a second amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be queried according to a probability corresponding to each second amplitude, including:
and operating a second combination quantum circuit, outputting a quantum state containing the binary value of each transaction index and a third amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each third amplitude, wherein the third amplitude is the amplitude obtained by repeatedly updating the first amplitude for multiple times.
4. The method of claim 1, wherein constructing a quantum wire encoded with binary values of the transaction index, the transaction element, and the transaction element to be queried using quantum logic gates and quantum bits comprises:
acquiring a group of quantum bits according to the transaction index and the binary digit number of the transaction element;
coding a transaction index binary value and a transaction element binary value corresponding to each piece of transaction information in the transaction database to a first quantum bit in sequence to construct a first sub-quantum circuit; wherein a binary bit corresponds to the first qubit;
coding the binary value of the transaction element to be inquired to the quantum bit corresponding to the transaction element, and adding a preset quantum logic gate to a second quantum bit to construct a second sub-quantum circuit; wherein the preset quantum logic gate comprises a Pagli-X gate;
adding a controlled U1 quantum logic gate operation to the second quantum bit to construct a third sub-quantum circuit;
sequentially adding the transposition conjugation operation corresponding to the second sub-quantum circuit and the transposition conjugation operation corresponding to the first sub-quantum circuit to construct a fourth sub-quantum circuit;
and sequentially combining the first sub-quantum line, the second sub-quantum line, the third sub-quantum line and the fourth sub-quantum line into a quantum line which is encoded with the transaction index, the transaction element and the binary value of the transaction element to be inquired according to the preset quantum bit corresponding relation among the sub-quantum lines.
5. The method according to claim 1, wherein the determining the transaction index result corresponding to the transaction element to be queried according to the probability magnitude corresponding to each of the first amplitudes comprises:
and calculating the probability corresponding to each first amplitude, and determining the transaction index value contained in the quantum state corresponding to the maximum probability in each probability as the transaction index result corresponding to the transaction element to be inquired.
6. An apparatus for querying a transaction element using a quantum line, the apparatus comprising:
the acquisition module is used for acquiring a transaction database at least comprising transaction indexes and corresponding transaction elements;
the construction module is used for constructing a first quantum circuit which is encoded with binary values of the transaction index, the transaction element and the transaction element to be inquired by using a quantum logic gate and a quantum bit, wherein the first quantum circuit is used for inquiring the transaction index corresponding to the transaction element to be inquired;
and the output module is used for operating the first quantum circuit, outputting a quantum state containing the binary value of each transaction index and a corresponding first amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each first amplitude.
7. The apparatus of claim 6, wherein after the building block, the apparatus further comprises:
the first adding module is used for adding the first quantum wire to a first preset quantum bit position in a first preset quantum wire according to a first preset time sequence to obtain a second quantum wire at least used for amplitude updating;
the output module includes:
and the first output unit is used for operating the second quantum circuit, outputting a quantum state containing a binary value of each transaction index and a corresponding second amplitude, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each second amplitude, wherein the second amplitude is the amplitude obtained by updating the first amplitude once.
8. The apparatus of claim 7, wherein after the first adding module, the apparatus further comprises:
the second adding module is used for sequentially adding the plurality of second quantum wires to second preset quantum bit positions in the second preset quantum wires according to a second preset time sequence to obtain a third quantum wire at least used for iteratively updating the amplitude for multiple times;
the first output unit includes:
and the second output unit is used for operating a second combined quantum circuit, outputting a quantum state containing a binary value of each transaction index and a third amplitude corresponding to the quantum state, and determining a transaction index result corresponding to the transaction element to be inquired according to the probability corresponding to each third amplitude, wherein the third amplitude is the amplitude obtained by repeatedly updating the first amplitude for multiple times.
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 5 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 5.
CN202010897672.2A 2020-08-31 2020-08-31 Method and device for inquiring transaction elements by quantum circuit Active CN112000673B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010897672.2A CN112000673B (en) 2020-08-31 2020-08-31 Method and device for inquiring transaction elements by quantum circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010897672.2A CN112000673B (en) 2020-08-31 2020-08-31 Method and device for inquiring transaction elements by quantum circuit

Publications (2)

Publication Number Publication Date
CN112000673A true CN112000673A (en) 2020-11-27
CN112000673B CN112000673B (en) 2024-06-14

Family

ID=73464874

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010897672.2A Active CN112000673B (en) 2020-08-31 2020-08-31 Method and device for inquiring transaction elements by quantum circuit

Country Status (1)

Country Link
CN (1) CN112000673B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115907016A (en) * 2021-09-30 2023-04-04 合肥本源量子计算科技有限责任公司 Method for searching target range value based on quantum computation and related device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002069561A2 (en) * 2001-02-27 2002-09-06 Visa International Service Association Distributed quantum encrypted pattern generation and scoring
US20090012938A1 (en) * 2007-07-03 2009-01-08 Seth Lloyd Quantum private queries
US20100057622A1 (en) * 2001-02-27 2010-03-04 Faith Patrick L Distributed Quantum Encrypted Pattern Generation And Scoring
CN102713898A (en) * 2009-09-23 2012-10-03 诺基亚公司 Method and apparatus for creating and utilizing information signatures
WO2016154460A1 (en) * 2015-03-24 2016-09-29 Kyndi, Inc. Cognitive memory graph indexing, storage and retrieval
WO2019204678A1 (en) * 2018-04-20 2019-10-24 Google Llc Performing unitary iteration and indexed operations
US10469087B1 (en) * 2018-10-08 2019-11-05 Microsoft Technology Licensing, Llc Bayesian tuning for quantum logic gates
EP3570223A1 (en) * 2018-05-17 2019-11-20 Korea Advanced Institute of Science and Technology Effective quantum ram architecture for quantum database
WO2020010208A1 (en) * 2018-07-06 2020-01-09 Google Llc Preparing superpositions of computational basis states on a quantum computer
US20200050959A1 (en) * 2018-08-07 2020-02-13 Nxgen Partners Ip, Llc Universal quantum computer, communication, qkd security and quantum networks using oam qu-dits with dlp
US20200118026A1 (en) * 2015-08-03 2020-04-16 Nxgen Partners Ip, Llc Quantum mechanical framework for interaction of oam with matter and applications in solid states, biosciences and quantum computing
US10708046B1 (en) * 2018-11-08 2020-07-07 Nxgen Partners Ip, Llc Quantum resistant blockchain with multi-dimensional quantum key distribution

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002069561A2 (en) * 2001-02-27 2002-09-06 Visa International Service Association Distributed quantum encrypted pattern generation and scoring
US20100057622A1 (en) * 2001-02-27 2010-03-04 Faith Patrick L Distributed Quantum Encrypted Pattern Generation And Scoring
US20090012938A1 (en) * 2007-07-03 2009-01-08 Seth Lloyd Quantum private queries
CN102713898A (en) * 2009-09-23 2012-10-03 诺基亚公司 Method and apparatus for creating and utilizing information signatures
WO2016154460A1 (en) * 2015-03-24 2016-09-29 Kyndi, Inc. Cognitive memory graph indexing, storage and retrieval
US20200118026A1 (en) * 2015-08-03 2020-04-16 Nxgen Partners Ip, Llc Quantum mechanical framework for interaction of oam with matter and applications in solid states, biosciences and quantum computing
WO2019204678A1 (en) * 2018-04-20 2019-10-24 Google Llc Performing unitary iteration and indexed operations
EP3570223A1 (en) * 2018-05-17 2019-11-20 Korea Advanced Institute of Science and Technology Effective quantum ram architecture for quantum database
WO2020010208A1 (en) * 2018-07-06 2020-01-09 Google Llc Preparing superpositions of computational basis states on a quantum computer
US20200050959A1 (en) * 2018-08-07 2020-02-13 Nxgen Partners Ip, Llc Universal quantum computer, communication, qkd security and quantum networks using oam qu-dits with dlp
US10469087B1 (en) * 2018-10-08 2019-11-05 Microsoft Technology Licensing, Llc Bayesian tuning for quantum logic gates
US10708046B1 (en) * 2018-11-08 2020-07-07 Nxgen Partners Ip, Llc Quantum resistant blockchain with multi-dimensional quantum key distribution

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
史一蓬;: "量子计算与量子通信浅说(下)", 数学建模及其应用, no. 03 *
王胜寒;郭创新;冯斌;张浩;杜振东;: "区块链技术在电力系统中的应用:前景与思路", 电力系统自动化, no. 11 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115907016A (en) * 2021-09-30 2023-04-04 合肥本源量子计算科技有限责任公司 Method for searching target range value based on quantum computation and related device
CN115907016B (en) * 2021-09-30 2024-06-14 本源量子计算科技(合肥)股份有限公司 Quantum-based method for calculating search target range value and related device

Also Published As

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

Similar Documents

Publication Publication Date Title
Halvorsen et al. Opportunities for improved distribution modelling practice via a strict maximum likelihood interpretation of MaxEnt
De Bie Maximum entropy models and subjective interestingness: an application to tiles in binary databases
Zenil et al. Methods of information theory and algorithmic complexity for network biology
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
US8341097B2 (en) Systems, methods and circuits for learning of relation-based networks
CN112073126A (en) Method and device for ordering network node importance
CN114418105A (en) Method and device for processing quantum application problem based on quantum line
CN112000673B (en) Method and device for inquiring transaction elements by quantum circuit
CN114492815A (en) Method, device and medium for calculating target system energy based on quantum chemistry
CN114819168B (en) Quantum comparison method and device for matrix eigenvalues
CN114358318A (en) Machine learning framework-based classification method and related device
CN112132614B (en) Method and device for preference prediction demonstration by quantum circuit
CN113435900A (en) Transaction risk determination method and device and server
Asadi et al. Reconfigurable computing for learning Bayesian networks
Lu et al. Qas-bench: rethinking quantum architecture search and a benchmark
US9501737B1 (en) Method and system for prediction of time series by kanban neuron model
CN114429384A (en) Intelligent product recommendation method and system based on e-commerce platform
CN114511094A (en) Quantum algorithm optimization method and device, storage medium and electronic device
CN115907016B (en) Quantum-based method for calculating search target range value and related device
CN114418104A (en) Quantum application problem processing method and device
CN117078441B (en) Method, apparatus, computer device and storage medium for identifying claims fraud
CN116050528B (en) Method and device for constructing amplitude amplification circuit, medium and electronic device
Sun et al. Architecture Design for Plain CNNs
Rupesh et al. E-Business Churn Prediction Model Using Machine Learning

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

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

CB02 Change of applicant information
GR01 Patent grant