Automatic Quantum Program Optimization Using Adjoint Annotations
By introducing conjugate accompanying annotation and conditional accompanying addition in quantum programming languages, the lack of support for conditional accompanying and conjugate accompanying programming modes in the prior art is solved, and the effect of running circuits on smaller quantum devices is achieved, saving circuit depth and width.
Patent Information
- Application Number
- CN202080074386.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-24
- Filing Date
- 2020-10-13
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2040-10-13
AI Technical Summary
Existing quantum programming languages do not support conditional or conjugated programming modes, resulting in compilers failing to take advantage of optimization opportunities and unable to automatically convert circuits using clean qubits to circuits using idle qubits, resulting in circuits using more qubits.
By introducing conjugate companion annotation, the compiler allows the compiler to generate low-level programs that allow quantum computing devices to use free qubits in response to conjugate companion annotation, replacing clean qubits, thereby reducing the total number of qubits, and using conditional companion addition instead of controlled addition to the inexpensive multiplier.
It is implemented to run the circuit on smaller quantum devices, saving circuit depth and width, especially in the case of a large number of qubits, with the savings of circuit depth between 1.5 and 2 times.
Smart Images

Figure CN114667500B_ABST
Abstract
Description
Technical Field
[0001] This application relates to quantum computing devices and their programming. Background Art
[0002] Existing quantum programming languages do not provide dedicated support for programming patterns such as conditional adjoint or conjugate adjoint. As a result, compilers for these languages fail to take advantage of the optimization opportunities described in this disclosure. In addition, none of the available quantum programming languages support automatically converting a circuit that uses clean qubits to a circuit that uses idle qubits. Consequently, the resulting circuits typically use more qubits than necessary.
[0003] Embodiments of the disclosed technology allow people to run the above circuits on smaller quantum devices. Previous multiplication circuits used (expensive) controlled addition. Embodiments of the disclosed technology employ a multiplier that works using conditional adjoint addition, which is cheaper to implement on near-term and large-scale quantum hardware. In some examples, for a large number of qubits, the circuit depth savings are between 1.5 and 2 times. Summary of the Invention
[0004] The methods, apparatuses, and systems of this disclosure should not be construed in any way as being limiting. Instead, this disclosure is directed to all novel and non-obvious features and aspects (individually or in various combinations and sub-combinations with each other) of the various disclosed embodiments. Additionally, any feature or aspect of the embodiments of this disclosure can be used in various combinations and sub-combinations with each other. For example, one or more method actions from one embodiment can be used with one or more method actions from another embodiment, and vice versa. The methods, apparatuses, and systems of this disclosure are not limited to any particular aspect or feature or combination thereof, and the embodiments of this disclosure do not require the presence of any one or more particular advantages or the solving of any problems.
[0005] In some embodiments, a high-level description of a quantum program to be implemented in a quantum computing device is received; the high-level description of the quantum program can be compiled into a low-level program executable by the quantum computing device. In a particular implementation, for example, one or more adjoint annotations in the high-level description are identified; and a low-level program is generated such that the quantum computing device uses one or more idle qubits in response to the one or more adjoint annotations. In some implementations, the one or more idle qubits replace corresponding one or more qubits in a clean state, thereby reducing the total number of qubits required to implement the quantum program. In certain implementations, the method further includes implementing the low-level program in the quantum computing device. In some implementations, the compilation includes matching code fragments corresponding to conditional adjoint statements; in some examples, the matching uses information given in one or more adjoint annotations. In certain implementations, the one or more idle qubits are in an unknown superposition state. In some implementations, the compilation includes performing one or more replacements of one or more references to controlled operations in the high-level description of the quantum program with references to one or more conditional adjoint statements. In some examples, the execution of the one or more replacements is conditional on whether there are sufficient available qubits in the quantum computing device when the quantum computing device operates according to the low-level program. In certain examples, the low-level program implements a reversible multiplier in the quantum computing device using conditional adjoint addition instead of conventional controlled addition.
[0006] Any of the embodiments of the present disclosure can be implemented by one or more computer-readable media storing computer-executable instructions that, when executed by a computer, cause the computer to perform any of the methods of the present disclosure.
[0007] The foregoing and other objects, features, and advantages of the technology of the present disclosure will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 A generalized example of a suitable classical computing environment in which aspects of the described embodiments can be implemented is shown.
[0009] Figure 2 An example of a possible network topology (e.g., a client-server network) for implementing a system according to the technology of the present disclosure is shown.
[0010] Figure 3 Another example of a possible network topology (e.g., a distributed computing environment) for implementing a system according to the technology of the present disclosure is shown.
[0011] Figure 4 An exemplary system for implementing the technology of the present disclosure is shown, where the system includes one or more classical computers in communication with a quantum computing device.
[0012] Figures 5 - 6 is a flowchart of an exemplary embodiment for implementing the technology of the present disclosure.
[0013] Figures 7 - 8 is a schematic block diagram showing an exemplary embodiment of the technology of the present disclosure as a quantum circuit diagram.
[0014] Figures 9 - 10 is a flowchart of another exemplary embodiment for implementing the technology of the present disclosure. Detailed Description
[0015] I. General Considerations
[0016] The methods, apparatuses, and systems of the present disclosure should not be construed as being limited in any way. On the contrary, the present disclosure is directed to all novel and non-obvious features and aspects of the various disclosed embodiments (individually or in various combinations and sub-combinations with each other). In addition, any feature or aspect of the embodiments of the present disclosure can be used in various combinations and sub-combinations with each other. For example, one or more method acts from one embodiment can be used with one or more method acts from another embodiment, and vice versa. The methods, apparatuses, and systems of the present disclosure are not limited to any particular aspect or feature or combination thereof, and the embodiments of the present disclosure do not require the presence of any one or more particular advantages or the solving of problems.
[0017] Various alternatives to the examples described herein are possible. The various aspects of the technology of the present disclosure can be used in combination or separately. Different embodiments use one or more of the described innovations. Some of the innovations described herein solve one or more of the problems mentioned in the background art. Generally, a given technology / tool does not solve all such problems.
[0018] As used in this application and the claims, the singular forms "a", "an", and "the" include the plural forms unless the context clearly dictates otherwise. In addition, the word "includes" means "comprises". Further, as used herein, the term "and / or" refers to any item in the phrase or any combination of items.
[0019] II. Brief Overview
[0020] The technology of the present disclosure relates to replacing a controlled operation with a conditional adjoint (or "conditional inverse") operation. If adjoint information is available for a given operation, these can be implemented more cheaply. As discussed herein, the adjoint operation is a way to invert certain quantum operations. In some embodiments of the technology of the present disclosure, adjoint information (which describes how to use the adjoint to invert) can be added as an annotation to a quantum operation described by a programmer of a quantum program. Further, embodiments of the technology of the present disclosure further apply the conditional adjoint of the operation "U" when available. In an exemplary expression, this conditional operation is stated succinctly: "If the control_qubit is 1, then apply the inverse of U, otherwise apply U". The use of the conditional adjoint can use adjoint information in order to use fewer quantum computing resources.
[0021] III. Detailed Embodiments of the Technology of the Present Disclosure
[0022] Some quantum programming languages support specialized modifier-specific implementations of user-defined quantum operations, where the modifier transforms the original quantum operation into its controlled, inverse, or controlled inverse. Thus, the programmer can provide an optimized implementation that the compiler should select (e.g., the user-defined quantum operation is conditionally executed on other qubits).
[0023] This language support allows various optimizations that had to be performed manually previously. While four versions (i.e., regular, controlled, inverse, controlled inverse) cover various cases, a fifth version is provided that can reduce the circuit depth and width. Specifically, an "adjoint" annotation is introduced, which indicates that the annotated operation can be inverted by conjugating with another quantum operation. Such an annotation allows the compiler to more efficiently implement the conditional adjoint operation. The conditional adjoint means to perform a given unitary operation, or its inverse; selected conditional on one or more other qubits. In pseudocode:
[0024]
[0025] When encountering such a code snippet, the compiler can check whether the operation U supports "adjoint", which will allow it to rewrite the above as
[0026]
[0027] where V is the quantum operation that inverts U when U is conjugated with V (i.e., Inverse(U) = Inverse(V)UV). Typically, the implementation of V is much cheaper than U, which in turn also makes the conditional execution cheaper.
[0028] In addition to this optimization, the present disclosure also discloses how this annotation allows for the automatic execution of the following important optimizations, including one or more of the following: (1) reducing qubit requirements by automatically converting an implementation using clean qubits to an implementation that can use qubits that are idle but not necessarily in a definite state (qubits that save intermediate results); or (2) reducing the circuit depth for various applications by using conditional adjoints instead of controlled quantum operations.
[0029] In previous work ( "Factoring using 2n+2 qubits with Toffoli-based modules multiplication" by [authors], https: / / arxiv.org / abs / 1611.07995), it was shown how to more efficiently perform adding a constant to a quantum number using idle qubits. Here, it shows how to generalize this and bring it into the following form: where "adjoint conjugate" can be used to automatically implement an implementation using idle qubits.
[0030] Specifically, the quantum circuit for performing the original circuit is shown in Figure 7 schematic block diagram 700. Using an idle qubit denoted by |g>, its most general form is as shown in Figure 8 schematic block diagram 800.
[0031] The first circuit performs U if and only if W flips the second qubit (initially 0). To see that the second circuit behaves the same, note that if W flips g, then U, V, and Inverse(V) are performed, or just the intermediate U. Both cases simplify to U. On the other hand, if W does not flip g, then no operation is performed on q1, or the entire sequence U, V, U, Inverse(V) is performed, whichever. Since Inverse(U) = Inverse(V)UV, the entire sequence is equivalent to not performing any quantum operations, as desired. Thus, the two circuits are equivalent, but the latter uses an idle qubit.
[0032] Therefore, with the additional information of the "adjoint conjugate" annotation, the compiler can automatically convert the first circuit to a circuit using idle qubits by repeatedly applying the above rewriting steps.
[0033] Now it will be detailed how the "adjoint conjugate" annotation helps the compiler reduce the depth of the resulting quantum circuit. By identifying the code fragments described in the introduction and directly replacing them with optimized implementations, the circuit depth can be reduced by more than a factor of 2: the circuit for U does not have to be applied twice (once regular and once inverse), and the U operation does not require a control qubit. Thus, if the controlled version of V can be performed cheaply, significant savings can be achieved via pattern matching.
[0034] Furthermore, several quantum subroutines can dispense with the conditional adjoint of U rather than the regular controlled version of U. In this case, the above savings can be achieved even if there is no such conditional adjoint pattern in the original code. Two examples are now given to illustrate that such savings are possible.
[0035] As a first example, consider phase estimation. Standard phase estimation requires a controlled unitary U that estimates its (multiple) eigenphases and prepares the (multiple) corresponding eigenstates. This uses the quantum interference effect, where the phase estimation qubit is initialized to a superposition, and the unitary U is applied to the target quantum register only when the phase estimation qubit is in |1 >, and finally, the phase estimation qubit is measured in the X basis. However, no mapping is required:
[0036]
[0037] The following mapping also applies to the phase estimation process (e.g., see "Elucidating Reaction Mechanisms on Quantum Computers" by Reiher et al. https: / / arxiv.org / pdf / 1605.03590.pdf):
[0038]
[0039] This is precisely the conditional adjoint: if the phase estimation qubit is 1, then U is applied; otherwise, the inverse of U is applied, denoted by .
[0040] As a second example, consider multiplication. Many quantum applications require evaluating classical functions on input superpositions. These cannot be evaluated on classical devices because it requires reading the quantum state, thereby destroying the superposition and any quantum acceleration. An example is multiplication, which in turn can be used to construct circuits that evaluate higher-level functions such as sin(x), exp(x), etc. via polynomial approximation.
[0041] The standard method for implementing the reversible multiplication of two n-bit numbers (and thus quantum multiplication) is to have n controlled additions, where each addition is conditioned on one of the n input bits. While implementing the controlled version of addition is expensive, the conditional adjoint of addition can be implemented using zero additional non-Clifford gates - without the need for more expensive gates. Specifically, the inverse of addition can be performed by placing Pauli-X operations before and after the addition. Thus, the conditional adjoint can be performed by controlling these Pauli-X operations on the control qubit to turn them into CNOT gates.
[0042] Looking ahead, this construction can be used to build a multiplication circuit. Note that the controlled addition can be rewritten conditionally as follows:
[0043]
[0044] where c represents the control qubit (0 or 1), and x and y represent the n-bit input numbers to be added. Thus, the conditional adjoint addition of and the conventional addition of can be used to perform the controlled addition. By itself, this is not useful as it does not help reduce the cost. However, since the entire multiplication consists of n such controlled additions, all the conventional additions of can be collected and performed in one step by adding , which is equivalent to first adding y, shifting it n - 1 positions, and then subtracting
[0045] In summary, therefore, the entire multiplication can be performed using n - 1 conditional adjoint additions, 1 conventional addition of y shifted n - 1 positions, and 1 controlled addition (combining the first conditional adjoint addition with the final corrective subtraction of ). For larger n, this can save a factor of 1.5 to 2, depending on the (controlled) addition circuit used.
[0046] Other example embodiments are shown in Figure 5 and Figure 6 , which are flowcharts 500 and 600 respectively, showing methods for achieving the described qubit usage reduction using conjugate adjoint annotations. The specific operations and order of operations should not be construed as restrictive as they can be performed individually or in any combination, sub - combination, and / or in order with respect to each other. Additionally, the operations shown can be performed in conjunction with one or more other operations.
[0047] Figure 5 The flowchart 500 of Figure 5 shows a process using conjugate adjoint annotations that results in the transformation of clean qubits in a quantum circuit using idle qubits in an unknown state.
[0048] Figure 6Flowchart 600 shows the process of using adjoint annotations to replace one or more quantum if / else constructs with the quantum condition "either apply U, else apply the inverse of U", which is the same as the conditional adjoint since the adjoint of a unitary is its inverse. If a given if / else construct can be rewritten in this way, the additional information about U can be used to do so, which specifies how to perform the inverse of U via conjugation. That is, the additional information specifies V such that performing V, U, and inverse(V) is equivalent to performing only inverse(U).
[0049] If there are (quantum) controlled operations in the original code, these operations can sometimes be replaced with (quantum) if-then-else constructs. The examples above regarding phase estimation and multiplication illustrate this process. The quantum if-then-else construct can then be explained above. Once one or more rewrite opportunities have been processed, the program can be mapped to a target architecture for execution.
[0050] Figure 9 Is a flowchart 900 showing a method according to the techniques of the present disclosure. Specific operations and the order of operations should not be construed as restrictive since they can be performed individually or in any combination, sub-combination, and / or order with respect to each other. Additionally, the operations shown can be performed in conjunction with one or more other operations.
[0051] In some embodiments, the method is a computer-implemented method, including receiving a high-level description of a quantum program to be implemented in a quantum computing device; and compiling the high-level description of the quantum program into a low-level program executable by the quantum computing device.
[0052] In a particular embodiment, and at 910, one or more adjoint annotations in the high-level description are identified. At 912, a low-level program is generated such that the quantum computing device uses one or more idle qubits in response to the one or more adjoint annotations.
[0053] In some implementations, one or more idle qubits replace corresponding one or more qubits in a clean state, thereby reducing the total number of qubits required to implement a quantum program. In certain implementations, the method further includes implementing a low-level program in a quantum computing device. In some implementations, compilation includes matching code segments corresponding to conditional adjoint statements; in some examples, the matching uses information given in one or more conjugate adjoint annotations. In certain implementations, one or more idle qubits are in an unknown superposition state. In some implementations, compilation includes performing one or more replacements of one or more references to controlled operations in a high-level description of a quantum program with references to one or more conditional adjoint statements. In some examples, the execution of one or more replacements is conditioned on whether there are sufficient available qubits in the quantum computing device when the quantum computing device operates according to the low-level program. In certain examples, the low-level program implements a reversible multiplier in the quantum computing device using conditional adjoint addition instead of conventional controlled addition.
[0054] Figure 10 FIG. 1000 is a flowchart showing another method according to the techniques of the present disclosure. Particular operations and the order of operations should not be construed as limiting as they may be performed individually or in any combination, sub-combination, and / or order with respect to each other. Additionally, the operations shown may be performed in conjunction with one or more other operations.
[0055] In some embodiments, the method is a computer-implemented method that includes receiving a high-level description of a quantum program to be implemented in a quantum computing device; and compiling the high-level description of the quantum program into a low-level program executable by the quantum computing device.
[0056] As shown at 1010, an exemplary method includes converting statements in the high-level description into one or more conditional adjoint statements; and, at 1012, generating a low-level program such that the quantum computing device uses one or more idle qubits instead of one or more clean qubits in response to one or more conjugate adjoint annotations.
[0057] In some implementations, one or more idle qubits replace corresponding one or more qubits in a clean state, thereby reducing the total number of qubits required to implement a quantum program. In other examples, the method includes implementing a low-level program in a quantum computing device. For example, in some examples, compilation includes matching code fragments corresponding to conditional adjoint statements. The matching can use information given in one or more conjugate adjoint annotations. In some implementations, one or more idle qubits are in an unknown superposition state. In certain implementations, compilation includes performing one or more replacements of one or more references to controlled operations in a high-level description of a quantum program with references to one or more conditional adjoint statements. In other embodiments, the execution of one or more replacements is conditional on whether there are sufficient available qubits in the quantum computing device when the quantum computing device operates according to the low-level program.
[0058] IV. Example Computing Environments
[0059] Figure 1 A generalized example of a suitable classical computing environment 100 is shown in which aspects of the described embodiments may be implemented. Computing environment 100 is not intended to imply any limitation as to the scope of use or functionality of the techniques of the present disclosure, since the techniques and tools described herein may be implemented in a variety of general-purpose or special-purpose environments having computing hardware.
[0060] Refer to Figure 1 , computing environment 100 includes at least one processing device 110 and a memory 120. In Figure 1 this most basic configuration 130 is enclosed within the dashed lines. The processing device 110 (e.g., a CPU or a microprocessor) executes computer-executable instructions. In a multiprocessing system, multiple processing devices execute computer-executable instructions to increase processing power. The memory 120 can be volatile memory (e.g., registers, caches, RAM, DRAM, SRAM), non-volatile memory (e.g., ROM, EEPROM, flash memory), or some combination of the two. The memory 120 stores software 180 for implementing tools for performing any of the disclosed techniques for operating a quantum computer as described herein. The memory 120 may also store software 180 for synthesizing, generating, or compiling quantum circuits for performing any of the disclosed techniques.
[0061] The computing environment can have additional features. For example, computing environment 100 includes a storage device 140, one or more input devices 150, one or more output devices 160, and one or more communication connections 170. An interconnection mechanism (not shown) (such as a bus, a controller, or a network) interconnects the components of computing environment 100. Typically, operating system software (not shown) provides an operating environment for other software executing in computing environment 100 and coordinates the activities of the components of computing environment 100.
[0062] The storage device 140 can be removable or non-removable and includes one or more disks (e.g., hard disk drives), solid state drives (e.g., flash drives), magnetic tapes or cartridges, CD-ROMs, DVDs, or any other tangible non-transitory storage medium that can be used to store information and can be accessed within computing environment 100. The storage device 140 can also store instructions for software 180 for implementing any disclosed technology. The storage device 140 can also store instructions for software 180 for generating and / or synthesizing any described technology, system, or quantum circuit.
[0063] The input device 150 can be a touch input device, such as a keyboard, a touch screen, a mouse, a pen, a trackball, a voice input device, a scanning device, or another device that provides input to computing environment 100. The output device 160 can be a display device (e.g., a computer monitor, a laptop monitor, a smartphone monitor, a tablet monitor, a netbook monitor, or a touch screen), a printer, a speaker, or another device that provides output from computing environment 100.
[0064] The communication connection 170 is capable of communicating with another computing entity via a communication medium. The communication medium conveys information, such as computer-executable instructions or other data in a modulated data signal. A modulated data signal is a signal in which one or more characteristics are set or changed in order to encode information in the signal. By way of example, and not limitation, the communication medium includes wired or wireless technologies implemented with electricity, light, RF, infrared, acoustic, or other carriers.
[0065] As noted, the various methods and techniques for performing any disclosed technology, for controlling a quantum computing device to perform circuit designs or compilation / synthesis as disclosed herein, can be described in the general context of computer-readable instructions stored on one or more computer-readable media. A computer-readable medium is any available medium (e.g., a memory or a storage device) that can be within or accessed by a computing environment. The computer-readable medium includes tangible computer-readable memory or storage devices, such as memory 120 and / or storage device 140, and does not include a propagated carrier wave or signal itself (tangible computer-readable memory or storage devices do not include a propagated carrier wave or signal itself).
[0066] Various embodiments of the methods disclosed herein may also be described in the general context of computer-executable instructions, such as instructions included in program modules, being executed by a processor in a computing environment. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. In various embodiments, the functionality of program modules may be combined or split as needed among program modules. The computer-executable instructions of program modules may be executed in a local or distributed computing environment.
[0067] Figure 2 An example of a possible network topology 200 (e.g., a client-server network) for implementing a system for the techniques according to the present disclosure is depicted. For example, the networked computing device 220 may be a computer running a browser or other software connected to the network 212. The computing device 220 may have a computer architecture as Figure 1 shown and discussed above. The computing device 220 is not limited to a traditional personal computer, but may include other computing hardware configured to connect to and communicate with the network 212 (e.g., a smartphone, a laptop computer, a tablet computer, or other mobile computing device, a server, a network device, a dedicated device, etc.). Additionally, the computing device 220 may include an FPGA or other programmable logic device. In the illustrated embodiment, the computing device 220 is configured to communicate with a computing device 230 (e.g., a remote server, such as a server in a cloud computing environment) via the network 212. In the illustrated embodiment, the computing device 220 is configured to transmit input data to the computing device 230, and the computing device 230 is configured to implement techniques for controlling a quantum computing device to perform any disclosed embodiment and / or circuit generation / compilation / synthesis techniques for generating a quantum circuit for performing any technique disclosed herein. The computing device 230 may output the results to the computing device 220. Any data received from the computing device 230 may be stored or displayed on the computing device 220 (e.g., as data displayed in a graphical user interface or web page at the computing device 220). In the illustrated embodiment, the illustrated network 212 may be implemented as a local area network (“LAN”) using a wired network (e.g., Ethernet IEEE standard 802.3 or other suitable standard) or a wireless network (e.g., one of IEEE standards 802.11a, 802.11b, 802.11g, or 802.11n or other suitable standard). Alternatively, at least a portion of the network 212 may be the Internet or a similar public network and operate using a suitable protocol (e.g., the HTTP protocol).
[0068] Figure 3Another example of a possible network topology 300 (e.g., a distributed computing environment) for implementing a system for the techniques according to the present disclosure is depicted. For example, the networked computing device 320 can be a computer running a browser or other software connected to the network 312. The computing device 320 can have a computer architecture as shown and discussed above. In the illustrated embodiment, the computing device 320 is configured to communicate via the network 312 with a plurality of computing devices 330, 331, 332 (e.g., remote servers or other distributed computing devices, such as one or more servers in a cloud computing environment). In the illustrated embodiment, each of the computing devices 330, 331, 332 in the computing environment 300 is used to perform at least a portion of the techniques of the present disclosure and / or to control a quantum computing device to perform at least a portion of the techniques of any disclosed embodiment and / or to generate at least a portion of the circuit generation / compilation / synthesis techniques for generating a quantum circuit for performing any of the techniques disclosed herein. In other words, the computing devices 330, 331, 332 form a distributed computing environment in which aspects of the techniques for performing any of the techniques disclosed herein and / or the quantum circuit generation / compilation / synthesis process are shared among the plurality of computing devices. The computing device 320 is configured to transmit input data to the computing devices 330, 331, 332, and the computing devices 330, 331, 332 are configured to distributively implement processes, including the execution of any disclosed method or the creation of any disclosed circuit, and provide the results to the computing device 320. Any data received from the computing devices 330, 331, 332 can be stored or displayed on the computing device 320 (e.g., as data displayed in a graphical user interface or a web page at the computing device 320). The illustrated network 312 can be any of the networks discussed above with respect to Figure 1 The computing device 320 can have a computer architecture as shown and discussed above. In the illustrated embodiment, the computing device 320 is configured to communicate via the network 312 with a plurality of computing devices 330, 331, 332 (e.g., remote servers or other distributed computing devices, such as one or more servers in a cloud computing environment). In the illustrated embodiment, each of the computing devices 330, 331, 332 in the computing environment 300 is used to perform at least a portion of the techniques of the present disclosure and / or to control a quantum computing device to perform at least a portion of the techniques of any disclosed embodiment and / or to generate at least a portion of the circuit generation / compilation / synthesis techniques for generating a quantum circuit for performing any of the techniques disclosed herein. In other words, the computing devices 330, 331, 332 form a distributed computing environment in which aspects of the techniques for performing any of the techniques disclosed herein and / or the quantum circuit generation / compilation / synthesis process are shared among the plurality of computing devices. The computing device 320 is configured to transmit input data to the computing devices 330, 331, 332, and the computing devices 330, 331, 332 are configured to distributively implement processes, including the execution of any disclosed method or the creation of any disclosed circuit, and provide the results to the computing device 320. Any data received from the computing devices 330, 331, 332 can be stored or displayed on the computing device 320 (e.g., as data displayed in a graphical user interface or a web page at the computing device 320). The illustrated network 312 can be any of the networks discussed above with respect to Figure 2 discussed above.
[0069] Reference Figure 4 , an exemplary system for implementing the techniques of the present disclosure includes a computing environment 400. In the computing environment 400, a compiled quantum computer circuit description (including a quantum circuit for performing any of the techniques disclosed herein) can be used to program (or configure) one or more quantum processing units such that the quantum processing units implement the circuit described by the quantum computer circuit description.
[0070] The environment 400 includes one or more quantum processing units and one or more readout devices 408. The quantum processing unit executes a quantum circuit pre-compiled and described by a quantum computer circuit description. The quantum processing unit can be, but is not limited to, one or more of the following: (a) a superconducting quantum computer; (b) an ion trap quantum computer; (c) a fault-tolerant architecture for quantum computing; and / or (d) a topological quantum architecture (e.g., a topological quantum computing device using Majorana zero modes). Under the control of the quantum processor controller 420, the pre-compiled quantum circuit (including any disclosed circuit) can be sent to (or otherwise applied to) the quantum processing unit via the control line 406. The quantum processor controller (QP controller) 420 can operate with a classical processor 410 (e.g., having an architecture as described above with respect to Figure 1 described) to implement a desired quantum computing process. In the example shown, the QP controller 420 further implements the desired quantum computing process via one or more QP sub-controllers 404, which are particularly adapted to control the corresponding one or more in the quantum processor 402. For example, in one example, the quantum controller 420 facilitates the implementation of the compiled quantum circuit by sending instructions to one or more memories (e.g., cryogenic memories), which then pass the instructions to one or more cryogenic control units (e.g., QP sub-controllers 404), e.g., the cryogenic control unit transmits a pulse sequence representing a gate to the quantum processing unit for implementation. In other examples, the QP controller 420 and the QP sub-controllers 404 operate to provide an appropriate magnetic field, encoding operation, or other such control signals to the quantum processor to implement the operations described by the compiled quantum computer circuit. The quantum controller can further interact with the readout device 408 to assist in controlling and implementing the desired quantum computing process (e.g., by reading or measuring data results from the quantum processing unit once available, etc.)
[0071] Reference Figure 4 , compilation is the process of converting a high-level description of a quantum algorithm into a quantum computer circuit description including a sequence of quantum operations or gates, which can include circuits disclosed herein (e.g., circuits configured to perform one or more of the processes disclosed herein). Compilation can be performed by a compiler 422 using the classical processor 410 of the environment 400 (e.g., as Figure 4 shown), and the compiler 422 loads the high-level description from a memory or storage device 412 and stores the resulting quantum computer circuit description in the memory or storage device 412.
[0072] In other embodiments, compilation and / or verification can be performed by a remote computer 460 (e.g., having an architecture as described above with respect to Figure 1executed remotely by a computer of the computing environment, the remote computer 460 stores the resulting quantum computer circuit description in one or more memories or storage devices 462 and transmits the quantum computer circuit description to the computing environment 400 for implementation in the quantum processing unit. Further, the remote computer 400 may store the high-level description in a memory or memory device 462 and transmit the high-level description to the computing environment 400 for compilation and use with the quantum processor. In any of these scenarios, the results of the computations performed by the quantum processor may be transmitted to the remote computer after and / or during the computation process. Further, the remote computer may communicate with the QP controller 420 such that the quantum computing process (including any compilation, verification, and QP control processes) may be remotely controlled by the remote computer 460. Generally, the remote computer 460 communicates with the QP controller 420, the compiler / synthesizer 422, and / or the verification tool 423 via the communication connection 450.
[0073] In a particular embodiment, the environment 400 may be a cloud computing environment that provides the quantum processing resources of the environment 400 to one or more remote computers (such as the remote computer 460) via a suitable network, which may include the Internet.
[0074] V. Conclusion
[0075] The methods, apparatuses, and systems of the present disclosure should not be construed as being limited in any way. Instead, the present disclosure is directed to all novel and non-obvious features and aspects (individually as well as in various combinations and sub-combinations with each other) of the various disclosed embodiments. The methods, apparatuses, and systems of the present disclosure are not limited to any particular aspect or feature or combination thereof, and the embodiments of the present disclosure do not require the presence of any one or more particular advantages or the solving of problems.
[0076] Given the many possible embodiments in which the principles of the techniques of the present disclosure may be applied, it should be recognized that the illustrated embodiments are examples of the techniques of the present disclosure and should not be regarded as limiting the scope of the techniques of the present disclosure.
Claims
1. A computer-implemented method, comprising: Receiving a high-level description of a quantum program to be implemented in a quantum computing device; And Compiling the high-level description of the quantum program into a low-level program executable by the quantum computing device, Wherein the compilation comprises: Identifying one or more adjoint annotations in the high-level description, the adjoint annotations indicating that the annotated operation is inverse-operated by conjugating with another quantum operation; And Generating the low-level program such that the quantum computing device uses one or more idle qubits in response to the one or more adjoint annotations.
2. The method according to claim 1, wherein the one or more idle qubits replace corresponding one or more qubits in a clean state, thereby reducing the total number of qubits required to implement the quantum program.
3. The method according to claim 1, further comprising implementing the low-level program in the quantum computing device.
4. The method according to claim 1, wherein the compilation comprises matching code segments corresponding to conditional adjoint statements.
5. The method according to claim 4, wherein the matching uses the information given in the one or more adjoint annotations.
6. The method according to claim 1, wherein the one or more idle qubits are in an unknown superposition state.
7. The method according to claim 1, wherein the compilation comprises: Performing one or more replacements of one or more references to controlled operations in the high-level description of the quantum program with references to one or more conditional adjoint statements.
8. The method according to claim 7, wherein the condition for performing the one or more replacements is whether there are sufficient available qubits in the quantum computing device when the quantum computing device operates according to the low-level program.
9. The method according to claim 1, wherein the low-level program uses conditional adjoint addition instead of conventional controlled addition to implement a reversible multiplier in the quantum computing device.
10. A computer-implemented method, comprising: Receiving a high-level description of a quantum program to be implemented in a quantum computing device; And Compiling the high-level description of the quantum program into a low-level program executable by the quantum computing device, Wherein the compilation comprises: Converting the statements in the high-level description into one or more conditional adjoint statements; And Generating the low-level program such that the quantum computing device uses one or more idle qubits instead of one or more clean qubits in response to one or more adjoint annotations, the adjoint annotations indicating that the annotated operation is inverse-operated by conjugating with another quantum operation.
11. The method according to claim 10, wherein the one or more idle qubits replace corresponding one or more qubits in a clean state, thereby reducing the total number of qubits required to implement the quantum program.
12. The method according to claim 10, further comprising implementing the low-level program in the quantum computing device.
13. The method according to claim 10, wherein the compilation comprises matching code segments corresponding to conditional adjoint statements.
14. The method according to claim 13, wherein the matching uses information given in the one or more adjoint annotations.
15. The method according to claim 10, wherein the one or more idle qubits are in an unknown superposition state.
16. The method according to claim 10, wherein the compilation includes performing one or more replacements of one or more references to controlled operations in the high-level description of the quantum program with references to the one or more conditional adjoint statements.
17. The method according to claim 16, wherein the condition for the execution of the one or more replacements is whether there are sufficient available qubits in the quantum computing device when the quantum computing device operates according to the low-level program.
18. A system, comprising: a quantum computing device; and a classical computing device, in communication with the quantum computing device, the classical computing device being programmed to execute a method, the method including: compiling a high-level description of a quantum program into a low-level program executable by the quantum computing device, wherein the compilation includes: identifying one or more adjoint annotations in the high-level description, the adjoint annotations indicating that the annotated operation is reversed by conjugating with another quantum operation; and generating the low-level program such that the quantum computing device uses one or more idle qubits in response to the one or more adjoint annotations.
19. The system according to claim 18, wherein the one or more idle qubits replace corresponding ones of the qubits in a clean state, thereby reducing the total number of qubits required to implement the quantum program.
20. The system according to claim 18, wherein the compilation includes matching code segments corresponding to conditional adjoint statements.
Citation Information
Patent Citations
Training a quantum optimizer
CN109155007A
Quantum Compiler
US10223084B1