CN111310929A - Quantum computation-oriented data interaction equipment, method, device and medium - Google Patents
Quantum computation-oriented data interaction equipment, method, device and medium Download PDFInfo
- Publication number
- CN111310929A CN111310929A CN202010173418.8A CN202010173418A CN111310929A CN 111310929 A CN111310929 A CN 111310929A CN 202010173418 A CN202010173418 A CN 202010173418A CN 111310929 A CN111310929 A CN 111310929A
- Authority
- CN
- China
- Prior art keywords
- arithmetic logic
- logic unit
- quantum
- instruction
- access instruction
- 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.)
- Withdrawn
Links
- 230000003993 interaction Effects 0.000 title claims abstract description 72
- 238000000034 method Methods 0.000 title claims abstract description 54
- 230000005540 biological transmission Effects 0.000 claims abstract description 35
- 238000012545 processing Methods 0.000 claims abstract description 14
- 239000000203 mixture Substances 0.000 claims description 13
- 239000002096 quantum dot Substances 0.000 claims description 8
- 238000002156 mixing Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 5
- 238000005259 measurement Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 abstract description 20
- 238000010586 diagram Methods 0.000 description 7
- 101100385237 Mus musculus Creg1 gene Proteins 0.000 description 6
- 102100023882 Endoribonuclease ZC3H12A Human genes 0.000 description 5
- 101710112715 Endoribonuclease ZC3H12A Proteins 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 101100120298 Rattus norvegicus Flot1 gene Proteins 0.000 description 2
- 101100412403 Rattus norvegicus Reg3b gene Proteins 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N10/00—Quantum computing, i.e. information processing based on quantum-mechanical phenomena
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30098—Register arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Condensed Matter Physics & Semiconductors (AREA)
- Computational Mathematics (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Executing Machine-Instructions (AREA)
Abstract
The invention discloses a data interaction device facing quantum computing, which comprises: the quantum arithmetic logic unit is used for processing quantum data and establishing connection with the public register to perform data transmission; the classical arithmetic logic unit is used for processing classical data and establishing connection with a common register to carry out data transmission; a common register for storing quantum data and classical data; the controller is used for judging whether a memory access instruction for accessing the public register is received or not; if so, determining an arithmetic logic unit corresponding to the access instruction according to the access instruction; and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register. Therefore, the data interaction process is simple and easy to realize; performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved. In addition, the quantum computing-oriented data interaction method, the quantum computing-oriented data interaction device and the quantum computing-oriented data interaction medium correspond to the method.
Description
Technical Field
The invention relates to the technical field of computers, in particular to quantum computing-oriented data interaction equipment, method, device and medium.
Background
With the rapid development of computer technology, quantum computers are often used as heterogeneous devices for unloading tasks with low efficiency on classical computers, which are called heterogeneous models of quantum computing, and the tasks with low efficiency on classical computers are processed through the heterogeneous models of quantum computing to improve the overall efficiency of the tasks.
Fig. 1 is a schematic diagram of a processing flow of a conventional heterogeneous model, and as shown in fig. 1, when a heterogeneous model of quantum computing is used, a programming mode is that a quantum program is embedded in a classical program to form a mixed code, a quantum part and a classical part in the program are separated in a compiling stage, a corresponding quantum instruction is executed on a quantum computer, a corresponding classical instruction is executed on the classical computer, and the two complete data interaction through an external bus, so that the quantum computer and the classical computer complete respective corresponding processing tasks. However, when data interaction is performed through the external bus, the data transmission process is complicated, and the transmission process can be completed through a plurality of components. Therefore, when data interaction is frequent, transmission through the external bus will generate a large delay, resulting in performance loss; moreover, when the amount of transmitted data is large, the quantum computer is in a blocking state for a long time, which affects the calculation efficiency.
In order to solve the above problems, hardware upgrade of an external bus connecting the two is generally adopted in the prior art to provide a higher transmission rate. For example, a rate of 16G/s can be achieved with the latest pcie4.0, so that the transmission rate can be increased to some extent in the current situation. Although the method can relieve the problem of data blockage, the method cannot solve the problem fundamentally, and the problem of low transmission efficiency still exists along with the increase of the data quantity to be transmitted or the increase of the interaction times. Therefore, the data interaction equipment capable of improving the data transmission efficiency in the heterogeneous model becomes a problem to be solved urgently at present.
Disclosure of Invention
The invention aims to provide data interaction equipment, a method, a device and a medium facing quantum computation. When data interaction is needed, only one of the arithmetic logic units needs to write data into the common register, and the other arithmetic logic unit needs to read data from the common register, and the whole process can be completed only by two clock cycles, namely about 1 ns. The data interaction process is simple and easy to realize; and performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved.
In order to solve the above technical problem, the present invention provides a data interaction device for quantum computing, including:
the quantum arithmetic logic unit is used for processing quantum data and establishing connection with the public register to perform data transmission;
the classical arithmetic logic unit is used for processing classical data and establishing connection with a common register to carry out data transmission;
a common register for storing the quantum data and the classical data;
the controller is used for judging whether a memory access instruction for accessing the public register is received or not; if so, determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction; and sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
Preferably, the method further comprises the following steps:
and the hybrid compiler is used for converting the received codes into hybrid instructions according to preset compiling rules so as to be identified by the controller.
Preferably, the blend instruction is embodied as a binary instruction.
Preferably, the blend instruction is specifically 64 bits in length.
Preferably, the hybrid instruction is specifically a single-quantum-bit instruction, a double-quantum-bit instruction, a quantum measurement instruction, a quantum register operation instruction, or a classical calculation instruction.
In order to solve the above technical problem, the present invention further provides a data interaction method for quantum computing, including:
judging whether a memory access instruction for performing memory access operation on the public register is received;
if so, determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction;
and sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
Preferably, the determining, according to the memory access instruction, an arithmetic logic unit corresponding to the memory access instruction specifically includes:
judging whether the flag bit of the access instruction indicates quantum identification or not;
if so, determining that the arithmetic logic unit corresponding to the access instruction is a quantum arithmetic logic unit;
and if not, determining that the arithmetic logic unit corresponding to the access instruction is a classical arithmetic logic unit.
In order to solve the above technical problem, the present invention provides a data interaction device for quantum computing, including:
the judging module is used for judging whether a memory access instruction for performing memory access operation on the public register is received or not; if yes, entering a determining module;
the determining module is used for determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction;
and the memory access module is used for sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
Preferably, the determining module specifically includes:
the judging unit is used for judging whether the flag bit of the access instruction indicates quantum identification or not; if yes, entering a first determination unit; if not, entering a second determination unit;
the first determining unit is used for determining that the arithmetic logic unit corresponding to the access instruction is a quantum arithmetic logic unit;
and the second determining unit is used for determining that the arithmetic logic unit corresponding to the access instruction is a classical arithmetic logic unit.
In order to solve the technical problem, the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the quantum-computation-oriented data interaction method as described above.
The invention provides quantum computing-oriented data interaction equipment, which comprises: the quantum arithmetic logic unit is used for processing quantum data and establishing connection with the public register to perform data transmission; the classical arithmetic logic unit is used for processing classical data and establishing connection with a common register to carry out data transmission; a common register for storing quantum data and classical data; the controller is used for judging whether a memory access instruction for accessing the public register is received or not; if so, determining an arithmetic logic unit corresponding to the access instruction according to the access instruction; and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register. Therefore, the invention sets the public register which can be accessed and stored by both the quantum arithmetic logic unit and the classical arithmetic logic unit, so that both the quantum arithmetic logic unit and the classical arithmetic logic unit can store and acquire data from the public register, thereby completing the data interaction between the quantum arithmetic logic unit and the classical arithmetic logic unit. When data interaction is needed, only one of the arithmetic logic units needs to write data into the common register, and the other arithmetic logic unit only needs to read data from the common register, and the whole process only needs two clock cycles, about 1ns can be completed, and the time is far shorter than the time required for completing the data interaction after the external bus is upgraded. Moreover, the data interaction process is simple and easy to realize; performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved.
In addition, the quantum computing oriented data interaction method, the quantum computing oriented data interaction device and the quantum computing oriented data interaction medium correspond to the method, and have the same beneficial effects.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is a schematic diagram of a conventional heterogeneous model process flow;
fig. 2 is a structural diagram of a quantum computing-oriented data interaction device according to an embodiment of the present invention;
fig. 3 is a flowchart of a quantum computing-oriented data interaction method according to an embodiment of the present invention;
fig. 4 is a structural diagram of a quantum computing-oriented data exchange device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
The core of the invention is to provide data interaction equipment, method, device and medium facing quantum computation, and the public register which can be accessed and stored by a quantum arithmetic logic unit and a classical arithmetic logic unit is arranged, so that the quantum arithmetic logic unit and the classical arithmetic logic unit can write and read data from the public register, and the data interaction between the quantum arithmetic logic unit and the classical arithmetic logic unit is completed. When data interaction is needed, only one of the arithmetic logic units needs to write data into the common register, and the other arithmetic logic unit needs to read data from the common register, and the whole process can be completed only by two clock cycles, namely about 1 ns. The data interaction process is simple and easy to realize; and performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 2 is a structural diagram of a quantum computing-oriented data interaction device according to an embodiment of the present invention; as shown in fig. 2, a quantum computing-oriented data interaction device provided in an embodiment of the present invention includes:
a quantum arithmetic logic unit 10 for processing quantum data and establishing a connection with a common register 12 for data transmission;
a classical arithmetic logic unit 11, configured to process classical data and establish a connection with a common register 12 for data transmission;
a common register 12 for storing quantum data and classical data;
a controller 13 for judging whether a memory access instruction for accessing the common register 12 is received; if so, determining an arithmetic logic unit corresponding to the access instruction according to the access instruction; and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register.
In one embodiment, quantum arithmetic logic unit 10 is used to process quantum data and classical arithmetic logic unit 11 is used to process classical data. It should be noted that quantum data refers to data that needs to be subjected to quantum computation, and classical data refers to data that needs to be subjected to classical computation; the data processed by the quantum arithmetic logic unit 10 and the data processed by the classical arithmetic logic unit 11 are distinguished by nomenclature, but those skilled in the art may also distinguish by other nomenclature, and the embodiment of the present invention is not limited thereto. Quantum arithmetic logic unit 10 and classical arithmetic logic unit 11 are connected to common register 12, respectively. The controller 13 may be configured to receive a blending instruction. It should be noted that, a hybrid instruction set may be predetermined, and the instruction set includes all quantum operations and classical operations. The controller can control the quantum arithmetic logic unit 10 or the classical arithmetic logic unit 11 to operate according to the received mixed instruction.
In a specific implementation, controller 13 establishes connections with quantum arithmetic logic unit 10 and classical arithmetic logic unit 11. When a memory access instruction for accessing the public register 12 is received, the corresponding arithmetic logic unit can be controlled to perform memory access operation on the public register 12 according to the memory access instruction. It should be noted that the arithmetic logic units proposed in the above description of the present application specifically include quantum arithmetic logic units and classical arithmetic logic units. When the quantum arithmetic logic unit 10 wants to transmit the calculated data to the classical arithmetic logic unit 11, the controller 13 may control the quantum arithmetic logic unit to write the data to be transmitted into the common register 12 and control the classical arithmetic logic unit 11 to read the data from the common register 12, thereby completing the data transmission process from the quantum arithmetic logic unit 10 to the classical arithmetic logic unit 11. This can also be done when it is desired to transfer data from classical arithmetic logic unit 11 to quantum arithmetic logic unit 10. It should be noted that the memory access instruction proposed in the present embodiment belongs to a hybrid instruction, and may be understood as a hybrid instruction for accessing the common register 12.
In a specific implementation, the blend instruction includes a flag bit for indicating whether the blend instruction is executed by the quantum arithmetic logic unit 10 or the classical arithmetic logic unit 11, and normally, the flag bit occupies one bit of the length of the blend instruction, for example, when the flag bit shows 0, it is determined that the blend instruction is specified to be executed by the quantum arithmetic logic unit 10; when the flag bit shows a 1, it is determined that the blend instruction specifies execution by classical arithmetic logic unit 11. Those skilled in the art can also determine the length and the representation method of the flag bit occupation according to the actual situation of the set hybrid instruction, and the embodiment of the present invention is not limited.
In one embodiment, after receiving the access instruction, the controller 13 may determine whether the identifier on the flag bit of the access instruction indicates a quantum identifier, and if so, it indicates that the arithmetic logic unit corresponding to the access instruction is the quantum arithmetic logic unit 10, and sends the access instruction to the quantum arithmetic logic unit 10 for execution; if not, the arithmetic logic unit corresponding to the memory access instruction is a classical arithmetic logic unit 11, and the memory access instruction is correspondingly sent to the classical arithmetic logic unit 11 for execution.
In specific implementation, the data interaction device for quantum computing provided by the embodiment of the invention further comprises a quantum register and a classical register. When data interaction is not needed, the quantum arithmetic logic unit 10 can write the quantum data to be stored into the quantum register, and the classical arithmetic logic unit 11 can write the classical data to be stored into the classical register.
The invention provides quantum computing-oriented data interaction equipment, which comprises: the quantum arithmetic logic unit is used for processing quantum data and establishing connection with the public register to perform data transmission; the classical arithmetic logic unit is used for processing classical data and establishing connection with a common register to carry out data transmission; a common register for storing quantum data and classical data; the controller is used for judging whether a memory access instruction for accessing the public register is received or not; if so, determining an arithmetic logic unit corresponding to the access instruction according to the access instruction; and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register. Therefore, the invention sets the public register which can be accessed and stored by both the quantum arithmetic logic unit and the classical arithmetic logic unit, so that both the quantum arithmetic logic unit and the classical arithmetic logic unit can store and acquire data from the public register, thereby completing the data interaction between the quantum arithmetic logic unit and the classical arithmetic logic unit. When data interaction is needed, only one of the arithmetic logic units needs to write data into the common register, and the other arithmetic logic unit only needs to read data from the common register, and the whole process only needs two clock cycles, about 1ns can be completed, and the time is far shorter than the time required for completing the data interaction after the external bus is upgraded. Moreover, the data interaction process is simple and easy to realize; performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved.
In an embodiment, the quantum computing-oriented data interaction device provided in the embodiment of the present invention further includes:
and the hybrid compiler is used for converting the received codes into hybrid instructions according to preset compiling rules so as to be identified by the controller.
Those skilled in the art will appreciate that typically the controller will recognize only binary instructions and will not directly recognize program code entered by the operator. The hybrid compiler provided in the embodiment of the present invention is configured to convert a received code into a hybrid instruction according to a preset compilation rule, so that the hybrid compiler can be successfully identified by a controller to complete a corresponding operation. For example, the compiler provided by the embodiment of the present invention supports the conversion of microsoft "Q #" high level language into the hybrid instruction proposed by the embodiment of the present invention. It will be appreciated that the blend instruction is embodied as a binary instruction. In a specific implementation, the blend instruction is specifically 64 bits in length. It should be noted that, those skilled in the art can make the type and length of the mixing instruction according to the actual application, and the embodiment of the present invention is not limited.
In one embodiment, the blend instruction is generally composed of an opcode and an operand that occupy different numbers of bits in the blend instruction. The controller provided by the embodiment of the invention performs code fetching operation after receiving the mixing instruction, and determines whether the mixing instruction needs to be executed on the quantum arithmetic logic unit according to the obtained operation code.
The hybrid instruction can be divided into five types, namely a single-quantum-bit instruction, a double-quantum-bit instruction, a quantum measurement instruction, a quantum register operation instruction and a classical calculation instruction. The structure of the single-quantum-bit instruction provided by the embodiment of the invention is shown in table 1, the structure of the double-quantum-bit instruction is shown in table 2, the structure diagram of the quantum measurement instruction is shown in table 3, the structure of the quantum register operation instruction is shown in table 4, and the structure of the classical calculation instruction is shown in table 5.
TABLE 1
63-60 | 59-48 | 47-46 | 46-45 | 44-30 | 29-0 |
CReg | Instr | Reg1 | QReg1 | Reg2 | undefined |
TABLE 2
63-60 | 59-48 | 47-46 | 46-45 | 44-43 | 42-0 |
CReg | Instr | Reg1 | QReg1 | Qreg2 | undefined |
TABLE 3
63-60 | 59-48 | 47-46 | 46-45 | 44-0 |
CReg | Instr | Reg1 | QReg1 | undefined |
TABLE 4
63-60 | 59-48 | 47-46 | 46-45 | 44-37 | 36-0 |
CReg | Instr | Reg1 | QReg1 | Reg2 | undefined |
TABLE 5
63-60 | 59-48 | 47-42 | 41-32 | 31-0 |
CReg | Instr | Reg1 | undefined | Imm32 |
In one embodiment, Instr in the table occupies a bit width of 12 bits for instruction encoding, operands are stored in different registers, and the occupied bit number is not fixed for the moment. Reg is a classical register, QReg is a quantum register, and CReg is a public register. The blend instruction may directly access and operate a classical register, a quantum register, or a public register. The mixed instruction for realizing different operations is constituted by instructions having different definitions. In particular, some of the instructions are presented in table 6, as shown in table 6.
TABLE 6
Fig. 3 is a flowchart of a quantum computing-oriented data interaction method according to an embodiment of the present invention; as shown in fig. 3, a quantum computing-oriented data interaction method provided in an embodiment of the present invention includes steps S101 to S103:
step S101: judging whether a memory access instruction for performing memory access operation on the public register is received; if yes, executing step S102;
step S102: determining an arithmetic logic unit corresponding to the access instruction according to the access instruction;
step S103: and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register.
In a specific implementation, the controller establishes connections with the quantum arithmetic logic unit and the classical arithmetic logic unit. When a memory access instruction for accessing the public register is received, the corresponding arithmetic logic unit can be controlled to carry out memory access operation on the public register according to the memory access instruction. When the quantum arithmetic logic unit wants to transmit the data obtained by calculation to the classical arithmetic logic unit, the controller can control the quantum arithmetic logic unit to write the data needing to be transmitted into the public register and control the classical arithmetic logic unit to read the data from the public register, thereby completing the data transmission process from the quantum arithmetic logic unit to the classical arithmetic logic unit. This can also be done when it is desired to transfer data from a classical arithmetic logic unit to a quantum arithmetic logic unit. It should be noted that the memory access instruction proposed in the present embodiment belongs to a hybrid instruction, and may be understood as a hybrid instruction for accessing a common register.
In an embodiment, the method for quantum-computation-oriented data interaction according to the embodiment of the present invention, determining, according to the access instruction, an arithmetic logic unit corresponding to the access instruction specifically includes:
judging whether the flag bit of the access instruction indicates quantum identification or not;
if so, determining that the arithmetic logic unit corresponding to the access instruction is a quantum arithmetic logic unit;
and if not, determining that the arithmetic logic unit corresponding to the access instruction is a classical arithmetic logic unit.
The invention provides a data interaction method facing quantum computation, which comprises the steps of judging whether a memory access instruction for accessing a public register is received or not; if so, determining an arithmetic logic unit corresponding to the access instruction according to the access instruction; and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register. Therefore, the invention sets the public register which can be accessed and stored by both the quantum arithmetic logic unit and the classical arithmetic logic unit, so that both the quantum arithmetic logic unit and the classical arithmetic logic unit can store and acquire data from the public register, thereby completing the data interaction between the quantum arithmetic logic unit and the classical arithmetic logic unit. When data interaction is needed, only one of the arithmetic logic units needs to write data into the common register, and the other arithmetic logic unit only needs to read data from the common register, and the whole process only needs two clock cycles, about 1ns can be completed, and the time is far shorter than the time required for completing the data interaction after the external bus is upgraded. Moreover, the data interaction process is simple and easy to realize; performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved.
The invention also provides a corresponding embodiment of the quantum computing-oriented data interaction device. The embodiments are described from the perspective of functional modules.
FIG. 4 is a block diagram of a quantum computing oriented data interaction device according to an embodiment of the present invention; as shown in fig. 4, a quantum computing-oriented data interaction apparatus provided in an embodiment of the present invention includes:
the judging module is used for judging whether a memory access instruction for performing memory access operation on the public register is received or not; if yes, entering a determining module;
the determining module is used for determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction;
and the memory access module is used for sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
In an embodiment, in the quantum computing-oriented data interaction device provided by the present invention, the determining module specifically includes:
the judging unit is used for judging whether the flag bit of the access instruction indicates quantum identification or not; if yes, entering a first determination unit; if not, entering a second determination unit;
the first determining unit is used for determining that the arithmetic logic unit corresponding to the access instruction is a quantum arithmetic logic unit;
and the second determining unit is used for determining that the arithmetic logic unit corresponding to the access instruction is a classical arithmetic logic unit.
Since the embodiments of this section correspond to the embodiments of the method section, reference is made to the description of the embodiments of the method section for the embodiments of this section, and details are not repeated here.
The invention provides a quantum computing-oriented data interaction device, which comprises a memory access module, a memory access module and a data processing module, wherein the memory access module is used for judging whether a memory access instruction for accessing a public register is received; if so, determining an arithmetic logic unit corresponding to the access instruction according to the access instruction; and sending the access instruction to the arithmetic logic unit so that the arithmetic logic unit performs access operation on the common register. Therefore, the invention sets the public register which can be accessed and stored by both the quantum arithmetic logic unit and the classical arithmetic logic unit, so that both the quantum arithmetic logic unit and the classical arithmetic logic unit can store and acquire data from the public register, thereby completing the data interaction between the quantum arithmetic logic unit and the classical arithmetic logic unit. When data interaction is needed, only one of the arithmetic logic units needs to write data into the common register, and the other arithmetic logic unit only needs to read data from the common register, and the whole process only needs two clock cycles, about 1ns can be completed, and the time is far shorter than the time required for completing the data interaction after the external bus is upgraded. Moreover, the data interaction process is simple and easy to realize; performance loss caused by transmission delay is avoided, and transmission efficiency is greatly improved.
Finally, the invention also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps as set forth in the above-mentioned method embodiments.
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and performs all or part of the steps of the methods according to the embodiments of the present invention, or all or part of the technical solution. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The data interaction device, method, apparatus and medium for quantum computing provided by the present invention are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A quantum computing-oriented data interaction device, comprising:
the quantum arithmetic logic unit is used for processing quantum data and establishing connection with the public register to perform data transmission;
the classical arithmetic logic unit is used for processing classical data and establishing connection with a common register to carry out data transmission;
a common register for storing the quantum data and the classical data;
the controller is used for judging whether a memory access instruction for accessing the public register is received or not; if so, determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction; and sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
2. The quantum computing-oriented data interaction device of claim 1, further comprising:
and the hybrid compiler is used for converting the received codes into hybrid instructions according to preset compiling rules so as to be identified by the controller.
3. The quantum-computation-oriented data interaction device according to claim 2, wherein the blending instruction is specifically a binary instruction.
4. The quantum-computation-oriented data interaction device of claim 2, wherein the blend instruction is in particular 64 bits in length.
5. The quantum-computation-oriented data interaction device according to claim 2, wherein the blending instruction is specifically a single-quantum-bit instruction, a double-quantum-bit instruction, a quantum measurement instruction, a quantum register operation instruction, or a classical computation instruction.
6. A data interaction method for quantum computing is characterized by comprising the following steps:
judging whether a memory access instruction for performing memory access operation on the public register is received;
if so, determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction;
and sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
7. The quantum computing-oriented data interaction method according to claim 6, wherein the determining, according to the access instruction, an arithmetic logic unit corresponding to the access instruction specifically comprises:
judging whether the flag bit of the access instruction indicates quantum identification or not;
if so, determining that the arithmetic logic unit corresponding to the access instruction is a quantum arithmetic logic unit;
and if not, determining that the arithmetic logic unit corresponding to the access instruction is a classical arithmetic logic unit.
8. A quantum computing-oriented data interaction device, comprising:
the judging module is used for judging whether a memory access instruction for performing memory access operation on the public register is received or not; if yes, entering a determining module;
the determining module is used for determining an arithmetic logic unit corresponding to the memory access instruction according to the memory access instruction;
and the memory access module is used for sending the memory access instruction to the arithmetic logic unit so that the arithmetic logic unit carries out memory access operation on the public register.
9. The quantum-computation-oriented data interaction device according to claim 8, wherein the determining module specifically comprises:
the judging unit is used for judging whether the flag bit of the access instruction indicates quantum identification or not; if yes, entering a first determination unit; if not, entering a second determination unit;
the first determining unit is used for determining that the arithmetic logic unit corresponding to the access instruction is a quantum arithmetic logic unit;
and the second determining unit is used for determining that the arithmetic logic unit corresponding to the access instruction is a classical arithmetic logic unit.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of the quantum-computation-oriented data interaction method according to claim 6 or 7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010173418.8A CN111310929A (en) | 2020-03-12 | 2020-03-12 | Quantum computation-oriented data interaction equipment, method, device and medium |
PCT/CN2020/087156 WO2021179411A1 (en) | 2020-03-12 | 2020-04-27 | Quantum computing-oriented data interaction device, method and apparatus and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010173418.8A CN111310929A (en) | 2020-03-12 | 2020-03-12 | Quantum computation-oriented data interaction equipment, method, device and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111310929A true CN111310929A (en) | 2020-06-19 |
Family
ID=71151590
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010173418.8A Withdrawn CN111310929A (en) | 2020-03-12 | 2020-03-12 | Quantum computation-oriented data interaction equipment, method, device and medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111310929A (en) |
WO (1) | WO2021179411A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113869520A (en) * | 2021-10-20 | 2021-12-31 | 中国人民解放军战略支援部队信息工程大学 | Quantum computer system structure for sharing control and computing method thereof |
CN114004361A (en) * | 2021-09-24 | 2022-02-01 | 苏州浪潮智能科技有限公司 | Label identification and segmentation method and device for quantum-classical hybrid algorithm and storage medium |
CN116187455A (en) * | 2022-12-16 | 2023-05-30 | 中国人民解放军战略支援部队信息工程大学 | Classical and quantum mixed instruction pipeline design method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1870015A (en) * | 2006-06-28 | 2006-11-29 | 中山大学 | Cooperative quantum computer architecture structural conceptual |
US20180260245A1 (en) * | 2017-03-10 | 2018-09-13 | Rigetti & Co, Inc. | Event Scheduling in a Hybrid Computing System |
EP3794520A4 (en) * | 2018-05-18 | 2022-03-23 | Rigetti & Co. LLC | Computing platform with heterogenous quantum processors |
-
2020
- 2020-03-12 CN CN202010173418.8A patent/CN111310929A/en not_active Withdrawn
- 2020-04-27 WO PCT/CN2020/087156 patent/WO2021179411A1/en active Application Filing
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114004361A (en) * | 2021-09-24 | 2022-02-01 | 苏州浪潮智能科技有限公司 | Label identification and segmentation method and device for quantum-classical hybrid algorithm and storage medium |
CN113869520A (en) * | 2021-10-20 | 2021-12-31 | 中国人民解放军战略支援部队信息工程大学 | Quantum computer system structure for sharing control and computing method thereof |
CN116187455A (en) * | 2022-12-16 | 2023-05-30 | 中国人民解放军战略支援部队信息工程大学 | Classical and quantum mixed instruction pipeline design method and device |
CN116187455B (en) * | 2022-12-16 | 2024-10-25 | 中国人民解放军战略支援部队信息工程大学 | Classical and quantum mixed instruction pipeline design method and device |
Also Published As
Publication number | Publication date |
---|---|
WO2021179411A1 (en) | 2021-09-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111310929A (en) | Quantum computation-oriented data interaction equipment, method, device and medium | |
US8738892B2 (en) | Very long instruction word (VLIW) computer having efficient instruction code format | |
US10684776B2 (en) | Memory configuration for inter-processor communication in an MPSoC | |
CN111142938B (en) | Task processing method and device for heterogeneous chip and electronic equipment | |
CN111045933A (en) | Regression strategy updating method and device, storage medium and terminal equipment | |
CN110516789B (en) | Method and device for processing instruction set in convolutional network accelerator and related equipment | |
CN110427337B (en) | Processor core based on field programmable gate array and operation method thereof | |
CN103049710B (en) | Field-programmable gate array (FPGA) chip for SM2 digital signature verification algorithm | |
CN101495959A (en) | Method and system to combine multiple register units within a microprocessor | |
CN1853164B (en) | Combinational method for developing building blocks of DSP compiler | |
CN112115668B (en) | FPGA layout method, device, electronic equipment and computer readable medium | |
CN114968373A (en) | Instruction dispatching method and device, electronic equipment and computer readable storage medium | |
CN113204385A (en) | Plug-in loading method and device, computing equipment and readable storage medium | |
CN114443559A (en) | Reconfigurable operator unit, processor, calculation method, device, equipment and medium | |
CN101373444A (en) | Exposing system topology to the execution environment | |
KR100781340B1 (en) | System and method for processing user defined extended operation | |
CN116610362B (en) | Method, system, equipment and storage medium for decoding instruction set of processor | |
JP2022550059A (en) | Processor and its internal interrupt controller | |
CN114217988A (en) | Response type responsibility chain mode data processing method based on IO processing | |
CN108334313A (en) | Continuous integrating method, apparatus and code management system for large-scale SOC research and development | |
CN111400013B (en) | Method and system for processing data stream of multi-core processor | |
CN111027196B (en) | Simulation analysis task processing method and device for power equipment and storage medium | |
CN111078596A (en) | Flash chip control method, device and system and readable storage medium | |
CN111752709A (en) | AI calculation configuration method, device, equipment and storage medium | |
CN103927153A (en) | System configuration method and device and system |
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 | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20200619 |
|
WW01 | Invention patent application withdrawn after publication |