Preempting quantum programs in quantum computing devices

By preempting quantum programs with a quantum controller, high-priority and short-running jobs can execute earlier, addressing the inefficiencies in quantum computing due to lack of preemption, thereby enhancing throughput and resource utilization.

JP2025525749APending Publication Date: 2025-08-07INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025503122
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2022-08-03
Filing Date
2023-07-25
Publication Date
2025-08-07

AI Technical Summary

Technical Problem

Quantum computers lack the ability to implement preemption, leading to high-priority and short-running jobs being unexecuted while lower-priority and long-running jobs are processing, resulting in reduced throughput and inefficient resource use.

Method used

Implementing a quantum controller to preempt the execution of a first quantum circuit for a first job and execute a second, higher-priority job, completing the first job upon completion or preemption of the second job.

Benefits of technology

Allows high-priority and short-running quantum jobs to execute and finish sooner relative to lower-priority and long-running jobs, increasing throughput and efficient use of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025525749000001_ABST
    Figure 2025525749000001_ABST
Patent Text Reader

Abstract

A method and quantum computing device for preempting a quantum program. A first quantum circuit is executed by a quantum processor for a number of shots to process a first job of a quantum program, where the number of shots defines the number of times the quantum circuit should be repeatedly executed. Then, execution of the first quantum circuit for processing the first job is preempted, such as to allow a higher priority and / or shorter running job to be processed. Once execution of the first quantum circuit is preempted, the quantum processor executes a second quantum circuit for processing a second job (e.g., a higher priority and / or shorter running job to be processed). Once execution of the second quantum circuit for processing the second job is completed or preempted, the quantum processor completes execution of the first quantum circuit for processing the first job.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates generally to preemption, and more particularly to preempting quantum programs in quantum computing devices. [Background technology]

[0002] In computing, preemption is the act of temporarily suspending a running task with the intention of resuming it at a later time. This suspension may be performed by a component called a "scheduler" without any assistance or cooperation from the task. This preemptive scheduler typically runs within the most privileged protection ring, which means that suspending and resuming are considered highly secure actions. Such a change in the processor's currently running task is known as a context switch.

[0003] One type of computing technology currently being developed is known as "quantum computing." Quantum computing is a type of computing that exploits collective properties of quantum states, such as superposition, interference, and entanglement, to perform calculations. Devices that perform quantum computing are known as quantum computers.

[0004] Currently, such quantum computers do not have the ability to implement preemption as classical computers / classical schedulers do. A "classical computer" is a computing device in which information is stored in bits that are logically represented by either 0 (off) or 1 (on). A "classical scheduler" is a scheduler for a classical computing device that controls program execution of jobs. A "job" is a unit of work consisting of one or more tasks that, when executed, signifies the execution of the job.

[0005] Such classical schedulers are utilized by classical computers to execute jobs more efficiently, thereby increasing throughput (the amount of work or information flowing through a system) and improving efficiency in using computing resources. For example, a classical scheduler may determine that throughput and efficiency can be improved by executing a high-priority job before a low-priority job. In such an example, the classical scheduler may preempt a currently executing low-priority job, thereby allowing the high-priority job to execute before the low-priority job completes. In another example, a classical scheduler may determine that throughput and efficiency can be improved by executing a short-running job (a job with a relatively short time to execute) before a long-running job (a job with a relatively long time to execute). In such an example, the classical scheduler may preempt a currently executing long-running job, thereby allowing the short-running job to execute before the long-running job completes.

[0006] As a result of the inability to utilize preemption as implemented by classical computers / classical schedulers, high priority quantum jobs and / or short-running quantum jobs may remain unexecuted for the duration that lower priority and / or long-running quantum jobs are executing, thereby resulting in reduced throughput and inefficient use of computing resources by the quantum computer. For example, high priority quantum jobs, such as calibrations and periodic updates, occur periodically and need to be executed without delay. However, the inability to interrupt the processing of jobs, such as currently executing long-running, low priority quantum jobs, means that such high priority quantum jobs must wait to execute until the long-running, low priority quantum jobs have completed execution, resulting in reduced throughput and inefficient use of computing resources by the quantum computer. Summary of the Invention

[0007] In one embodiment of the present disclosure, a method for preempting a quantum program comprises executing a first quantum circuit for processing a first job of a quantum program for a number of shots, where the number of shots defines a number of times a quantum circuit should be repeatedly executed. The method further comprises preempting the execution of the first quantum circuit for processing the first job. The method additionally comprises executing a second quantum circuit for processing a second job in response to the preemption of the execution of the first quantum circuit. Furthermore, the method comprises completing the execution of the first quantum circuit for processing the first job in response to completion of the execution of the second quantum circuit for processing the second job or when the execution of the second quantum circuit for processing the second job is preempted.

[0008] In this way, the quantum computer may preempt quantum programs, which may allow higher priority and / or short running quantum jobs to run and finish sooner relative to lower priority and / or long running quantum jobs, even if the lower priority and / or long running quantum jobs were running previously, which may result in increased throughput.

[0009] In another embodiment of the present disclosure, a quantum computing device comprises a quantum processor configured to perform a computational task, the quantum processor having one or more quantum circuits, and further configured to execute a first quantum circuit for processing a first job of a quantum program for a number of shots, where the number of shots defines the number of times the quantum circuit should be repeatedly executed. The quantum computing device further comprises a quantum controller configured to preempt execution of the first quantum circuit for processing the first job, wherein the quantum processor executes a second quantum circuit for processing a second job in response to the preemption of execution of the first quantum circuit, and the quantum processor completes execution of the first quantum circuit for processing the first job in response to completion of the execution of the second quantum circuit for processing the second job or when the execution of the second quantum circuit for processing the second job is preempted.

[0010] In this way, the quantum computer may preempt quantum programs, which may allow higher priority and / or short running quantum jobs to run and finish sooner relative to lower priority and / or long running quantum jobs, even if the lower priority and / or long running quantum jobs were running previously, which may result in increased throughput.

[0011] The foregoing has outlined rather generally the features and technical advantages of one or more embodiments of the present disclosure in order that the detailed description of the disclosure that follows may be better understood. Additional features and advantages of the present disclosure will be described hereinafter and may form the subject of the claims of the present disclosure. [Brief explanation of the drawings]

[0012] A better understanding of the present disclosure can be obtained from the following detailed description when considered in conjunction with the following drawings.

[0013] [Figure 1] 1 illustrates a communication system embodying the principles of the present disclosure, according to one embodiment of the present disclosure.

[0014] [Figure 2] 1 is a flowchart of a method for preempting a quantum program between multiple shots, according to one embodiment of the present disclosure.

[0015] [Figure 3] 1 illustrates preempting a quantum program between multiple shots, according to one embodiment of the present disclosure.

[0016] [Figure 4] 1 is a flowchart of a method for preempting a quantum program within the same shot, according to one embodiment of the present disclosure.

[0017] [Figure 5] 1 illustrates preempting a quantum program within the same shot, according to one embodiment of the present disclosure.

[0018] [Figure 6] 1 is a flowchart of a method for preempting a quantum program at a point where an operation is performed on a quantum bit that carries classical information, according to one embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION

[0019] As mentioned in the Background section, quantum computers currently do not have the ability to implement preemption as classical computers / classical schedulers do. A "classical computer" is a computing device in which information is stored as bits logically represented by either 0 (off) or 1 (on). A "classical scheduler" is a scheduler for a classical computing device that controls program execution of jobs. A "job" is a unit of work consisting of one or more tasks that, when executed, signifies the execution of the job.

[0020] Such classical schedulers are utilized by classical computers to execute jobs more efficiently, thereby increasing throughput (the amount of work or information flowing through a system) and improving efficiency in using computing resources. For example, a classical scheduler may determine that throughput and efficiency can be improved by executing a high-priority job before a low-priority job. In such an example, the classical scheduler may preempt a currently executing low-priority job, thereby allowing the high-priority job to execute before the low-priority job completes. In another example, a classical scheduler may determine that throughput and efficiency can be improved by executing a short-running job (a job with a relatively short time to execute) before a long-running job (a job with a relatively long time to execute). In such an example, the classical scheduler may preempt a currently executing long-running job, thereby allowing the short-running job to execute before the long-running job completes.

[0021] As a result of the inability to utilize preemption as implemented by classical computers / classical schedulers, high priority quantum jobs and / or short-running quantum jobs may remain unexecuted for the duration that lower priority and / or long-running quantum jobs are executing, thereby resulting in reduced throughput and inefficient use of computing resources by the quantum computer. For example, high priority quantum jobs, such as calibrations and periodic updates, occur periodically and need to be executed without delay. However, the inability to interrupt the processing of jobs, such as currently executing long-running, low priority quantum jobs, means that such high priority quantum jobs must wait to execute until the long-running, low priority quantum jobs have completed execution, resulting in reduced throughput and inefficient use of computing resources by the quantum computer.

[0022] Embodiments of the present disclosure provide a means for allowing a quantum computer to preempt quantum programs, which may allow higher priority and / or short-running quantum jobs to run and finish sooner relative to lower priority and / or long-running quantum jobs, even if the lower priority and / or long-running quantum jobs were previously running, which may result in increased throughput.

[0023] In some embodiments of the present disclosure, the present disclosure comprises a method and a quantum computing device for preempting a quantum program. In one embodiment of the present disclosure, a first quantum circuit is executed by a quantum processor for a number of shots to process a first job of the quantum program, where the number of shots defines the number of times the quantum circuit should be repeatedly executed to obtain a better readout of the state of the qubit. As used herein, a "quantum program" refers to a sequence of instructions executable on a quantum computer. In one embodiment, the quantum program defines a quantum circuit and a number of shots to be executed by the quantum circuit. In one embodiment, the quantum program is completed when the quantum circuit is executed within the defined number of shots. Then, execution of the first quantum circuit for processing the first job is preempted, such as to allow a higher priority and / or shorter running job to be processed. Once execution of the first quantum circuit for processing the first job is preempted, the quantum processor executes a second quantum circuit for processing a second job (e.g., a higher priority and / or shorter running job to be processed). When the second quantum circuit for processing the second job completes execution or is preempted from execution, the quantum processor completes execution of the first quantum circuit for processing the first job. In this manner, the quantum computer can preempt quantum programs, which may allow higher priority and / or short-running quantum jobs to execute and finish earlier relative to lower priority and / or long-running quantum jobs, even if the lower priority and / or long-running quantum jobs were previously executing. This may result in increased throughput.

[0024] In the following description, numerous specific details are set forth to provide a thorough understanding of the present disclosure. However, it will be apparent to those skilled in the art that the present disclosure may be practiced without such specific details. In other instances, well-known circuits have been shown in block diagram form so as not to obscure the present disclosure with unnecessary detail. For the most part, details discussing timing considerations and the like have been omitted insofar as such detail is unnecessary to obtain a complete understanding of the present disclosure and is within the skill of those skilled in the relevant art.

[0025] Referring now in detail to the figures, Figure 1 illustrates one embodiment of the present disclosure of a communications system 100 for practicing the principles of the present disclosure. Communications system 100 comprises a quantum computer 101 configured to perform quantum computations, such as types of computations that exploit collective properties of quantum states, such as superposition, interference, and entanglement, and a classical computer 102 in which information is stored in bits logically represented by either 0 (off) or 1 (on). Examples of classical computers 102 include, but are not limited to, portable computing units, personal digital assistants (PDAs), laptop computers, mobile devices, tablet personal computers, smartphones, mobile phones, navigation devices, gaming units, desktop computer systems, workstations, and the like, configured with the capability to connect to a network 118 (discussed below).

[0026] In one embodiment, classical computer 102 is used to set the state of the qubits in quantum computer 101, which then begins the quantum processing.

[0027] In one embodiment, the hardware structure 103 of the quantum computer 101 includes a quantum data plane 104, a control and measurement plane 105, a control processor plane 106, a quantum controller 107, and a quantum processor 108.

[0028] Quantum data plane 104 contains physical qubits or quantum bits (the basic units of quantum information, where a qubit is a two-state (or two-level) quantum mechanical system) and the structure necessary to hold them in place. In one embodiment, quantum data plane 104 includes any support circuitry necessary to measure the state of the qubits and perform gate operations on the physical qubits for gate-based systems or control the Hamiltonian for analog computers. In one embodiment, control signals routed to selected qubits set the state of the Hamiltonian. For gate-based systems, some qubit operations require two qubits, so quantum data plane 104 provides a programmable "wiring" network that allows two or more qubits to interact.

[0029] Control and measurement plane 105 converts the digital signals of quantum controller 107, which indicate which quantum operations should be performed, into the analog control signals necessary to perform the operations on qubits in quantum data plane 104. In one embodiment, control and measurement plane 105 converts the analog outputs of measurements of qubits in quantum data plane 104 into classical binary data that quantum controller 107 can handle.

[0030] The Control Processor Plane 106 identifies and triggers sequences of quantum gate operations and measurements (which are subsequently executed by the Control and Measurement Plane 105 on the Quantum Data Plane 104). These sequences execute programs provided by the Quantum Processor 108 to implement quantum algorithms.

[0031] In one embodiment, the control processor plane 106 executes a quantum error correction algorithm (if the quantum computer 101 is error corrected).

[0032] In one embodiment, quantum controller 107 is configured to perform scheduling for quantum computer 101. That is, quantum controller 107 acts as a quantum program scheduler that can interrupt and preempt a running quantum circuit (discussed below) and select a different quantum circuit to be executed by quantum processor 108.

[0033] In one embodiment, quantum processor 108 uses qubits to perform computational tasks. In certain regimes where quantum mechanics operates, particles of matter can exist in multiple states, such as "on" states, "off" states, and both "on" and "off" states simultaneously. Quantum processor 108 leverages these quantum states of matter to output signals that can be used in data computing.

[0034] In one embodiment, quantum processor 108 executes algorithms that classical processors cannot execute efficiently. In one embodiment, quantum processor 108 contains its own data, boot files, operating system images, and applications. Alternatively, as discussed further below, memory 110 may provide data such as boot files, operating system images, and applications to quantum processor 108.

[0035] In one embodiment, the quantum processor 108 includes one or more quantum circuits 109. The quantum circuits 109 may be referred to collectively or individually as quantum circuits 109 or a single quantum circuit 109, respectively. As used herein, a "quantum circuit 109" refers to a model for quantum computing in which a computation is a sequence of quantum logic gates, measurements, initialization of qubits to known values, and possibly other actions. As used herein, a "quantum logic gate" is a reversible unitary transformation on at least one qubit. Quantum logic gates are reversible, in contrast to classical logic gates. An example of a quantum logic gate is RX (e, which corresponds to rotating the qubit state around the X axis by a given angle theta θ on the Bloch sphere). iθX ), RY (which corresponds to rotating the qubit state around the Y axis by a given angle theta θ on the Bloch sphere, e iθY ), RXX (performs an operation on the input qubits)

number

[0036] Furthermore, in one embodiment, the quantum circuit 109 corresponds to a command structure provided to the control processor plane 106 on how to operate the control and measurement plane 105 to execute algorithms on the quantum data plane 104 / quantum processor 108.

[0037] Additionally, as discussed above, quantum computer 101 includes quantum memory (also referred to herein simply as "memory") 110, which may provide data such as boot files, operating system images, and applications (e.g., application 111) to quantum processor 108. In one embodiment, memory 110 is a set of qubits that store quantum states for later retrieval. The states stored in quantum memory 110 may hold quantum superpositions.

[0038] In one embodiment, memory 110 includes application 111, which may be configured to implement one or more of the methods described herein according to one or more embodiments. For example, application 111 may implement a program for preempting a quantum program, as discussed further below in connection with Figures 2-6. Examples of memory 110 include optical quantum memory, solid-state quantum memory, gradient echo memory, electromagnetically induced transparency, etc.

[0039] Additionally, in one embodiment, memory 110 stores a "transpiler 112," which, as used herein, is configured to rewrite abstract quantum circuits 109 into functional equivalents that match the constraints and characteristics of particular target quantum devices. In one embodiment, transpiler 112 (e.g., qiskit.transpiler, where Qiskit is an open-source software development kit for working with quantum computers at the level of circuits, pulses, and algorithms) translates trained machine learning models into their primitives and maps them to physical qubits when executed on quantum hardware 103.

[0040] In one embodiment, the quantum machine learning model is based on variational quantum circuits 109. Such a model consists of data encoding, processing parameterized with trainable parameters, and measurement / post-processing.

[0041] In one embodiment, the number of qubits (the basic unit of quantum information, where a qubit is a two-state (or two-level) quantum mechanical system) is determined by the number of features in the data. This processing stage may involve multiple layers of parameterized gates. As a result, in one embodiment, the number of trainable parameters is (number of features) * (number of layers).

[0042] In one embodiment, memory 110 stores measurements 113 from previously executed shots of quantum circuit 109, as well as the quantum state 114 of quantum circuit 109, as discussed further below. Additionally, various quantum data structures 115 and quantum queues 116 are stored in memory 110, as discussed further below.

[0043] In one embodiment, the quantum controller 107 performs quantum program scheduling, which involves interrupting and preempting running quantum circuits 109. In one embodiment, preemption is determined by the quantum controller 107 based on identifying a scenario in which the quantum processor 108 is executing a quantum circuit 109 for processing a low-priority and / or long-running quantum job, preventing a high-priority and / or short-running quantum job from being processed. In one embodiment, a quantum program, which includes a sequence of instructions executable on the quantum computer 101, defines a job based on the number of instructions and, indirectly, the length of time for processing the job. For example, such a job may be a system-level job (e.g., calibration, periodic update). In one embodiment, the priority level of such a job may be defined in a quantum data structure 115 stored in the quantum memory 110. For example, a system-level quantum job may be defined as having a very high priority level. In one embodiment, such information is stored in the quantum data structure 115 by encoding such information in the qubits.

[0044] In one embodiment, before quantum processor 108 executes quantum circuit 109 to process a job of a quantum program, quantum controller 107 accesses quantum data structure 115 for the priority level of the job to be processed by quantum circuit 108. In one embodiment, the length of time to process the job is based on the number of instructions retrieved from the quantum program. In one embodiment, quantum data structure 115 stored in quantum memory 110 includes a list of lengths of time to process the job based on the number of instructions retrieved from the quantum program. In one embodiment, such information is encoded in qubits within quantum data structure 115. In one embodiment, quantum controller 107 accesses quantum data structure 115 for the length of time to process the job.

[0045] In one embodiment, quantum controller 107 stores jobs in quantum queue 116 in memory 110 before they are processed by quantum circuit 109. In one embodiment, such jobs are typically processed in FIFO (first-in first-out) order without preemption. Waiting time estimates for each of these jobs may be performed by quantum controller 107. In one embodiment, such waiting time estimates are provided through the IBM® Quantum Platform and via Qiskit®. In one embodiment, the calculated times are the result of a scheduling simulation that predicts one possible execution pattern given the current order of all waiting jobs for the system, such as via a fair-share algorithm, and the approximate execution time of each job. In one embodiment, if an accurate time estimate is infeasible, the maximum allowable execution time is used instead.

[0046] After determining the wait time and priority of such jobs, quantum controller 107 determines whether preemption of quantum programs is necessary to improve the throughput of quantum computer 101 and more efficiently use computing resources based on the priority level, processing time (length of time to process the job), and / or wait time estimates. Such information may be used by a scheduling algorithm (e.g., a time-optimal quantum scheduling algorithm, a priority scheduling algorithm) implemented by quantum controller 107 to determine whether preemption is necessary and, if so, when to preempt. The principles of the present disclosure are intended to include any scheduling means for determining whether and when to preempt quantum programs. Furthermore, the principles of the present disclosure are intended to include any scheduling means for determining which of various means for preemption to employ, such preemption means being discussed below.

[0047] In one embodiment, quantum controller 107 preempts the quantum program between multiple shots or within the same shot. As used herein, "quantum program" refers to a sequence of instructions executable on quantum computer 101. In one embodiment, the quantum program defines quantum circuit 109 and the number of shots to be executed by quantum circuit 109. In one embodiment, the quantum program is complete when quantum circuit 109 is executed within the defined number of shots. As used herein, "shot" refers to one complete execution of quantum circuit 109. The number of shots defines the number of times quantum circuit 109 should be repeatedly executed to obtain a readout of the state of each qubit to meet the threshold result accuracy of quantum circuit 109.

[0048] In one embodiment, the quantum controller 107 preempts the quantum program between shots by suspending the quantum circuit 109 following the completion of a shot. After the completion of a shot, a new quantum circuit 109 is loaded for execution by the quantum processor 108. Once the new quantum circuit 109 has completed execution by the quantum processor 108 or has been preempted by the quantum controller 107, the original quantum circuit 109 is loaded for the remaining shots. That is, once the new quantum circuit 109 has completed execution by the quantum processor 108 or has been preempted by the quantum controller 107, the quantum processor 108 will have completed execution of the original quantum circuit 109.

[0049] In one embodiment, after quantum controller 107 preempts the quantum program between shots, measurements 113 from previously executed shots of quantum circuit 109 are stored in quantum memory 110, such as by quantum controller 107 quantum teleporting measurements 113 (measurements from previously executed shots of quantum circuit 109) from quantum processor 108 to quantum memory 110.

[0050] In one embodiment, quantum program instructions are divided into "chunks," similar to time slices in the classical computing world, to speed up context switches. In one embodiment, each chunk resides at the end of an instruction where execution can be stopped via preemption without disrupting the program state. For example, a "chunk" may correspond to the end of an instruction corresponding to the end of a shot. In another example, a "chunk" may correspond to a suspension point, corresponding to a point at which an operation is performed on qubits that carry classical information, as discussed further below.

[0051] In one embodiment, quantum controller 107 preempts the quantum program in one shot by interrupting quantum circuit 109 in one shot (within one complete execution of quantum circuit 109). In such an embodiment, quantum controller 107 stores quantum state 114 of quantum circuit 109, such as by quantum teleporting quantum state 114 of quantum circuit 109 from quantum processor 108 to quantum memory 110. In one embodiment, quantum memory 110 is implemented with high-fidelity qubits, such as trapped ions, to help maintain the stability of the quantum state. In one embodiment, quantum state 114 is stored in unused qubits of quantum memory 110.

[0052] In one embodiment, when the quantum program is preempted within one shot, a new quantum circuit 109 is loaded for execution by the quantum processor 108. When the new quantum circuit 109 completes execution by the quantum processor 108 or is preempted by the quantum controller 107, the original quantum circuit 109 is loaded for execution by the quantum processor 108. That is, when the new quantum circuit 109 completes execution by the quantum processor 108 or is preempted by the quantum controller 107, the quantum processor 108 completes execution of the original quantum circuit 109. In one embodiment, the original quantum circuit 109 is loaded with the stored quantum state 114, such as by the quantum controller 107 quantum teleporting the quantum state 114 of the quantum circuit 109 from the quantum memory 110 to the quantum processor 108.

[0053] In one embodiment, quantum controller 107 identifies qubits that carry classical information. In one embodiment, qubits that carry classical information (i.e., discrete information such as only 0 or 1) are indicated in quantum data structure 115, which specifies which qubits carry classical information. Such information is stored in quantum data structure 115 by encoding the information within the qubits. In one embodiment, quantum controller 107 accesses quantum data structure 115 stored in quantum memory 110 and identifies which qubits carry classical information.

[0054] In one embodiment, information about qubits that carry classical information (i.e., discrete information such as only 0 or 1) is stored in a classical data structure, such as in memory 117 (discussed further below) of classical computer 102. In such an embodiment, the data is stored in classical bits; however, quantum controller 107 accesses such information in a quantum manner by reading out multiple superimposed bits.

[0055] In one embodiment, in response to quantum circuit 109 having performed an operation on qubits carrying classical information and preemption being deemed necessary by quantum controller 107, quantum controller 107 suspends execution of quantum circuit 109 at the point at which it performed the operation on the qubits carrying classical information, such as within one shot. A new quantum circuit 109 is then loaded for execution by quantum processor 108. Once the new quantum circuit 109 has completed execution by quantum processor 108 or has been preempted by quantum controller 107, the original quantum circuit 109 is loaded for execution by quantum processor 108. That is, once the new quantum circuit 109 has completed execution by quantum processor 108 or has been preempted by quantum controller 107, quantum processor 108 completes execution of the original quantum circuit 109, starting from the point of suspension.

[0056] In one embodiment, such preemption, which involves preempting the quantum program at the point where quantum circuit 109 performs an operation on qubits carrying classical information, may occur during reset or intermediate circuit measurement. In such an embodiment, no quantum teleportation needs to be performed, thereby providing faster context switches.

[0057] Additionally, as shown in FIG. 1, classical computer 102 used to set the states of qubits in quantum computer 101 may be connected to quantum computer 101 via network 118.

[0058] Network 118 may be, for example, a quantum network, a local area network, a wide area network, a wireless wide area network, a circuit-switched telephone network, a Global System for Mobile Communications (GSM) network, a Wireless Application Protocol (WAP) network, a WiFi network, an IEEE 802.11 standard network, a cellular network, various combinations thereof, etc. Other networks (descriptions of which are omitted herein for brevity) may also be used in conjunction with system 100 of FIG. 1 without departing from the scope of this disclosure.

[0059] 1, classical computer 102 also includes memory 117 (e.g., static random access memory, dynamic random access memory, read-only memory, flash memory, hard disk drive, floppy disk, optical disk, etc.) that stores application 119, which may be configured to implement one or more of the methods described herein according to one or more embodiments. For example, in one embodiment, application 119 may implement a program for preempting a quantum program, as discussed further below in connection with FIGS. 2-6.

[0060] System 100 is not limited in scope to any one particular network architecture and may include any number of quantum computers 101, classical computers 102, and networks 118.

[0061] In embodiments in which application 119 is configured to implement one or more of the methods described herein according to one or more embodiments, the following is applicable.

[0062] The present invention may be a system, method and / or computer program product at any possible level of technical detail integration. The computer program product may include a computer-readable storage medium (or media) having computer-readable program instructions for causing a processor to carry out aspects of the present invention.

[0063] A computer-readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge structures in grooves in which instructions are recorded, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium should not be construed as a transitory signal itself, such as an electric wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse passing through a fiber optic cable), or an electrical signal transmitted over a wire.

[0064] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to each computing / processing device or to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may comprise copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing / processing device receives the computer-readable program instructions from the network and transfers the computer-readable program instructions to a computer-readable storage medium within the respective computing / processing device for storage.

[0065] The computer-readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or either source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, or the like, and procedural programming languages such as the "C" programming language or similar. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be to an external computer (e.g., through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may execute computer readable program instructions to personalize the electronic circuitry by utilizing state information of the computer readable program instructions to perform aspects of the present invention.

[0066] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0067] These computer-readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine whereby the instructions, executed via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams. These computer-readable program instructions may also be stored on a computer-readable storage medium that may direct a computer, programmable data processing apparatus, and / or other device to function in a particular manner, such that the computer-readable storage medium on which the instructions are stored has an article of manufacture including instructions that implement aspects of the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0068] The computer-readable program instructions may also be loaded into a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be executed on the computer, other programmable apparatus, or other device to generate a computer-implemented process, whereby the instructions executing on the computer, other programmable apparatus, or other device implement the functions / acts specified in one or more blocks of the flowcharts and / or block diagrams.

[0069] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of instructions, including one or more executable instructions, that implements the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may actually be realized as a single step, executed concurrently, substantially concurrently, partially, or fully in a time-overlapping manner, or the blocks may possibly be executed in reverse order, depending on the functionality involved. It should also be noted that each block of the block diagrams and / or flowchart diagrams, and combinations of blocks in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or executes a combination of dedicated hardware and computer instructions.

[0070] As mentioned above, quantum computers currently do not have the ability to implement preemption as classical computers / classical schedulers do. A “classical computer” is a computing device in which information is stored as bits logically represented by either 0 (off) or 1 (on). A “classical scheduler” is a scheduler for a classical computing device that controls program execution of jobs. A “job” is a unit of work consisting of one or more tasks that, when executed, signifies the execution of the job. Such classical schedulers are utilized by classical computers to execute jobs more efficiently, thereby increasing throughput (the amount of work or information flowing through the system) and improving efficiency in using computing resources. For example, a classical scheduler may determine that throughput and efficiency can be improved by executing a high-priority job before a low-priority job. In such an example, the classical scheduler may preempt a currently executing low-priority job, thereby allowing the high-priority job to run before the low-priority job completes. In another example, a classical scheduler may determine that throughput and efficiency can be improved by executing short-running jobs (with a relatively short time to execute a job) before long-running jobs (with a relatively long time to execute a job). In such an example, the classical scheduler may preempt a currently executing long-running job, thereby allowing the short-running job to execute before the long-running job completes. As a result of not being able to utilize preemption as implemented by a classical computer / classical scheduler, high-priority quantum jobs and / or short-running quantum jobs may remain unexecuted for the duration that a lower-priority and / or long-running quantum job is executing, which may result in reduced throughput and inefficient use of computing resources by the quantum computer. For example, high-priority quantum jobs, such as calibration and periodic updates, occur periodically and need to be executed without delay.However, the inability to interrupt the processing of jobs, such as currently executing long-running, low-priority quantum jobs, means that such high-priority quantum jobs must wait to execute until the long-running, low-priority quantum jobs have completed execution, resulting in reduced throughput by the quantum computer and inefficient use of computing resources.

[0071] Embodiments of the present disclosure provide means for allowing a quantum computer to preempt a quantum program, which may allow a high priority or short running quantum job to execute and finish earlier relative to a lower priority and / or long running quantum job, even if the lower priority and / or long running quantum job was previously executing, thereby improving throughput, as discussed below in connection with FIGS. 2-6. FIG. 2 is a flowchart of a method for preempting a quantum program between multiple shots. FIG. 3 illustrates preempting a quantum program between multiple shots. FIG. 4 is a flowchart of a method for preempting a quantum program within the same shot. FIG. 5 illustrates preempting a quantum program within the same shot. FIG. 6 is a flowchart of a method for preempting a quantum program at a point where an operation is performed on qubits that carry classical information.

[0072] As mentioned above, FIG. 2 is a flowchart of a method 200 for preempting a quantum program between multiple shots, according to one embodiment of the present disclosure.

[0073] Referring to FIG. 2 in conjunction with FIG. 1, in step 201, quantum processor 108 executes quantum circuit 109 to process the job of a quantum program.

[0074] As discussed above, as used herein, a "quantum program" refers to a sequence of instructions executable on the quantum computer 101. In one embodiment, the quantum program 109 defines the quantum circuit 109 and the number of shots to be executed by the quantum circuit. In one embodiment, the quantum program is complete when the quantum circuit 109 executes within the defined number of shots. As used herein, a "shot" refers to one complete execution of the quantum circuit 109. The number of shots defines the number of times the quantum circuit 109 should be repeatedly executed to obtain a better readout of the state of the qubit. As used herein, a "job" refers to a unit of work consisting of one or more tasks that, when executed, constitutes the execution of the job. In one embodiment, a quantum program includes a sequence of instructions that provide a job to be processed by the quantum circuit 109.

[0075] In step 202, a decision is made by quantum controller 107 as to whether to preempt the execution of quantum circuit 109 between shots (i.e., suspend quantum processor 108 executing quantum circuit 109 to be resumed at a later time).

[0076] As discussed above, quantum controller 107 may utilize any scheduling means to determine which of various means for preemption to employ, such as preempting between multiple shots. For example, quantum controller 107 may utilize scheduling means to preempt the execution of quantum circuit 109 between multiple shots if quantum circuit 109 is processing a low priority job that is preventing a high priority job, such as a system-level job, from being processed, and quantum circuit 109 is implementing only a user-specified number of shots that is more than a single shot but less than a user-specified fraction of the total number of shots to be executed by quantum circuit 109.

[0077] If the quantum controller 107 determines not to preempt the execution of the quantum circuit 109 between multiple shots (i.e., suspend the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), the quantum processor 108 continues executing the quantum circuit 109 and processes the job of the quantum program in step 201.

[0078] However, if the quantum controller 107 determines to preempt the execution of the quantum circuit 109 between multiple shots (i.e., suspend the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), then in step 203 the quantum controller 107 preempts the execution of the quantum circuit 109 by suspending the quantum circuit 109 following the completion of one shot.

[0079] In step 204, quantum controller 107 stores measurements 113 from previously executed shots of quantum circuit 109 in quantum memory 110, such as by quantum controller 107 quantum teleporting measurements 113 (measurements from previously executed shots of quantum circuit 109) from quantum processor 108 to quantum memory 110.

[0080] In step 205, the quantum controller 107 loads a new quantum circuit 109 to be executed by the quantum processor 108, such as a new quantum circuit 109 for processing a higher priority and / or shorter running job than the job whose processing was preempted. Such a job may be from the same quantum program as in step 201 or a different quantum program.

[0081] In step 206, the quantum controller 107 loads the original quantum circuits 109 for the remaining shots, i.e., the quantum controller 107 loads the original quantum circuits 109 to be executed by the quantum processor 108 for the remaining shots.

[0082] In one embodiment, the original quantum circuit 109 is loaded when the execution of the new quantum circuit 109 is completed or when the execution of the new quantum circuit 109 is preempted.

[0083] In step 207, the quantum processor 108 completes the execution of the remaining shots of the original quantum circuit 109.

[0084] An example of preempting a quantum program between shots is discussed below in connection with FIG.

[0085] FIG. 3 illustrates preempting a quantum program between multiple shots according to one embodiment of the present disclosure.

[0086] Referring to Figure 3 in conjunction with Figures 1-2, after quantum processor 108 completes execution of one shot for quantum circuit 109 (identified in Figure 3 as "Circuit A" 301) at time 2, execution of circuit A 301 is preempted and measurements 113 from the previously executed shot of circuit A 301 are stored in memory 110, etc.

[0087] After preempting the execution of Circuit A, a new quantum circuit 109 (identified as "Circuit B" 302 in FIG. 3) is loaded to be executed by quantum processor 108 to process one or more jobs that have a higher priority and / or shorter running time than the job that was preempted at Time 2.

[0088] Once execution of circuit B302 is completed or execution of circuit B302 is preempted, such as at time 3, circuit A301 is loaded so that the remaining shots of circuit A301 are executed by quantum processor 108 at time 3. As shown in FIG. 3, completion of execution of circuit A301 occurs at time 5.

[0089] Alternatively, as discussed below in connection with FIG. 4, preemption can occur within one shot.

[0090] FIG. 4 is a flowchart of a method 400 for preempting a quantum program within the same shot, according to one embodiment of the present disclosure.

[0091] Referring to FIG. 4 in conjunction with FIG. 1, in step 401, quantum processor 108 executes quantum circuit 109 to process the job of the quantum program.

[0092] In step 402, a decision is made by quantum controller 107 as to whether to preempt the execution of quantum circuit 109 in one shot (i.e., interrupt quantum processor 108 executing quantum circuit 109 to be resumed at a later time).

[0093] As discussed above, quantum controller 107 may utilize any scheduling means to determine which of various means for preemption to employ, such as preempting within one shot. For example, if quantum circuit 109 is processing a low priority job that is preventing a high priority job, such as a system-level job, from being processed, and a single shot has not yet completed (i.e., quantum circuit 109 has never fully executed once), quantum controller 107 may utilize scheduling means to preempt the execution of quantum circuit 109 within one shot.

[0094] If the quantum controller 107 determines not to preempt the execution of the quantum circuit 109 in one shot (i.e., interrupt the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), the quantum processor 108 continues executing the quantum circuit 109 and processes the job of the quantum program in step 401.

[0095] However, if the quantum controller 107 determines to preempt the execution of the quantum circuit 109 within one shot (i.e., suspend the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), then in step 403 the quantum controller 107 preempts the execution of the quantum circuit 109 by suspending the quantum circuit 109 within one shot.

[0096] In step 404, quantum controller 107 stores quantum state 114 of quantum circuit 109, such as by quantum teleporting quantum state 114 of quantum circuit 109 from quantum processor 108 to quantum memory 110. In one embodiment, quantum state 114 is stored in unused qubits.

[0097] In step 405, the quantum controller 107 loads a new quantum circuit 109 to be executed by the quantum processor 108, such as a new quantum circuit 109 for processing a higher priority and / or shorter running job than the job whose processing was preempted. Such a job may be from the same quantum program as in step 401 or a different quantum program.

[0098] In step 406 , the quantum controller 107 loads the original quantum circuit 109 to be executed by the quantum processor 108 with the stored quantum state 114 .

[0099] In one embodiment, the quantum state 114 is loaded with the original quantum circuit 109, such as by the quantum controller 107 quantum teleporting the quantum state 114 from the quantum memory 110 to the quantum processor .

[0100] In one embodiment, the original quantum circuit 109 is loaded with the stored quantum state 114 once the execution of the new quantum circuit 109 is completed or once the execution of the new quantum circuit 109 is preempted.

[0101] In step 407 , the quantum processor 108 completes the execution of the original quantum circuit 109 starting from the stored quantum state 114 .

[0102] An example of preempting a quantum program in one shot is discussed below in connection with FIG.

[0103] FIG. 5 illustrates preempting a quantum program in one shot according to one embodiment of the present disclosure.

[0104] Referring to Figure 5 in conjunction with Figures 1 and 4, before quantum processor 108 completes one-shot execution for quantum circuit 109 (identified as "Circuit C" 501 in Figure 5) which occurs at time 1, at time 1 / 2, execution of circuit C 501 is preempted and the quantum state 114 of circuit C 501 is stored in memory 110 or the like.

[0105] After preempting the execution of circuit C 501, a new quantum circuit 109 (identified as "Circuit D" 502 in FIG. 5) is loaded to be executed by quantum processor 108 to process one or more jobs at time 1 / 2 that have a higher priority and / or shorter running time than the jobs that were preempted at time 1 / 2.

[0106] Once execution of circuit D502 is completed or execution of circuit D502 is preempted, such as shown at time 2, circuit C501 is loaded with the stored quantum state 114 so that circuit C501 is executed by quantum processor 108 starting from the stored quantum state 114 at time 2. As shown in Figure 5, completion of execution of circuit C501 occurs at time 4.

[0107] Alternatively, as discussed below in connection with FIG. 6, preemption can occur at the point where an operation is performed on a qubit that carries classical information.

[0108] FIG. 6 is a flowchart of a method 600 for preempting a quantum program at a point where an operation is performed on a qubit that carries classical information, according to one embodiment of the present disclosure.

[0109] Referring to FIG. 6 in conjunction with FIG. 1, in step 601, quantum controller 107 identifies qubits that carry classical information.

[0110] As discussed above, in one embodiment, qubits that carry classical information (i.e., discrete information such as only 0 or 1) are represented in quantum data structure 115, which specifies which qubits carry classical information. In one embodiment, such information is stored in quantum data structure 115 by encoding the information in the qubits. In one embodiment, quantum controller 107 accesses quantum data structure 115 stored in quantum memory 110 and identifies which qubits carry classical information.

[0111] In one embodiment, information about qubits that carry classical information (i.e., discrete information such as only 0 or 1) is stored in a classical data structure, such as in memory 117 of classical computer 102. In such an embodiment, the data is stored in classical bits; however, quantum controller 107 accesses such information in a quantum manner by reading multiple bits in superposition.

[0112] In step 602, the quantum processor 108 executes the quantum circuit 109 to process the job of the quantum program.

[0113] In step 603, a determination is made by quantum controller 107 as to whether quantum circuit 109 (the quantum circuit 109 that is processing the quantum program job in step 602) is performing an operation on a qubit that carries classical information.

[0114] As previously discussed, quantum controller 107 identifies qubits that carry classical information. If quantum circuit 109 is not currently performing an operation on such a qubit, then quantum controller 107 does not preempt the execution of quantum circuit 109 in step 604. As a result, quantum processor 108 continues executing quantum circuit 109 to process the job of the quantum program.

[0115] However, if the quantum circuit 109 is currently performing an operation on such a quantum bit that carries classical information, then in step 605 a determination is made by the quantum controller 107 as to whether to preempt the execution of the quantum circuit 109 (i.e., interrupt the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), such as at the point at which the operation is performed on the quantum bit that carries classical information.

[0116] As discussed above, quantum controller 107 may utilize any scheduling means to determine which of various means for preemption to employ, such as preempting the execution of quantum circuit 109 at a point where an operation would be performed on a qubit carrying classical information. For example, quantum controller 107 may utilize scheduling means to preempt the execution of quantum circuit 109 at a point where an operation would be performed on a qubit carrying classical information if quantum circuit 109 is processing a low priority job that is preventing a high priority job, such as a system-level job, from being processed and quantum circuit 109 is currently performing an operation on a qubit carrying classical information.

[0117] If the quantum controller 107 determines not to preempt the execution of the quantum circuit 109 (i.e., suspend the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), then in step 604 the quantum controller 107 does not preempt the execution of the quantum circuit 109. As a result, the quantum processor 108 continues executing the quantum circuit 109 to process the job of the quantum program.

[0118] However, if the quantum controller 107 determines to preempt the execution of the quantum circuit 109 (i.e., interrupt the quantum processor 108 executing the quantum circuit 109 to be resumed at a later time), then in step 606 the quantum controller 107 preempts the execution of the quantum circuit 109 at a point where an operation is performed on a quantum bit that carries classical information, such as within one shot.

[0119] In step 607, quantum circuit 107 loads a new quantum circuit 109 to be executed by quantum processor 108, such as a new quantum circuit 109 for processing a higher priority and / or shorter running job than the job whose processing was preempted. Such a job may be from the same quantum program as in step 602 or a different quantum program.

[0120] In step 608 , the quantum controller 107 loads the original quantum circuit 109 to be executed by the quantum processor 108 .

[0121] In one embodiment, the original quantum circuit 109 is loaded when the execution of the new quantum circuit 109 is completed or when the execution of the new quantum circuit 109 is preempted.

[0122] In step 609, the quantum processor 108 completes the execution of the original quantum circuit 109, starting from the point of interruption.

[0123] In one embodiment, such preemption, which involves preempting the quantum program at the point where quantum circuit 109 performs an operation on qubits carrying classical information, may occur during reset or intermediate circuit measurement. In such an embodiment, no quantum teleportation needs to be performed, thereby providing faster context switches.

[0124] As a result of the above, the principles of the present disclosure provide a means for allowing a quantum computer to preempt quantum programs, which may allow higher priority and / or short running quantum jobs to run and finish earlier relative to lower priority and / or long running quantum jobs, even if the lower priority and / or long running quantum jobs were running previously, which may result in increased throughput.

[0125] Furthermore, the principles of the present disclosure advance any technology or field involving quantum computers.

[0126] As discussed above, quantum computers currently do not have the ability to implement preemption as classical computers / classical schedulers do. A “classical computer” is a computing device in which information is stored as bits logically represented by either 0 (off) or 1 (on). A “classical scheduler” is a scheduler for a classical computing device that controls program execution of jobs. A “job” is a unit of work consisting of one or more tasks that, when executed, signifies the execution of the job. Such classical schedulers are utilized by classical computers to execute jobs more efficiently, thereby improving throughput (the amount of work or information flowing through the system) and increasing efficiency in using computing resources. For example, a classical scheduler may determine that throughput and efficiency can be improved by executing a high-priority job before a low-priority job. In such an example, the classical scheduler may preempt a currently executing low-priority job, thereby allowing the high-priority job to run before the low-priority job is completed. In another example, a classical scheduler may determine that throughput and efficiency can be improved by executing short-running jobs (with a relatively short time to execute a job) before long-running jobs (with a relatively long time to execute a job). In such an example, the classical scheduler may preempt a currently executing long-running job, thereby allowing the short-running job to execute before the long-running job completes. As a result of not being able to utilize preemption as implemented by a classical computer / classical scheduler, high-priority quantum jobs and / or short-running quantum jobs may remain unexecuted for the duration that a lower-priority and / or long-running quantum job is executing, which may result in reduced throughput and inefficient use of computing resources by the quantum computer. For example, high-priority quantum jobs, such as calibration and periodic updates, occur periodically and need to be executed without delay.However, the inability to interrupt the processing of jobs, such as currently executing long-running, low-priority quantum jobs, means that such high-priority quantum jobs must wait to execute until the long-running, low-priority quantum jobs have completed execution, resulting in reduced throughput by the quantum computer and inefficient use of computing resources.

[0127] Embodiments of the present disclosure improve upon such techniques by executing a first quantum circuit by a quantum processor to process a first job of a quantum program for a number of shots, where the number of shots defines the number of times the quantum circuit should be repeatedly executed to obtain a better readout of the state of the qubits. As used herein, a "quantum program" refers to a sequence of instructions executable on a quantum computer. In one embodiment, the quantum program defines a quantum circuit and the number of shots to be executed by the quantum circuit. In one embodiment, the quantum program is completed when the quantum circuit is executed within the defined number of shots. Then, execution of the first quantum circuit to process the first job is preempted, such as to allow a higher priority and / or shorter running job to be processed. Once execution of the first quantum circuit to process the first job is preempted, the quantum processor executes a second quantum circuit to process a second job (e.g., a higher priority and / or shorter running job to be processed). When the execution of the second quantum circuit for processing the second job is completed, or when the execution of the second quantum circuit for processing the second job is preempted, the quantum processor completes execution of the first quantum circuit for processing the first job. In this way, the quantum computer can preempt quantum programs, which may allow high-priority and / or short-running quantum jobs to execute and finish earlier relative to lower-priority and / or long-running quantum jobs, even if the lower-priority and / or long-running quantum jobs were previously executing. This may result in increased throughput. This further provides an improvement in the field of technology involving quantum computers.

[0128] The technical solutions provided by the present disclosure are ones that cannot be implemented by the human mind or by a human using pen and paper, i.e., the technical solutions provided by the present disclosure are ones that cannot be realized by the human mind or by a human using pen and paper in any reasonable amount of time and with any reasonable expectation of accuracy without the use of a computer.

[0129] In one embodiment of the present disclosure, a method for preempting a quantum program comprises executing a first quantum circuit for processing a first job of a quantum program for a number of shots, where the number of shots defines a number of times a quantum circuit should be repeatedly executed. The method further comprises preempting the execution of the first quantum circuit for processing the first job. The method additionally comprises executing a second quantum circuit for processing a second job in response to the preemption of the execution of the first quantum circuit. Furthermore, the method comprises completing the execution of the first quantum circuit for processing the first job in response to completion of the execution of the second quantum circuit for processing the second job or when the execution of the second quantum circuit for processing the second job is preempted.

[0130] Additionally, in one embodiment of the present disclosure, the method further comprises preempting execution of a first quantum circuit for processing a first job between shots, and additionally comprises storing measurements from previously executed shots of the first quantum circuit.

[0131] Furthermore, in one embodiment of the present disclosure, the method additionally comprises loading the first quantum circuit to be executed for the remaining shots.

[0132] Additionally, in one embodiment of the present disclosure, the method further comprises completing execution of remaining shots of the first quantum circuit once the first quantum circuit is loaded.

[0133] Furthermore, in one embodiment of the present disclosure, the method additionally includes a step of preempting execution of the first quantum circuit for processing the first job within one shot, and a step of storing the quantum state of the first quantum circuit in a quantum memory.

[0134] Additionally, in one embodiment of the present disclosure, the method further comprises preempting execution of a first quantum circuit for processing a first job within one shot, and additionally comprising teleporting the quantum state of the first quantum circuit from the quantum processor to a quantum memory as part of the preemption.

[0135] Furthermore, in one embodiment of the present disclosure, the method additionally comprises teleporting the quantum state of the first quantum circuit from the quantum memory to the quantum processor as part of completing execution of the first quantum circuit to process the first job.

[0136] Additionally, in one embodiment of the present disclosure, the method further comprises preempting within one shot an execution of a first quantum circuit for processing a first job. The method additionally comprises identifying qubits that carry classical information. The method further comprises preempting the execution of the first quantum circuit at a point where an operation is performed on the qubits that carry classical information.

[0137] Furthermore, in one embodiment of the present disclosure, the method additionally comprises completing execution of a first quantum circuit to process a first job, starting from a point where an operation is performed on a quantum bit that carries classical information.

[0138] Additionally, in one embodiment of the present disclosure, the method further comprises causing preemption to be performed by a controller of the quantum computer.

[0139] Furthermore, in one embodiment, a quantum computing device comprises a quantum processor configured to perform a computational task, the quantum processor having one or more quantum circuits. The quantum processor is further configured to execute a first quantum circuit for processing a first job of a quantum program for a number of shots, where the number of shots defines a number of times a quantum circuit should be repeatedly executed. The quantum computing device further comprises a quantum controller configured to preempt execution of the first quantum circuit for processing the first job, where the quantum processor executes a second quantum circuit for processing a second job in response to the preemption of execution of the first quantum circuit, and the quantum processor completes execution of the first quantum circuit for processing the first job in response to completion of the execution of the second quantum circuit for processing the second job or when the execution of the second quantum circuit for processing the second job is preempted.

[0140] Additionally, in one embodiment of the present disclosure, the quantum computing device further comprises a procedure for preempting execution of a first quantum circuit for processing a first job between multiple shots, and the quantum controller stores measurements from previously executed shots of the first quantum circuit.

[0141] Furthermore, in one embodiment of the present disclosure, the quantum computing device additionally comprises a procedure for causing the quantum controller to load a first quantum circuit to be executed for the remaining shots.

[0142] Additionally, in one embodiment of the present disclosure, the quantum computing device further comprises a procedure for causing the quantum processor to complete execution of any remaining shots of the first quantum circuit once the first quantum circuit has been loaded.

[0143] In one embodiment of the present disclosure, the quantum computing device further comprises a procedure for preempting within one shot the execution of the first quantum circuit for processing the first job. Additionally, the quantum computing device comprises a quantum memory configured to store the quantum state of the first quantum circuit.

[0144] Additionally, in one embodiment of the present disclosure, the quantum computing device further comprises, as part of the preemption, causing the quantum controller to teleport the quantum state of the first quantum circuit from the quantum processor to the quantum memory.

[0145] Furthermore, in one embodiment of the present disclosure, the quantum computing device additionally includes a procedure for causing the quantum controller to teleport the quantum state of the first quantum circuit from the quantum memory to a quantum processor as part of completing execution of the first quantum circuit to process a first job.

[0146] Additionally, in one embodiment of the present disclosure, the quantum computing device further comprises a procedure for causing the quantum controller to identify qubits that carry classical information.

[0147] Furthermore, in one embodiment of the present disclosure, the quantum computing device additionally comprises a procedure for causing the quantum controller to preempt said execution of the first quantum circuit at a point where an operation is performed on a qubit that carries classical information.

[0148] Additionally, in one embodiment of the present disclosure, the quantum computing device further comprises causing the quantum processor to complete execution of a first quantum circuit to process a first job, starting from a point where an operation is performed on qubits that carry classical information.

[0149] The description of various embodiments of the present disclosure is presented for purposes of illustration and is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been selected to best explain the principles of the embodiments, practical applications, or technical improvements over technologies found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. 1. A method for preempting a quantum program, comprising: executing a first quantum circuit for processing a first job of the quantum program for a number of shots, wherein the number of shots defines the number of times the quantum circuit should be repeatedly executed; preempting execution of the first quantum circuit for processing the first job; executing a second quantum circuit for processing a second job in response to the preemption of the execution of the first quantum circuit; and completing the execution of the first quantum circuit for processing the first job in response to completion of the execution of the second quantum circuit for processing the second job or when the execution of the second quantum circuit for processing the second job is preempted. A method for providing the above.

2. The execution of the first quantum circuit for processing the first job is preempted between shots, and the method includes: storing measurements from previously executed shots of the first quantum circuit; 10. The method of the preceding claim, further comprising:

3. loading the first quantum circuit to be executed for the remaining shots.

10. The method of the preceding claim, further comprising:

4. completing execution of the remaining shots of the first quantum circuit once the first quantum circuit is loaded.

10. The method of the preceding claim, further comprising:

5. The execution of the first quantum circuit for processing the first job is preempted within one shot, and the method comprises: storing the quantum state of the first quantum circuit in a quantum memory; The method of claim 1 further comprising:

6. The execution of the first quantum circuit for processing the first job is preempted within one shot, and the method comprises: teleporting the quantum state of the first quantum circuit from a quantum processor to a quantum memory as part of the preemption. The method of claim 1 further comprising:

7. teleporting the quantum state of the first quantum circuit from the quantum memory to the quantum processor as part of completing the execution of the first quantum circuit to process the first job.

10. The method of the preceding claim, further comprising:

8. The execution of the first quantum circuit for processing the first job is preempted within one shot, and the method comprises: identifying qubits that carry classical information; and preempting execution of the first quantum circuit at a point where an operation is performed on a qubit carrying classical information.

8. The method of any one of claims 1, 5, 6 and 7, further comprising:

9. completing the execution of the first quantum circuit to process the first job, starting from the point at which the operation is performed on the qubits carrying classical information.

10. The method of the preceding claim, further comprising:

10. 10. The method of any of the preceding claims, wherein the preemption is performed by a controller of a quantum computer.

11. A quantum processor configured to perform a computational task, the quantum processor having one or more quantum circuits, the quantum processor configured to execute a first quantum circuit for processing a first job of a quantum program over a number of shots, where the number of shots defines the number of times the quantum circuit should be repeatedly executed; and a quantum controller configured to preempt execution of the first quantum circuit for processing the first job; wherein the quantum processor executes a second quantum circuit for processing a second job in response to the preemption of the execution of the first quantum circuit, and the quantum processor completes execution of the first quantum circuit for processing the first job in response to completion of the execution of the second quantum circuit for processing the second job or when the execution of the second quantum circuit for processing the second job is preempted. Quantum computing devices.

12. 10. The quantum computing device of claim 9, wherein the execution of the first quantum circuit to process the first job is preempted between multiple shots, and the quantum controller stores measurements from previously executed shots of the first quantum circuit.

13. 10. The quantum computing device of claim 9, wherein the quantum controller loads the first quantum circuit to be executed for the remaining shots.

14. 10. The quantum computing device of claim 9, wherein the quantum processor completes execution of the remaining shots of the first quantum circuit once the first quantum circuit is loaded.

15. The execution of the first quantum circuit to process the first job is preempted within one shot, and the quantum computing device: a quantum memory configured to store a quantum state of the first quantum circuit; 12. The quantum computing device of claim 11 further comprising:

16. 10. The quantum computing device of claim 9, wherein the quantum controller teleports the quantum state of the first quantum circuit from the quantum processor to the quantum memory as part of the preemption.

17. 10. The quantum computing device of claim 9, wherein the quantum controller teleports the quantum state of the first quantum circuit from the quantum memory to the quantum processor as part of completing the execution of the first quantum circuit to process the first job.

18. 10. A quantum computing device as claimed in any of the preceding seven claims, wherein the quantum controller identifies qubits that carry classical information.

19. 18. The quantum computing device of claim 11, 15, 16, or 17, wherein the quantum controller preempts execution of the first quantum circuit at a point where an operation is performed on the qubits that carry classical information.

20. 10. The quantum computing device of claim 9, wherein the quantum processor completes the execution of the first quantum circuit to process the first job, starting from the point at which the operation is performed on the quantum bits that carry classical information.