Method, device, system and electronic device for generating quantum instructions

By generating quantum instructions, the input program is converted into quantum instructions, which solves the transplantation problem of quantum computer programming, simplifies the encoding complexity, and improves the portability and performance of quantum programs.

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

Patent Information

Application Number
CN201911040291.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-29
Publication Date
2025-08-15
Estimated Expiration
2039-10-29

AI Technical Summary

Technical Problem

The existing quantum computer programming methods cannot be directly transplanted into quantum computers, and it is necessary to design a program processing solution suitable for quantum computers.

Method used

A method of generating quantum instructions is provided, by obtaining input instructions of an input program, converting them into quantum instructions, including triggering the waveform of the logic gate of the qubit in the quantum chip system, and outputting the quantum program.

Benefits of technology

It reduces the complexity of encoding, reduces the instruction overhead of quantum programs, improves the portability and overall performance of quantum programs, and simplifies the control of quantum bits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110889506B_ABST
    Figure CN110889506B_ABST
Patent Text Reader

Abstract

Embodiments of this specification provide methods, devices, systems, and electronic devices for generating quantum instructions, wherein one method includes: obtaining input instructions of an input program; converting at least one first input instruction among the input instructions into a first quantum instruction, wherein each first quantum instruction is used to trigger a waveform of at least two logic gates that control quantum bits in a quantum chip system within a specific time period; and outputting a quantum program, wherein the quantum program corresponds to the input program and includes the first quantum instruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of quantum computing technology, and more specifically, to a method for generating quantum instructions, a decoding and conversion device, a quantum computing processing system, and an electronic device. Background Art

[0002] A quantum computer is a physical device that follows the laws of quantum mechanics to perform high-speed mathematical and logical operations, store, and process quantum information. Due to its powerful parallel computing capabilities, quantum computers are capable of rapidly completing calculations that are infeasible for classical computers, and therefore hold great promise for development. However, current quantum computers are still only used in laboratories. Technologists have yet to design a quantum computing processing system suitable for widespread use, tailored to the unique characteristics of quantum computing.

[0003] Quantum computers adhere to the laws of quantum mechanics, exhibiting physical properties such as superposition collapse upon measurement, entangled states, and non-cloning. These characteristics distinguish quantum programming from traditional programming. For example, variables in a quantum programming environment cannot be assigned values. Therefore, it is impossible to directly transfer programming methods from classical computers to quantum computers. Therefore, a program processing solution suitable for quantum computers is needed. Summary of the Invention

[0004] The embodiments of this specification provide a new technical solution for generating quantum instructions.

[0005] According to a first aspect of the present specification, a method for generating quantum instructions is provided, comprising: obtaining input instructions of an input program; converting at least one first input instruction among the input instructions into a first quantum instruction, wherein each first quantum instruction is used to trigger a waveform of at least two logic gates that control quantum bits in a quantum chip system within a specific time period; and outputting a quantum program, wherein the quantum program corresponds to the input program and includes the first quantum instructions.

[0006] Optionally, the method further includes converting at least one second input instruction among the input instructions into a second quantum instruction, wherein each second quantum instruction is used to trigger a waveform of a single logic gate that controls a quantum bit in a quantum chip system. The quantum program also includes the second quantum instruction.

[0007] Optionally, the first input instruction is a more complex program instruction than the second input instruction, wherein the method further includes: determining the input instruction as the first input instruction or the second input instruction.

[0008] Optionally, each first quantum instruction is used to trigger a waveform that controls all relevant quantum bits in the quantum chip system within a specific time period.

[0009] Optionally, the first quantum instruction does not include an operand corresponding to a quantum bit.

[0010] Optionally, the waveforms of the at least two logic gates include waveforms corresponding to no operations.

[0011] According to a second aspect of the present specification, a decoding and conversion device is provided, comprising means for executing the steps in the method according to the first aspect of the present specification.

[0012] According to a third aspect of this specification, a quantum computing processing system is provided, comprising: a decoding and conversion device according to the second aspect of this specification; and a quantum chip system, wherein the decoding and conversion device generates a quantum program to control the operation of the quantum chip system.

[0013] According to a fourth aspect of this specification, an electronic device is provided, comprising the quantum computing processing system according to the third aspect of this specification.

[0014] In various embodiments, the method for generating quantum instructions reduces the complexity of encoding, at least to some extent, and reduces the instruction overhead of quantum programs.

[0015] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.

[0017] Figure 1 A schematic diagram of a hardware configuration that can be used to implement the method of the embodiment of this specification is shown.

[0018] Figure 2 A flow chart of a method according to one embodiment is shown.

[0019] Figure 3 A schematic block diagram of a transcoding device according to an embodiment is shown.

[0020] Figure 4 A schematic block diagram of a decoding and conversion device according to another embodiment is shown.

[0021] Figure 5 A schematic block diagram of a quantum computing processing system according to one embodiment is shown. DETAILED DESCRIPTION

[0022] Hereinafter, various embodiments and examples of the present specification will be described with reference to the accompanying drawings.

[0023] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.

[0024] It should be noted that like reference numerals and letters refer to like items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0025] Hereinafter, various embodiments and examples of the present specification will be described with reference to the accompanying drawings.

[0026] <Hardware Configuration>

[0027] Figure 1 1 is a schematic diagram of a hardware configuration that can be used to implement the embodiments of this specification, including a decoding device 100, a waveform generating device 200, and a quantum chip. The quantum chip can be provided with at least one quantum bit 300.

[0028] The decoding device 100 is used to decode an input program into a quantum program. The decoding device 100 can be a classical computer, a dedicated processing device, or the like. The input program can be a classical computer program, including conventional C language programs and assembly programs, or a program written in a higher-level language designed for quantum computers. The decoding device 100 can convert the program into a quantum program containing quantum instructions as needed. Quantum programs are programs suitable for controlling qubits.

[0029] The waveform generating device 200 is used to trigger a control waveform under the control of a quantum program to generate a control signal for subsequently controlling a quantum bit. The waveform generating device 200 is, for example, an arbitrary waveform generator based on an FPGA. The waveform generating device 200 is a type of quantum bit control device that directly operates on a quantum bit. The quantum bit control device is part of a quantum bit measurement and control device. The quantum bit measurement and control device can not only generate a control waveform under the control of a quantum program to operate on the quantum bit for quantum calculation, but can also be used to receive the results of the quantum calculation performed on the quantum bit to achieve measurement and control of the quantum bit. Depending on the quantum bits used in the quantum computer, other quantum bit control devices can also be used, without limitation.

[0030] The qubit 300 is used to perform quantum computing under the control of the waveform. The qubit 300 can be, for example, a semiconductor qubit, a superconducting qubit, or the like.

[0031] Here, the quantum bit control device and quantum bits can be collectively referred to as a quantum chip system.

[0032] The above hardware configuration is merely illustrative and is by no means intended to limit the technical solutions of the embodiments of this specification.

[0033] <Method Example>

[0034] This embodiment provides a method for generating quantum instructions. For example, Figure 1 The decoding device 100 in the embodiment is used to execute the solution in this embodiment. Figure 2 As shown, the method includes the following steps S2100-S2300.

[0035] In step S2100, an input instruction of an input program is obtained.

[0036] An instruction is a command that tells a computer to perform a certain operation. A program is a collection of instructions written in a computer language to achieve a specific goal or solve a specific problem.

[0037] A quantum program is used to indicate a sequence of operations to be performed on the quantum bits (qubits) in a quantum computer.

[0038] The input program represents the program before conversion into a quantum program. The input program can be a program expressed in an existing programming language, a high-level quantum program expressed in a high-level quantum language, or a quantum intermediate representation converted from a high-level quantum program.

[0039] Accordingly, the input instruction represents the instruction before being converted into a quantum instruction. The input instruction can be an instruction expressed in an existing instruction language, a high-level quantum instruction expressed in a high-level quantum language, a quantum intermediate representation converted from a high-level quantum instruction, etc.

[0040] Step S2200: converting at least one first input instruction among the input instructions into a first quantum instruction, wherein each first quantum instruction is used to trigger a waveform of at least two logic gates that control quantum bits in a quantum chip system within a specific time period.

[0041] Quantum instructions are used to generate waveforms that control the qubits in a quantum chip system (i.e., the waveforms that operate the logic gates of the qubits) within a specific time period. Logic gates are the units that enable the transition from input state to output state in data processing.

[0042] Logic gates are the foundation of computation. Both quantum and classical computers perform computations using their own logic circuits, which are composed of logic gates. Because the two computers follow different principles, quantum and classical logic gates are fundamentally different.

[0043] Quantum logic gates include, for example, RX gate (gate for rotating at any angle around the X axis), RY gate (gate for rotating at any angle around the Y axis), RZ gate (gate for rotating at any angle around the Z axis), CNOT gate (CONTROL-NOT, controlled NOT gate), and so on.

[0044] Quantum logic gates can be divided into single-bit quantum logic gates and two-bit quantum logic gates. Examples of single-qubit logic gates are RX gates, RY gates, and RZ gates, while examples of two-bit quantum logic gates are CNOT gates and CR gates (controlled phase gates).

[0045] In this embodiment, each first quantum instruction is used to trigger waveforms of at least two logic gates that control quantum bits in the quantum chip system within a specific time period.

[0046] In one example, a first quantum instruction is used to trigger a waveform that controls two quantum bits to perform an RX gate operation and an RY gate operation, respectively, within a specific time period.

[0047] In another example, a first quantum instruction is used to trigger a waveform that controls two quantum bits to perform an RX gate operation and an RY gate operation, respectively, and controls two quantum bits to perform an RZ gate operation within a specific time period.

[0048] The at least two logic gates involved in the first quantum instruction may be of different types or of the same type.

[0049] Step S2300: outputting a quantum program, wherein the quantum program corresponds to the input program and includes a first quantum instruction.

[0050] The correspondence between a quantum program and an input program means that the expected results of the series of operations of a computer (such as a quantum computer) indicated by the quantum program correspond to the expected results of the series of operations of the computer (such as a quantum computer) indicated by the input program.

[0051] Through this embodiment, the complexity of encoding is reduced, at least to a certain extent, and the instruction overhead of the quantum program is reduced.

[0052] In addition, since the instructions are concise, the waveform generating device can be directly called to generate the required waveform through fewer instructions (such as one instruction), reducing the processing time required from quantum instructions to triggering the waveform.

[0053] In addition, this method can reduce the dependence of upper-level instructions on the quantum bit implementation method, thereby improving the portability of quantum programs.

[0054] Furthermore, this approach facilitates integrated control of multiple qubits, thereby improving their overall performance. For example, it makes it easier to compensate for some qubits.

[0055] In one embodiment, the method for generating quantum instructions further includes the following steps: converting at least one second input instruction among the input instructions into a second quantum instruction, wherein each second quantum instruction is used to trigger the waveform of a single logic gate of a quantum bit in the quantum chip system. The quantum program also includes the second quantum instruction. The second quantum instruction may be, for example, an instruction for a single logic gate in the prior art. This approach is compatible with prior art logic gate-based instruction encoding methods.

[0056] In one example, a second quantum instruction is used to trigger a waveform of a single logic gate that controls a quantum bit in a quantum chip system. The single logic gate is, for example, an RX gate, an RY gate, an RZ gate, a CZ gate (control Z gate), a CNOT gate, and the like.

[0057] Currently, one application scenario for quantum programs is measurement and control experiments. In these scenarios, quantum programs are relatively simple, with a small number of qubits and logic gates. In these cases, describing quantum circuits based on a single logic gate does not incur significant instruction overhead and is therefore simple and easy to implement.

[0058] In this embodiment, since the quantum program includes the second quantum instruction, it can be applied to the application scenario of measurement and control experiments.

[0059] In one embodiment, the first input instruction is a program instruction that is more complex than the second input instruction, and the method for generating a quantum instruction further includes the following steps: determining the input instruction as the first input instruction or the second input instruction.

[0060] In one example, the first input instruction is an input instruction in a quantum computing scenario, and the second input instruction is an input instruction in a measurement and control experiment scenario. The computational complexity of the two scenarios is different, and the first input instruction is more complex than the second input instruction.

[0061] In this embodiment, the type of the input instruction is determined, that is, whether the input instruction is the first input instruction or the second input instruction.

[0062] The above judgment can be performed based on the type identification of the input instruction (for example, the type identification is preset when the instruction is written), or based on the complexity, length, etc. of the input instruction.

[0063] When it is determined that the input instruction is the first input instruction, the first input instruction is converted into a first quantum instruction.

[0064] When it is determined that the input instruction is the second input instruction, the second input instruction is converted into a second quantum instruction.

[0065] The method for generating quantum instructions in this embodiment can take into account both scenarios where the input instructions are relatively simple and scenarios where the input instructions are relatively complex.

[0066] In one embodiment, each first quantum instruction is used to trigger a waveform that controls all relevant logic gates of all relevant quantum bits in the quantum chip system within a specific time period.

[0067] Related qubits are multiple qubits used to implement the same quantum computation, and the logic gates that operate the related qubits are related logic gates, for example, all qubits included in the same quantum chip system and all logic gates that operate all qubits.

[0068] In one example, a quantum chip system includes four qubits, designated q0, q1, q2, and q3. For example, t1 represents the time period during which an operation is performed. The first quantum instruction triggers waveforms that control qubits q0, q1, q2, and q3 during time period t1. These waveforms are actually the waveforms of the logic gates that operate qubits q0, q1, q2, and q3.

[0069] The method for generating quantum instructions in this embodiment can fully control the relevant quantum bits, which is conducive to achieving quantum bit compensation.

[0070] In one embodiment, because a first quantum instruction can be used to trigger waveforms that control multiple qubits (i.e., waveforms that operate logic gates for the multiple qubits), multiple qubits can be controlled by a single first quantum instruction. In this case, the number of operands corresponding to qubits in the quantum instruction can be reduced, or the first quantum instruction can exclude operands corresponding to qubits.

[0071] The operand is an immediate number that encodes the bit information for performing the quantum operation. For example, the operand 00000000000010 indicates that a single-qubit logic gate operation is performed on the first qubit. The operand 00000000001010 indicates that a single-qubit logic gate operation is performed on the first and third qubits.

[0072] The method for generating quantum instructions in this embodiment can reduce the complexity of instructions and increase system scalability by controlling all relevant quantum bits without specifically recording operands.

[0073] In one embodiment, the waveforms of the qubits of the at least two logic gates include waveforms corresponding to no-operations.

[0074] Applying a waveform corresponding to a no-operation to a qubit produces a no-operation, i.e., an operation that keeps the state of the qubit (quantum state for short) unchanged.

[0075] In this embodiment, the first quantum instruction is used to trigger a waveform corresponding to a no-operation, thereby enabling no-operation of quantum bits.

[0076] A specific example of implementing the method for generating quantum instructions is provided below.

[0077] In this example, the input program is a high-level quantum program with the following code:

[0078] SQOS0{0001};

[0079] SQOS1{0010};

[0080] SQOS2{0100};

[0081] SQO S3{1000};

[0082] SQO S4{0110};

[0083] 0|H S0,RX S1;

[0084] 0|RY S2,RX S3;

[0085] 1|RX S4,RY S1;

[0086] The first five lines of the above code define the operands. For example, SQOS1{0010} specifies an operand value of 0010 (which represents an operation on the second qubit) and denotes this operand as S1. SQO stands for StoreQuantumOperand, meaning store qubit operand.

[0087] The last three lines of the above code represent the main body of the program, described by logic gates. For example, 0|H S0,X S1 means: At a time point zero time units away from the previous time point, perform an H gate (Hadamard gate) on the qubit represented by operand S0, and perform an RX gate on the qubit represented by operand S1.

[0088] The input program is decoded according to the method for generating quantum instructions provided in this embodiment, and the following quantum program is output:

[0089] 0|GATE1;

[0090] Among them, GATE1 is specifically:

[0091] Q 0: H+0;

[0092] Q 1: RX+RY;

[0093] Q 2: RY+0;

[0094] Q 3: RX+0;

[0095] Q 4: 0+RX;

[0096] The above-mentioned GATE1 is a first quantum instruction. GATE 1 is used to trigger a control waveform, which is used to sequentially perform an H logic gate operation and a no operation on Q0 at a time point 0 unit time away from the previous time point and a time point 1 unit time away from the previous time point, sequentially perform an RX logic gate operation and an RY logic gate operation on Q1, sequentially perform an RY logic gate operation and a no operation on Q2, sequentially perform an RX logic gate operation and a no operation on Q3, and perform a no operation and an RX logic gate operation on Q4. Using the waveform corresponding to the no operation can unify the total length of the waveform and better adapt to the quantum chip system. In an example, the waveform length of a single-bit quantum logic gate is 20ns, and the waveform length of a two-bit quantum logic gate is 40ns. The length of one unit time can be set to 20ns.

[0097] It can be seen that the method of generating quantum instructions in this example reduces the instruction overhead of the quantum program. It can also directly call the waveform generator to generate the required waveform through a single instruction, reducing the processing time required from quantum instructions to triggering the waveform.

[0098] <Decoding and conversion device embodiment>

[0099] This embodiment provides a decoding conversion device, which is, for example, Figure 3 The decoding and conversion device 300 shown includes a device for executing the steps of the method described in the method embodiment of this specification, namely, a decoding and conversion device 310.

[0100] Specifically, the decoding and conversion device 310 includes an input module, a decoding module and an input module.

[0101] The input module is used to obtain input instructions for the input program.

[0102] The decoding module is used to convert at least one first input instruction among the input instructions into a first quantum instruction, wherein each first quantum instruction is used to trigger a waveform of at least two logic gates that control quantum bits in a quantum chip system within a specific time period.

[0103] The output module is used to output a quantum program, wherein the quantum program corresponds to the input program and includes a first quantum instruction.

[0104] In one embodiment, the decoding module is further used to convert at least one second input instruction among the input instructions into a second quantum instruction, wherein each second quantum instruction is used to trigger a waveform of a single logic gate that controls a quantum bit in a quantum chip system, and wherein the quantum program also includes the second quantum instruction.

[0105] In one embodiment, the first input instruction is a program instruction that is more complex than the second input instruction. The above-mentioned device further includes a judgment module, which is used to judge whether the input instruction is the first input instruction or the second input instruction.

[0106] In one embodiment, each first quantum instruction is used to trigger a waveform that controls all relevant quantum bits in the quantum chip system within a specific time period.

[0107] In one embodiment, the first quantum instruction does not include operands corresponding to quantum bits.

[0108] In one embodiment, the waveforms of the at least two logic gates include a waveform corresponding to a no-operation.

[0109] In one embodiment, the transcoding device is Figure 4 The decoding and conversion device 400 shown includes a memory 410 and a processor 420 .

[0110] The memory 410 is used to store executable commands.

[0111] The processor 420 is used to implement the method described in the method embodiment of this specification under the control of the executable command.

[0112] <Quantum Computing Processing System Example>

[0113] This embodiment provides a quantum computing processing system, such as Figure 5 The computer processing system 500 shown includes a decoding and conversion device 510 and a quantum chip system 520. The decoding and conversion device 510 generates a quantum program to control the operation of the quantum chip system 520.

[0114] <Electronic Equipment Example>

[0115] This embodiment provides an electronic device, including the quantum computing processing system described in the quantum computing processing system embodiment of this specification.

[0116] Unless otherwise specified, the terms "first", "second", etc. are only used to distinguish the things referred to by the following nouns, and do not indicate the order and / or priority of the things mentioned.

[0117] The above embodiments can be referred to each other. Therefore, in the description of the following embodiments, the parts repeated with the previous embodiments are omitted.

[0118] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

Claims

1. A method for generating quantum instructions, comprising: Get input instructions for the input program; Converting at least one first input instruction among the input instructions into a first quantum instruction, wherein each first quantum instruction is used to trigger waveforms of at least two logic gates for operating quantum bits in a quantum chip system within a specific time period, wherein the waveforms of the at least two logic gates include a waveform corresponding to a no-operation so as to have a uniform total waveform length; and A quantum program is output, wherein the quantum program corresponds to the input program and includes a first quantum instruction.

2. The method according to claim 1, further comprising: At least one second input instruction among the input instructions is converted into a second quantum instruction, wherein each second quantum instruction is used to trigger a waveform of a single logic gate that controls a quantum bit in a quantum chip system, wherein the quantum program also includes the second quantum instruction.

3. The method according to claim 2, wherein: The first input instruction is a program instruction that is more complex than the second input instruction, wherein the method further comprises: The input instruction is determined to be the first input instruction or the second input instruction.

4. The method according to claim 1, wherein Each first quantum instruction is used to trigger a waveform that controls all relevant quantum bits in the quantum chip system for a specific period of time.

5. The method according to claim 1 or 4, wherein The first quantum instruction does not include an operand corresponding to a quantum bit.

6. A transcoding device comprising means for executing the steps of the method according to any one of claims 1 to 5.

7. A quantum computing processing system comprising: The decoding and conversion device according to claim 6; as well as Quantum chip system, The decoding and conversion device generates a quantum program to control the operation of the quantum chip system.

8. An electronic device comprising the quantum computing processing system according to claim 7.

Citation Information

Patent Citations

  • Quantum program transformation method and quantum program transformation system for decoherence

    CN109961150A

  • Quantum program conversion apparatus, its method and program, and recording medium

    JP2006331249A

  • Secure probabilistic one-time program by quantum state distribution

    US20190028271A1

  • Techniques for control of quantum systems and related systems and methods

    US20190049495A1

  • Data structure representing quantum program

    CN109063844A