Quantum job submission and optimization for end-to-end algorithms with prioritization of placeholders of quantum jobs in job queue
Quantum job prioritization is disclosed. Quantum jobs may be stored as placeholders in a job queue associated with a quantum processing unit. The quantum jobs are prioritized to improve the usage of the quantum processing unit. Prioritizing quantum jobs allows the quantum processing unit to execute quantum jobs in different orders rather than on an application basis. This allows grace periods to be used for executing quantum jobs.
1 . A method comprising:
accessing an orchestration engine that includes a prioritization engine and a machine learning model, wherein the machine learning model is tasked with predicting runtime characteristics for quantum jobs of an application in a job queue, and wherein the prioritization engine is tasked with evaluating the quantum jobs of the application and prioritizing the quantum jobs based on the runtime characteristics;
placing the quantum jobs of the application in the job queue as placeholders, wherein the application includes a computing job, wherein at least some details of each of the quantum jobs are omitted in the respective placeholders, and wherein, when a time for executing one of the quantum jobs arrives, a classical system is notified to submit said one quantum job;
inserting respective quantum job metadata into the respective placeholders, the respective quantum job metadata including metadata structured to enable the prioritization engine to prioritize the quantum jobs;
causing the prioritization engine to prioritize the placeholders of the quantum jobs in the job queue based on a determined grace period associated with execution of the computer job of the application, wherein prioritizing the placeholders of the quantum jobs comprises applying the machine learning model, which is trained on different quantum job metadata inserted in the respective placeholders, to predict the runtime characteristics of each of the quantum jobs and using the prioritization engine to prioritize the placeholders of the quantum jobs based on the runtime characteristics, and wherein the grace period is dynamically determined as a time required by the computer job to generate an output that serves as input for a corresponding quantum job for execution in a quantum processing unit;
in response to a determination that a highest priority quantum job associated with a different application from the job queue is to be executed, obtaining substance of the highest priority quantum job by notifying the classical system to submit the highest priority quantum job;
after obtaining the substance of the highest priority quantum job, sending the highest priority quantum job to the quantum processing unit for execution; and
executing the highest priority quantum job during the determined grace period of the computer job of the application.
2 . The method of claim 1 , wherein the quantum job metadata includes one or more of quantum circuit, number of shots, number of qubits, quantum depth, and application end-to-end execution time.
3 . The method of claim 2 , further comprising estimating an execution time for each of the quantum jobs.
4 . The method of claim 2 , wherein the quantum jobs include first quantum jobs associated with a first application, wherein a number of the first quantum jobs is estimated by the first application and wherein the first quantum jobs are performed at different times, wherein the first quantum jobs are associated with first computer jobs.
5 . The method of claim 4 , wherein a grace period is determined for each of the first computer jobs.
6 . The method of claim 5 , further comprising prioritizing the quantum jobs such that a second quantum job associated with a second application is performed during one of the grace periods.
7 . The method of claim 1 , further comprising prioritizing the job queue using a heuristic function.
8 . The method of claim 7 , wherein the heuristic function is one of a greedy search, linear programming, or a heuristic search.
9 . The method of claim 8 , further comprising prioritizing the quantum jobs based on at least one of user intents, the quantum job metadata, end-to-end application execution time, the runtime characteristics, user-defined priority, or execution deadlines.
10 . The method of claim 1 , further comprising refining the quantum jobs and/or a number of the quantum jobs in the job queue and reprioritizing the quantum jobs after refinement, wherein refinement factors include number of quantum circuits, number of shots, number of qubits, and depth.
11 . A non-transitory storage medium having stored therein instructions that are executable by one or more hardware processors to perform operations comprising:
accessing an orchestration engine that includes a prioritization engine and a machine learning model, wherein the machine learning model is tasked with predicting runtime characteristics for quantum jobs of an application in a job queue, and wherein the prioritization engine is tasked with evaluating the quantum jobs of the application and prioritizing the quantum jobs based on the runtime characteristics;
placing the quantum jobs of the application in the job queue as placeholders, wherein the application includes a computing job, wherein at least some details of each of the quantum jobs are omitted in the respective placeholders, and wherein, when a time for executing one of the quantum jobs arrives, a classical system is notified to submit said one quantum job;
inserting respective quantum job metadata into the respective placeholders, the respective quantum job metadata including metadata structured to enable the prioritization engine to prioritize the quantum jobs;
causing the prioritization engine to prioritize the placeholders of the quantum jobs in the job queue based on a determined grace period associated with execution of the computer job of the application, wherein prioritizing the placeholders of the quantum jobs comprises applying the machine learning model, which is trained on different quantum job metadata inserted in the respective placeholders, to predict the runtime characteristics of each of the quantum jobs, and using the prioritization engine to prioritize the placeholders of the quantum jobs based on the runtime characteristics, and wherein the grace period is dynamically determined as a time required by the computer job to generate an output that serves as input for a corresponding quantum job for execution in a quantum processing unit;
in response to a determination that a highest priority quantum job associated with a different application from the job queue is to be executed, obtaining substance of the highest priority quantum job by notifying the classical system to submit the highest priority quantum job;
after obtaining the substance of the highest priority quantum job, sending the highest priority quantum job to the quantum processing unit for execution; and
executing the highest priority quantum job during the determined grace period of the computer job of the application.
12 . The non-transitory storage medium of claim 11 , wherein the quantum job metadata includes one or more of quantum circuit, number of shots, number of qubits, quantum depth, and application end-to-end execution time.
13 . The non-transitory storage medium of claim 12 , further comprising estimating an execution time for each of the quantum jobs.
14 . The non-transitory storage medium of claim 12 , wherein the quantum jobs include first quantum jobs associated with a first application, wherein a number of the first quantum jobs is estimated by the first application and wherein the first quantum jobs are performed at different times, wherein the first quantum jobs are associated with first computer jobs.
15 . The non-transitory storage medium of claim 14 , wherein a grace period is determined for each of the first computer jobs.
16 . The non-transitory storage medium of claim 15 , further comprising prioritizing the quantum jobs such that a second quantum job associated with a second application is performed during one of the grace periods.
17 . The non-transitory storage medium of claim 11 , further comprising prioritizing the job queue using a heuristic function.
18 . The non-transitory storage medium of claim 17 , wherein the heuristic function is one of a greedy search, linear programming, or a heuristic search.
19 . The non-transitory storage medium of claim 18 , further comprising prioritizing the quantum jobs based on at least one of user intents, the quantum job metadata, end-to-end application execution time, the runtime characteristics, user-defined priority, or execution deadlines.
20 . The non-transitory storage medium of claim 11 , further comprising refining the quantum jobs and/or a number of the quantum jobs in the job queue and reprioritizing the quantum jobs after refinement, wherein refinement factors include number of quantum circuits, number of shots, number of qubits, and depth.